/* XPert AI admin page: the StockXPlus back office look (AdminLTE, its sidebar tone), his brand colours. */
:root {
    --brand-orange: #f97316;
    --brand-sky: #0369a1;
    --brand-sky-light: #38bdf8;
    --bp-sidebar-surface: #111827;
    --bp-sidebar-hover: rgba(148, 163, 184, 0.10);
    --bp-sidebar-active: rgba(59, 130, 246, 0.16);
    --bp-sidebar-text: #e2e8f0;
    --page-bg: #f4f6f9;
}

body { background: var(--page-bg); font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans Bengali", sans-serif; }

.main-sidebar { background: var(--bp-sidebar-surface) !important; box-shadow: 6px 0 22px rgba(15, 23, 42, 0.22) !important; }
.brand-link { background: rgba(255,255,255,0.035) !important; border-color: rgba(148,163,184,0.14) !important; display: flex !important; align-items: center; gap: .55rem; }
.brand-link .brand-mark { width: 33px; height: 33px; border-radius: 9px; flex: none; margin-left: .3rem; }
.brand-link .brand-text { font-weight: 700 !important; color: #fff; letter-spacing: .01em; }
.brand-link .brand-text i { font-style: normal; color: var(--brand-orange); }
.brand-link .brand-sub { display: block; font-size: .68rem; font-weight: 500; color: #94a3b8; line-height: 1; margin-top: 2px; }

.nav-sidebar .nav-link { color: var(--bp-sidebar-text) !important; font-weight: 600; }
.nav-sidebar .nav-link:hover { background: var(--bp-sidebar-hover) !important; }
.nav-sidebar .nav-link.active { background: var(--bp-sidebar-active) !important; box-shadow: inset 3px 0 0 var(--brand-sky-light) !important; color: #fff !important; }
.nav-sidebar .nav-link > .nav-icon { color: #b6c2d2 !important; }
.nav-sidebar .nav-link.active > .nav-icon { color: var(--brand-orange) !important; }
.nav-header { color: #64748b !important; font-size: .72rem !important; letter-spacing: .08em; text-transform: uppercase; }

.main-header.navbar { background: #fff; border-bottom: 1px solid #e5e7eb; }
.content-header h1 { font-size: 1.45rem; font-weight: 700; color: #0f172a; }
.content-header .sub { color: #64748b; font-size: .9rem; }

.card { border-radius: 12px; box-shadow: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04); border: 0; }
.card-header { background: transparent; border-bottom: 1px solid #eef0f3; font-weight: 700; }
.card-title { font-weight: 700; font-size: 1rem; }

.stat { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; }
.stat .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.stat .ico.o { background: #fff7ed; color: var(--brand-orange); }
.stat .ico.s { background: #e0f2fe; color: var(--brand-sky); }
.stat .ico.g { background: #ecfdf5; color: #059669; }
.stat .ico.r { background: #fef2f2; color: #dc2626; }
.stat .n { font-size: 1.45rem; font-weight: 800; color: #0f172a; line-height: 1.1; }
.stat .l { color: #64748b; font-size: .82rem; }

.btn-primary { background: var(--brand-orange); border-color: var(--brand-orange); }
.btn-primary:hover, .btn-primary:focus { background: #ea580c; border-color: #ea580c; }
.btn-outline-primary { color: var(--brand-sky); border-color: var(--brand-sky); }
.btn-outline-primary:hover { background: var(--brand-sky); border-color: var(--brand-sky); }
a { color: var(--brand-sky); }

.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; border-top: 0; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.table td { vertical-align: middle; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }

.bar { height: 7px; border-radius: 99px; background: #eef0f3; overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; background: var(--brand-sky-light); }
.bar.warn > span { background: var(--brand-orange); }
.bar.full > span { background: #dc2626; }

.badge-full { background: #ecfdf5; color: #047857; }
.badge-limit { background: #e0f2fe; color: var(--brand-sky); }
.badge-off { background: #f1f5f9; color: #64748b; }
.badge-due { background: #fef2f2; color: #b91c1c; }
.badge { font-weight: 600; padding: .35em .6em; border-radius: 6px; }

.key-box { font-family: ui-monospace, Consolas, monospace; font-size: 1rem; background: #0f172a; color: #e2e8f0; padding: .9rem 1rem; border-radius: 10px; word-break: break-all; }

.answer { white-space: pre-wrap; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px; padding: .9rem 1rem; font-size: .95rem; }

/* StockXPlus-style loader: the XPert mark inside a turning ring */
.xp-loader { display: none; align-items: center; gap: .6rem; color: #64748b; }
.xp-loader.on { display: inline-flex; }
.xp-loader .ring { position: relative; width: 34px; height: 34px; }
.xp-loader .ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid #e0f2fe; border-top-color: var(--brand-orange); animation: xpspin .9s linear infinite; }
.xp-loader .ring svg { position: absolute; inset: 7px; width: 20px; height: 20px; }
@keyframes xpspin { to { transform: rotate(360deg); } }

.login-page { background: linear-gradient(135deg, #0f172a 0%, #0c4a6e 100%); }
.login-box .card { border-radius: 16px; }
.wordmark { font-weight: 800; font-size: 1.7rem; color: var(--brand-sky); }
.wordmark i { font-style: normal; color: var(--brand-orange); }

@media (max-width: 575.98px) {
    .content-header h1 { font-size: 1.2rem; }
    .container-fluid { padding-left: 16px; padding-right: 16px; }
    .stat { padding: .75rem .8rem; }
}
