/* PS Stock — modern white theme (layered over Bootstrap 5.3) */
:root {
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e8ecf3;
    --bg: #f6f8fc;
    --card: #ffffff;
    --brand: #4f46e5;
    --brand-soft: #eef0ff;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .10);
    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-body-color: var(--ink);
    --bs-border-color: var(--line);
    --bs-link-color: #4f46e5;
    --bs-link-hover-color: #3730a3;
}

body { font-family: 'Inter', 'Noto Sans Bengali', system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: .92rem; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { letter-spacing: -.02em; font-weight: 650; }
.text-muted { color: var(--muted) !important; }

/* ---------- Sidebar ---------- */
.sidebar { width: 252px; background: #fff; border-right: 1px solid var(--line); position: fixed; inset: 0 auto 0 0; z-index: 1030; display: flex; flex-direction: column; transition: transform .2s; }
.sidebar .brand { display: flex; align-items: center; gap: .65rem; padding: 1.25rem 1.4rem; font-weight: 700; font-size: 1.15rem; color: var(--ink); letter-spacing: -.02em; }
.logo { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 1.05rem; background: linear-gradient(135deg, #6366f1, #4f46e5 55%, #7c3aed); box-shadow: 0 6px 14px -4px rgba(79, 70, 229, .55); }
.sidebar nav { padding: 0 .85rem 1rem; overflow-y: auto; overflow-x: hidden; flex: 1 1 auto; min-height: 0; flex-wrap: nowrap; }
.sidebar a.nav-link { display: flex; align-items: center; gap: .7rem; color: #475569; padding: .6rem .85rem; border-radius: 11px; font-weight: 500; margin-bottom: 2px; transition: .15s; }
.sidebar a.nav-link i { font-size: 1.05rem; color: #94a3b8; transition: .15s; }
.sidebar a.nav-link:hover { background: #f4f6fb; color: var(--ink); }
.sidebar a.nav-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.sidebar a.nav-link.active i { color: var(--brand); }
.sidebar .nav-heading { color: #94a3b8; font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 1.1rem .9rem .4rem; }
.sidebar .side-user { margin: .85rem; padding: .8rem; border-radius: 13px; background: #f6f8fc; border: 1px solid var(--line); display: flex; gap: .65rem; align-items: center; }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 600; color: #fff; background: linear-gradient(135deg, #818cf8, #4f46e5); }

/* ---------- Layout ---------- */
.content { margin-left: 252px; padding: 0 2rem 2rem; }
.topbar { position: sticky; top: 0; z-index: 1020; margin: 0 -2rem 1.5rem; padding: .95rem 2rem; background: rgba(246, 248, 252, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar h1 { font-size: 1.3rem; margin: 0; }
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); box-shadow: none; }
    .sidebar.show { transform: none; box-shadow: 0 0 40px rgba(15, 23, 42, .25); }
    .content { margin-left: 0; padding: 0 1rem 1.5rem; }
    .topbar { margin: 0 -1rem 1.25rem; padding: .8rem 1rem; }
}

/* ---------- Cards ---------- */
.card { border: 1px solid var(--line) !important; border-radius: var(--radius); box-shadow: var(--shadow) !important; background: var(--card); }
.card-header { background: transparent !important; border-bottom: 1px solid var(--line); font-weight: 600; padding: 1rem 1.25rem; }
.card-footer { background: transparent !important; border-top: 1px solid var(--line); padding: 1rem 1.25rem; }
.card-body { padding: 1.25rem; }

.stat-card { position: relative; overflow: hidden; border: 1px solid var(--line) !important; }
.stat-card::after { content: ''; position: absolute; inset: auto -30px -45px auto; width: 120px; height: 120px; border-radius: 50%; background: var(--c); opacity: .07; }
.stat-card .num { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; margin: .15rem 0; }
.stat-card i.bi { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem !important; background: color-mix(in srgb, var(--c) 12%, #fff); flex: none; align-self: flex-start; }
.stat-card dl, .stat-card .small { color: var(--muted); }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; --bs-table-hover-bg: #f8f9fe; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .8rem 1rem; border-bottom-color: #f0f2f7; }
.table thead th { background: #fafbfe !important; color: var(--muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.table tfoot td, .table tfoot th { background: #fafbfe !important; border-top: 1px solid var(--line); border-bottom: 0; }
.table-responsive { border-radius: var(--radius); }
.card > .table-responsive > .table > :last-child > tr:last-child > * { border-bottom: 0; }

/* ---------- Forms & buttons ---------- */
.form-label { font-weight: 500; color: #334155; font-size: .82rem; margin-bottom: .35rem; }
.form-control, .form-select { border-radius: 11px; border-color: #dfe4ee; padding: .55rem .85rem; background-color: #fff; }
.form-control-sm, .form-select-sm { border-radius: 10px; padding: .4rem .7rem; }
.form-control:focus, .form-select:focus { border-color: #818cf8; box-shadow: 0 0 0 4px rgba(99, 102, 241, .14); }
.btn { border-radius: 11px; font-weight: 500; padding: .5rem 1rem; }
.btn-sm { border-radius: 9px; padding: .35rem .7rem; }
.btn-primary { --bs-btn-bg: #4f46e5; --bs-btn-border-color: #4f46e5; --bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca; --bs-btn-active-bg: #3730a3; --bs-btn-active-border-color: #3730a3; box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .6); }
.btn-outline-primary { --bs-btn-color: #4f46e5; --bs-btn-border-color: #c7cbfa; --bs-btn-hover-bg: #4f46e5; --bs-btn-hover-border-color: #4f46e5; }
.btn-outline-secondary { --bs-btn-color: #475569; --bs-btn-border-color: #dfe4ee; --bs-btn-hover-bg: #f1f4fa; --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: #cdd5e3; }
.btn-outline-danger { --bs-btn-border-color: #f6caca; }
.btn-outline-success { --bs-btn-border-color: #bfe6cf; }
.form-check-input:checked { background-color: #4f46e5; border-color: #4f46e5; }

/* ---------- Badges / alerts / misc ---------- */
.badge { font-weight: 600; border-radius: 999px; padding: .38em .75em; }
.badge.text-bg-success { background: #e7f8ee !important; color: #15803d !important; }
.badge.text-bg-warning { background: #fff4e0 !important; color: #b45309 !important; }
.badge.text-bg-secondary { background: #eef1f6 !important; color: #475569 !important; }
.badge.text-bg-primary { background: var(--brand-soft) !important; color: var(--brand) !important; }
.badge.text-bg-info { background: #e0f4fb !important; color: #0369a1 !important; }
.badge.text-bg-dark { background: #1e293b !important; }
.alert { border: 0; border-radius: 13px; box-shadow: var(--shadow); }
.alert-success { background: #e7f8ee; color: #166534; }
.alert-danger { background: #fdecec; color: #991b1b; }
.dropdown-menu { border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 16px 40px -12px rgba(15, 23, 42, .2); padding: .4rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; }
.page-link { border-radius: 9px !important; margin: 0 2px; border: 1px solid var(--line); color: #475569; }
.active > .page-link { background: var(--brand); border-color: var(--brand); }
.pagination { margin-bottom: 0; }
dl dt { color: var(--muted); font-weight: 500; }
a { text-decoration-thickness: from-font; }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.auth-hero { position: relative; overflow: hidden; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 15% 10%, #e0e7ff 0, transparent 45%), radial-gradient(circle at 90% 85%, #ede9fe 0, transparent 45%), #f6f8fc; }
.auth-hero .blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.auth-hero h2 { font-size: 2.4rem; line-height: 1.15; font-weight: 750; letter-spacing: -.035em; max-width: 440px; }
.auth-hero .feat { display: flex; gap: .75rem; align-items: center; background: rgba(255,255,255,.75); border: 1px solid #fff; border-radius: 14px; padding: .8rem 1rem; margin-top: .7rem; max-width: 400px; box-shadow: var(--shadow); }
.auth-hero .feat i { color: var(--brand); font-size: 1.2rem; }
.auth-form { display: grid; place-items: center; padding: 2rem; }
.auth-form .box { width: 100%; max-width: 380px; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-hero { display: none; } }
