/* EDVI brand layer — loaded after custom.css on every dashboard page.
   Brand colour rgb(16,99,94) replaces the template's neon purple for primary actions and navigation. */
:root {
    --edvi-brand: #10635e;          /* rgb(16,99,94) */
    --edvi-brand-hover: #147a74;
    --edvi-brand-text: #2fa89f;     /* readable teal on dark navy */
    --edvi-brand-soft: rgba(16, 99, 94, .22);
    --edvi-brand-line: rgba(47, 168, 159, .45);
    --x-primary: var(--edvi-brand);
    --x-primary-rgb: 16, 99, 94;
    --x-link-color: var(--edvi-brand-text);
    --x-link-hover-color: #5cc7bf;
}

/* primary buttons */
.btn-primary, .btn-primary:disabled, .btn-primary.disabled { background-color: var(--edvi-brand); border-color: var(--edvi-brand); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary:first-child:active { background-color: var(--edvi-brand-hover) !important; border-color: var(--edvi-brand-hover) !important; color: #fff !important; }
.btn-primary:focus-visible { box-shadow: 0 0 0 3px var(--edvi-brand-soft); }
.btn-outline-primary { color: var(--edvi-brand-text); border-color: var(--edvi-brand-line); }
.btn-outline-primary:hover { background-color: var(--edvi-brand); border-color: var(--edvi-brand); color: #fff; }
.text-primary { color: var(--edvi-brand-text) !important; }
.bg-primary { background-color: var(--edvi-brand) !important; }
.text-bg-primary { background-color: var(--edvi-brand) !important; color: #fff !important; }
.bg-primary-subtle { background-color: var(--edvi-brand-soft) !important; }
.form-check-input:checked { background-color: var(--edvi-brand); border-color: var(--edvi-brand); }
.form-control:focus, .form-select:focus { border-color: var(--edvi-brand-line); box-shadow: 0 0 0 3px var(--edvi-brand-soft); }
.progress-bar { background-color: var(--edvi-brand); }
.navbar-dark .navbar-toggler:focus { box-shadow: inset 0 0 0 1px var(--edvi-brand-text) !important; }
.copy-buffer.active { color: var(--edvi-brand-text); }
.badge.text-bg-primary { background-color: var(--edvi-brand) !important; }
.edvi-background { background: var(--edvi-brand); }
.bg-edvi-subtle { background: var(--edvi-brand-soft); color: var(--edvi-brand-text); }
.referral-img-link:hover { color: var(--edvi-brand-text); }

/* ---------- sidebar ---------- */
#sidebar { --sb-border: var(--x-border-color, #334155); --sb-muted: var(--x-secondary-color, #94a3b8); }
#sidebar .navbar-brand { display: flex; justify-content: center; padding-top: 18px; padding-bottom: 18px; margin-bottom: 8px; }
#sidebar .navbar-nav { gap: 2px; }
#sidebar .navbar-nav .nav-item { margin: 0 !important; }
#sidebar .navbar-nav .nav-link {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px !important;
    font-size: 13px; font-weight: 600; color: var(--sb-muted) !important; background: transparent !important;
    transition: color .18s, background-color .18s;
}
#sidebar .navbar-nav .nav-link > i.bi { width: 18px; text-align: center; font-size: 15px; color: var(--sb-muted); transition: color .18s; }
#sidebar .navbar-nav .nav-link:hover { color: var(--x-heading-color, #fff) !important; background: rgba(128,145,178,.06) !important; }
#sidebar .navbar-nav .nav-link:hover > i.bi { color: var(--edvi-brand-text); }
#sidebar .navbar-nav .nav-link.active { color: var(--x-heading-color, #fff) !important; background: var(--edvi-brand-soft) !important; box-shadow: inset 0 0 0 1px var(--edvi-brand-line); }
#sidebar .navbar-nav .nav-link.active > i.bi { color: var(--edvi-brand-text); }
#sidebar .navbar-nav .nav-link.active::before { content: ""; position: absolute; left: -10px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--edvi-brand-text); }
#sidebar .navbar-divider { margin: 14px 0 !important; opacity: 1 !important; border-color: var(--sb-border); }
#sidebar .nav-sm .nav-link { padding: 7px 14px 7px 44px; font-size: 12px; font-weight: 500; }
#sidebar .nav-sm .nav-link.active::before { display: none; }
#sidebar .navbar-nav .nav-link .badge { display: none; }
#sidebar .navbar-nav .nav-link .badge.nav-badge-ann { display: inline-block; background: var(--edvi-brand); color: #fff; font-size: 10px; padding: 3px 7px; }
#sidebar .navbar-nav .nav-link[aria-expanded]::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); opacity: .6; transition: transform .2s; }
#sidebar .navbar-nav .nav-link[aria-expanded="true"]::after { transform: rotate(45deg); }
@media (max-width: 991px) {
    #sidebar .navbar-brand { padding: 8px 0; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
    #sidebar .navbar-nav .nav-link, #sidebar .navbar-nav .nav-link > i.bi { transition: none; }
}

/* ---------- sidebar account card (partials/sidebar-user.blade.php) ---------- */
@media (min-width: 992px) { #sidebar .navbar-collapse { display: flex; flex-direction: column; } }
#sidebar .sb-spacer { flex: 1; min-height: 16px; }
#sidebar .sb-user { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; padding: 12px; border: 1px solid var(--sb-border); border-radius: 16px; background: linear-gradient(160deg, var(--edvi-brand-soft), transparent 55%); }
#sidebar .sb-user-main { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
#sidebar .sb-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 2px var(--edvi-brand-line); }
#sidebar .sb-user-text { min-width: 0; display: flex; flex-direction: column; }
#sidebar .sb-user-text strong { font-size: 13px; color: var(--x-heading-color, #fff); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sidebar .sb-user-text small { font-size: 11px; color: var(--sb-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* subscription plaque: days left + valid-until date + progress */
#sidebar .sb-user-plan { display: flex; flex-direction: column; gap: 7px; padding: 9px 10px; border-radius: 11px; border: 1px solid var(--sb-border); background: rgba(8, 20, 34, .45); font-size: 11px; font-weight: 600; text-decoration: none; color: var(--sb-muted); }
#sidebar .sb-user-plan-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#sidebar .sb-user-plan-row > span:first-child { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
#sidebar .sb-user-plan i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
#sidebar .sb-user-until { font-weight: 500; color: var(--sb-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
#sidebar .sb-user-plan.is-active { color: var(--edvi-brand-text); }
#sidebar .sb-user-plan.is-off { color: #ec6a87; }
#sidebar .sb-user-bar { display: block; height: 3px; border-radius: 3px; background: rgba(128,145,178,.15); overflow: hidden; }
#sidebar .sb-user-bar span { display: block; height: 100%; border-radius: 3px; background: var(--edvi-brand-text); }
/* extend button (replaces the former logout icon; logout lives in the header/nav dropdowns) */
#sidebar .sb-user-extend { display: flex; align-items: center; justify-content: center; gap: 8px; height: 34px; border-radius: 10px; font-size: 12px; font-weight: 600; text-decoration: none; color: #fff; background: var(--edvi-brand); border: 1px solid transparent; transition: background-color .15s, box-shadow .15s; }
#sidebar .sb-user-extend:hover { background: var(--edvi-brand-text); color: #06121e; }
#sidebar .sb-user-extend:focus-visible { box-shadow: 0 0 0 3px var(--edvi-brand-soft); outline: none; }
#sidebar .sb-user-extend.is-urgent { background: #ec6a87; }
#sidebar .sb-user-extend.is-urgent:hover { background: #f08aa0; color: #06121e; }
@media (max-width: 991px) {
    #sidebar .sb-user { margin: 8px 0 4px; }
}

/* Pagination (wallet, admin tables, DataTables): main.css hardcodes the template purple #8957ff for the active page and focus ring. */
.pagination { --x-pagination-active-bg: var(--edvi-brand); --x-pagination-active-border-color: var(--edvi-brand); --x-pagination-focus-box-shadow: 0 0 0 .25rem var(--edvi-brand-soft); }

/* cookie consent (partials/cookie-consent.blade.php, consent.js) */
.edvi-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1080; max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(47, 168, 159, .35); background: rgba(11, 18, 34, .97); backdrop-filter: blur(10px); box-shadow: 0 24px 60px -24px #000; }
.edvi-consent[hidden] { display: none; }
.edvi-consent__text { flex: 1; min-width: 0; font-size: 13px; color: #94a3b8; }
.edvi-consent__text strong { display: block; color: #fff; font-size: 14px; margin-bottom: 4px; }
.edvi-consent__text p { margin: 0; line-height: 1.5; }
.edvi-consent__text a { color: #2fa89f; }
.edvi-consent__actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 575px) {
    .edvi-consent { flex-direction: column; align-items: stretch; }
    .edvi-consent__actions .btn { flex: 1; }
}
