/* ==========================================================================
   UVRG theme — sits on top of DashLite (dashlite.css) on every page.
   Brand: deep navy + sky blue from the logo, warm gold accent.
   ========================================================================== */

:root {
    --uv-navy-900: #0b1a33;
    --uv-navy-800: #102445;
    --uv-navy: #14284b;
    --uv-navy-600: #1f3a66;
    --uv-blue: #2398c9;
    --uv-blue-600: #1b84b0;
    --uv-blue-50: #e9f6fc;
    --uv-sky: #5fc3ea;
    --uv-gold: #f4b324;
    --uv-green: #12b886;
    --uv-red: #e5484d;
    --uv-amber: #f59f00;

    --uv-ink: #172b4d;
    --uv-text: #4a5d7e;
    --uv-muted: #8a9bb8;
    --uv-line: #e7edf5;
    --uv-bg: #f4f7fc;
    --uv-card: #ffffff;

    --uv-radius: 14px;
    --uv-radius-sm: 10px;
    --uv-shadow-sm: 0 1px 2px rgba(16, 36, 69, .05);
    --uv-shadow: 0 1px 2px rgba(16, 36, 69, .04), 0 10px 30px -12px rgba(16, 36, 69, .14);
    --uv-shadow-lg: 0 20px 50px -20px rgba(16, 36, 69, .35);
    --uv-gradient: linear-gradient(135deg, var(--uv-navy) 0%, var(--uv-navy-600) 45%, var(--uv-blue) 100%);
    --uv-font: "Plus Jakarta Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
body,
.nk-body,
.nk-menu-link,
.btn,
.form-control,
.form-label,
.nk-block-title,
.title,
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.lead-text,
.overline-title,
.dropdown-menu,
.badge {
    font-family: var(--uv-font);
}

.nk-body,
.nk-body.bg-white {
    background: var(--uv-bg) !important;
    color: var(--uv-text);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.nk-block-title, .title, .lead-text { color: var(--uv-ink); }

a { color: var(--uv-blue); }
a:hover { color: var(--uv-blue-600); }

::selection { background: rgba(35, 152, 201, .18); }

.text-primary { color: var(--uv-blue) !important; }
.text-soft { color: var(--uv-muted) !important; }
.bg-primary { background: var(--uv-gradient) !important; }
.bg-info { background: linear-gradient(135deg, #1b84b0, var(--uv-sky)) !important; }
.bg-success { background-color: var(--uv-green) !important; }

/* ---------- Page heading ---------- */
.nk-block-head-sm { padding-bottom: 1.5rem; }
.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -.02em;
}
.nk-block-des p { color: var(--uv-muted); font-size: .95rem; }

/* ---------- Sidebar ---------- */
.nk-sidebar,
.nk-sidebar.is-dark,
.nk-sidebar.is-light {
    background: linear-gradient(180deg, var(--uv-navy-900) 0%, var(--uv-navy-800) 55%, #0f2a52 100%);
    border-right: 0;
    box-shadow: 4px 0 30px -10px rgba(11, 26, 51, .45);
}
.nk-sidebar::after {
    /* soft brand glow at the bottom */
    content: "";
    position: absolute;
    left: -80px;
    bottom: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(35, 152, 201, .25) 0%, rgba(35, 152, 201, 0) 70%);
    pointer-events: none;
}
.nk-sidebar .nk-sidebar-head {
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    height: 72px;
}
.nk-sidebar .nk-quick-nav-icon { color: rgba(255, 255, 255, .65); }
.nk-sidebar .nk-quick-nav-icon:hover { color: #fff; }

.uv-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.uv-brand img { height: 36px; width: auto; filter: drop-shadow(0 4px 10px rgba(35, 152, 201, .35)); }
.uv-brand-text { line-height: 1.1; }
.uv-brand-text strong { display: block; color: #fff; font-size: 17px; font-weight: 800; letter-spacing: .06em; }
.uv-brand-text small { display: block; color: rgba(255, 255, 255, .55); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.nk-sidebar.is-compact:not(:hover) .uv-brand-text { display: none; }

.nk-sidebar .nk-sidebar-content { padding-top: 12px; }
.nk-sidebar .nk-menu-heading { padding: 1.1rem 24px .45rem; }
.nk-sidebar .nk-menu-heading .overline-title {
    color: rgba(255, 255, 255, .38) !important;
    font-size: 10.5px;
    letter-spacing: .14em;
}
.nk-sidebar .nk-menu-item { padding: 0 12px; }
.nk-sidebar .nk-menu-link {
    color: rgba(255, 255, 255, .72);
    font-weight: 600;
    font-size: 14px;
    padding: .62rem 36px .62rem 12px;
    border-radius: 10px;
    transition: background .2s ease, color .2s ease;
}
.nk-sidebar .nk-menu-icon { color: rgba(255, 255, 255, .5); font-size: 1.15rem; width: 32px; transition: color .2s ease; }
.nk-sidebar .nk-menu-link:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}
.nk-sidebar .nk-menu-link:hover .nk-menu-icon { color: var(--uv-sky); }

.nk-sidebar .nk-menu > .nk-menu-item.active > .nk-menu-link,
.nk-sidebar .nk-menu > .nk-menu-item.uv-active > .nk-menu-link {
    background: linear-gradient(90deg, rgba(35, 152, 201, .95), rgba(35, 152, 201, .55));
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(35, 152, 201, .7);
}
.nk-sidebar .nk-menu > .nk-menu-item.active > .nk-menu-link .nk-menu-icon,
.nk-sidebar .nk-menu > .nk-menu-item.uv-active > .nk-menu-link .nk-menu-icon { color: #fff; }

.nk-sidebar .nk-menu-toggle:after { color: rgba(255, 255, 255, .4) !important; }
.nk-sidebar .nk-menu-sub { padding-left: 32px; margin: 2px 0 6px; border-left: 0 !important; }
.nk-sidebar .nk-menu-sub .nk-menu-item { padding: 0; }
.nk-sidebar .nk-menu-sub .nk-menu-link {
    font-size: 13.5px;
    font-weight: 500;
    padding: .45rem 12px;
    color: rgba(255, 255, 255, .6);
}
.nk-sidebar .nk-menu-sub .nk-menu-item.active > .nk-menu-link,
.nk-sidebar .nk-menu-sub .nk-menu-item.uv-active > .nk-menu-link { color: var(--uv-sky); background: transparent; }

.uv-sidebar-card {
    margin: 22px 16px 24px;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(35, 152, 201, .22), rgba(95, 195, 234, .08));
    border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
}
.uv-sidebar-card strong { color: #fff; display: block; font-size: 14px; margin-bottom: 4px; }
.uv-sidebar-card .btn { margin-top: 10px; }
.nk-sidebar.is-compact:not(:hover) .uv-sidebar-card { display: none; }

/* ---------- Header ---------- */
.nk-header,
.nk-header.is-light {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--uv-line);
}
.nk-header-wrap { min-height: 72px; }
.uv-header-greeting { line-height: 1.2; }
.uv-header-greeting .uv-date { color: var(--uv-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.uv-header-greeting .uv-hello { color: var(--uv-ink); font-weight: 700; font-size: 15px; }

.uv-user-toggle { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 40px; transition: background .2s ease; }
.uv-user-toggle:hover { background: var(--uv-blue-50); }
.uv-user-toggle .user-avatar { width: 38px; height: 38px; font-size: 13px; }
.uv-user-meta { line-height: 1.2; text-align: left; }
.uv-user-meta .uv-user-name { color: var(--uv-ink); font-weight: 700; font-size: 13.5px; }
.uv-user-meta .uv-user-role { color: var(--uv-muted); font-size: 11.5px; text-transform: capitalize; }

.uv-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--uv-text);
    background: #fff;
    border: 1px solid var(--uv-line);
    font-size: 18px;
    transition: all .2s ease;
}
.uv-icon-btn:hover { color: var(--uv-blue); border-color: rgba(35, 152, 201, .35); box-shadow: var(--uv-shadow-sm); }

/* ---------- Content width / spacing ---------- */
.nk-content { padding-top: 28px; padding-bottom: 32px; }
.nk-header-fixed + .nk-content { margin-top: 72px; }

/* ---------- Cards ---------- */
.card {
    border-radius: var(--uv-radius);
    border: 1px solid var(--uv-line);
    box-shadow: var(--uv-shadow);
    background: var(--uv-card);
}
.card-bordered { border: 1px solid var(--uv-line); }
.card-inner { padding: 1.5rem; }
.card .card-title .title, .card .title { font-weight: 700; }
a > .card, .uv-lift { transition: transform .2s ease, box-shadow .2s ease; }
a:hover > .card, .uv-lift:hover { transform: translateY(-3px); box-shadow: var(--uv-shadow-lg); }
.card.bg-primary, .card.bg-info, .card.bg-success {
    border: 0;
    box-shadow: 0 18px 40px -18px rgba(20, 40, 75, .65);
    overflow: hidden;
    position: relative;
}
.card.bg-primary::after, .card.bg-info::after, .card.bg-success::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
}
.card-amount .amount { font-weight: 800; letter-spacing: -.01em; }

/* ---------- Buttons ---------- */
.btn { border-radius: var(--uv-radius-sm); font-weight: 700; letter-spacing: .01em; transition: all .2s ease; }
.btn-primary {
    background: var(--uv-gradient);
    border: 0;
    color: #fff;
    box-shadow: 0 8px 20px -10px rgba(20, 40, 75, .8);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:not(:disabled):not(.disabled):active {
    background: linear-gradient(135deg, var(--uv-navy-800), var(--uv-blue-600));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px -10px rgba(20, 40, 75, .85);
}
.btn-outline-primary { color: var(--uv-blue); border-color: rgba(35, 152, 201, .45); }
.btn-outline-primary:hover { background: var(--uv-blue); border-color: var(--uv-blue); color: #fff; }
.btn-outline-light { color: var(--uv-text); border-color: var(--uv-line); background: #fff; }
.btn-outline-light:hover { color: var(--uv-ink); background: #fff; border-color: #cfd9e8; box-shadow: var(--uv-shadow-sm); }
.btn-success { background: var(--uv-green); border-color: var(--uv-green); }
.btn-danger { background: var(--uv-red); border-color: var(--uv-red); }
.btn-info { background: var(--uv-blue); border-color: var(--uv-blue); }
.btn-gold { background: linear-gradient(135deg, #f4b324, #f7cf5d); border: 0; color: var(--uv-navy-900); }
.btn-gold:hover { color: var(--uv-navy-900); transform: translateY(-1px); }

/* ---------- Forms ---------- */
.form-control, .custom-select, .form-select {
    border-radius: var(--uv-radius-sm);
    border-color: #dde5f0;
    color: var(--uv-ink);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.form-control:focus, .custom-select:focus {
    border-color: var(--uv-blue);
    box-shadow: 0 0 0 4px rgba(35, 152, 201, .14);
}
.form-control::placeholder { color: #a9b6cb; }
.form-label { color: var(--uv-ink); font-weight: 600; }
.custom-control-input:checked ~ .custom-control-label::before { background-color: var(--uv-blue); border-color: var(--uv-blue); }
.invalid-feedback, .text-danger { color: var(--uv-red) !important; }

/* ---------- Tables ---------- */
.table { color: var(--uv-text); }
.table thead th {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--uv-muted);
    border-top: 0;
    border-bottom: 1px solid var(--uv-line);
    background: #f8fafd;
    white-space: nowrap;
}
.table td { border-top: 1px solid var(--uv-line); vertical-align: middle; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: #f8fbfe; }
.table-bordered, .table-bordered td, .table-bordered th { border-color: var(--uv-line); }
.table-striped tbody tr:nth-of-type(odd) { background-color: #fafcff; }
.thead-dark th { background: #f8fafd !important; color: var(--uv-muted) !important; border-color: var(--uv-line) !important; }
.datatable-wrap { border: 1px solid var(--uv-line); border-radius: 12px; overflow: hidden; }
.dataTables_wrapper .form-control,
.dataTables_wrapper .form-control-select select { border-radius: var(--uv-radius-sm); }
.page-link { border-radius: 8px !important; margin: 0 2px; border-color: var(--uv-line); color: var(--uv-text); }
.page-item.active .page-link { background: var(--uv-gradient); border-color: transparent; color: #fff; box-shadow: 0 6px 14px -6px rgba(20, 40, 75, .7); }

/* ---------- Badges & avatars ---------- */
.badge { border-radius: 30px; font-weight: 700; padding: .3em .75em; }
.badge-primary { background: var(--uv-blue); border-color: var(--uv-blue); }
.badge-dim.badge-primary { background: var(--uv-blue-50); color: var(--uv-blue-600); border-color: transparent; }
.badge-success { background: var(--uv-green); border-color: var(--uv-green); }
.badge-light { background: #eef2f8; color: var(--uv-text); border-color: transparent; }
.badge-dot { padding-left: 12px; background: transparent !important; }
.user-avatar { background: var(--uv-gradient); font-weight: 700; letter-spacing: .02em; }
.user-avatar.bg-primary { background: var(--uv-gradient) !important; }

/* ---------- Tabs / alerts / dropdowns / modals ---------- */
.nav-tabs { border-bottom: 1px solid var(--uv-line); }
.nav-tabs .nav-link { font-weight: 700; color: var(--uv-muted); }
.nav-tabs .nav-link.active { color: var(--uv-ink); }
.nav-tabs .nav-link:after { background: var(--uv-blue); }
.alert { border-radius: 12px; border: 0; box-shadow: var(--uv-shadow-sm); font-weight: 500; }
.alert-success { background: #e6f8f1; color: #0b7a59; }
.alert-danger { background: #fdecec; color: #b42328; }
.alert-warning { background: #fff6e0; color: #8a5a00; }
.alert-info { background: var(--uv-blue-50); color: var(--uv-blue-600); }
.dropdown-menu { border-radius: 14px; border: 1px solid var(--uv-line); box-shadow: var(--uv-shadow-lg); overflow: hidden; }
.link-list-opt a, .link-list a { font-weight: 600; }
.link-list-opt a:hover, .link-list a:hover { color: var(--uv-blue); background: var(--uv-blue-50); }
.modal-content { border-radius: 18px; border: 0; box-shadow: var(--uv-shadow-lg); }

/* ---------- Footer ---------- */
.nk-footer { background: transparent; border-top: 1px solid var(--uv-line); padding: 18px 0; }
.nk-footer p, .nk-footer .nav-link { color: var(--uv-muted); font-size: 13px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
    .nk-content-body > .nk-block,
    .nk-content-body > .nk-block-head {
        animation: uv-rise .5s cubic-bezier(.2, .7, .2, 1) both;
    }
    .nk-content-body > .nk-block:nth-child(2) { animation-delay: .05s; }
    .nk-content-body > .nk-block:nth-child(3) { animation-delay: .1s; }
    .nk-content-body > .nk-block:nth-child(4) { animation-delay: .15s; }
    .nk-content-body > .nk-block:nth-child(5) { animation-delay: .2s; }
}
@keyframes uv-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    .page-title { font-size: 1.4rem; }
    .card-inner { padding: 1.15rem; }
    .nk-content { padding-top: 18px; }
}

/* ---------- Specificity fixes ---------- */
.card.uvrg-hero {
    background: radial-gradient(1200px 400px at 110% -20%, rgba(95, 195, 234, .35), transparent 60%),
                linear-gradient(135deg, var(--uv-navy-900) 0%, var(--uv-navy) 40%, var(--uv-blue) 100%);
    border: 0;
    box-shadow: 0 30px 60px -30px rgba(11, 26, 51, .75);
}
.nk-body .user-avatar,
.nk-body .user-avatar.bg-primary { background: var(--uv-gradient) !important; color: #fff; }
.uv-brand-text small { font-size: 9.5px; letter-spacing: .05em; }

/* ==========================================================================
   Auth pages (login, register, password reset, verify email)
   ========================================================================== */
.uv-auth-body { background: #fff !important; }
.uv-auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }

.uv-auth-aside {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(900px 500px at 120% 0%, rgba(95, 195, 234, .35), transparent 60%),
        radial-gradient(700px 500px at -20% 110%, rgba(244, 179, 36, .18), transparent 60%),
        linear-gradient(160deg, var(--uv-navy-900) 0%, var(--uv-navy) 55%, #123a6b 100%);
}
.uv-auth-aside::before {
    /* subtle grid texture */
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 85%);
}
.uv-auth-aside-inner {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 44px 56px;
    max-width: 720px;
    margin: 0 auto;
}
.uv-auth-aside .uv-brand img { height: 42px; }
.uv-auth-pitch { margin: auto 0; padding: 48px 0; }
.uv-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 30px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    font-size: 13px;
    font-weight: 600;
}
.uv-auth-pitch h1 {
    color: #fff;
    font-size: clamp(2rem, 3.2vw, 2.9rem);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 18px 0 14px;
}
.uv-auth-pitch h1 em, .uv-auth-pitch h1 span { font-style: normal; color: var(--uv-sky); }
.uv-auth-pitch > p { color: rgba(255, 255, 255, .72); font-size: 1.05rem; max-width: 520px; }
.uv-auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.uv-auth-points li { display: flex; gap: 14px; align-items: flex-start; color: rgba(255, 255, 255, .7); font-size: 14px; }
.uv-auth-points li strong { display: block; color: #fff; font-size: 15px; }
.uv-auth-points .icon {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--uv-sky);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
}
.uv-auth-copy { color: rgba(255, 255, 255, .45); font-size: 13px; }

.uv-auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.uv-auth-card { width: 100%; max-width: 440px; }
.uv-auth-card h2 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.uv-auth-card .uv-auth-lead { color: var(--uv-muted); margin-bottom: 28px; }
.uv-auth-card .form-control-lg { height: 50px; font-size: 15px; }
.uv-auth-card .btn-lg { height: 52px; font-size: 15px; }
.uv-auth-card .form-group { margin-bottom: 18px; }
.uv-auth-switch { margin-top: 26px; text-align: center; color: var(--uv-muted); }
.uv-auth-switch a { font-weight: 700; }
.uv-auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 28px; text-decoration: none; }
.uv-auth-mobile-brand img { height: 40px; }
.uv-auth-mobile-brand span { font-weight: 800; color: var(--uv-navy); letter-spacing: .06em; font-size: 18px; }
.uv-referrer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--uv-blue-50);
    border: 1px solid rgba(35, 152, 201, .2);
    margin-bottom: 22px;
    color: var(--uv-ink);
}
.uv-referrer .user-avatar { width: 36px; height: 36px; font-size: 12px; }
.uv-referrer small { display: block; color: var(--uv-muted); }
.uv-field-error { display: block; margin-top: 6px; font-size: 13px; color: var(--uv-red); font-weight: 500; }
.uv-captcha { margin-bottom: 18px; }

/* Tablets and phones: the brand panel sits above the form instead of beside it */
@media (max-width: 991px) {
    .uv-auth { grid-template-columns: 1fr; min-height: 0; }
    .uv-auth-aside-inner { height: auto; padding: 28px 24px 32px; }
    .uv-auth-pitch { margin: 0; padding: 28px 0 0; }
    .uv-auth-pitch h1 { font-size: 1.75rem; margin: 14px 0 10px; }
    .uv-auth-pitch > p { font-size: .95rem; }
    .uv-auth-points { margin-top: 20px; gap: 12px; }
    .uv-auth-points .icon { flex-basis: 36px; height: 36px; font-size: 16px; }
    .uv-auth-copy { display: none; }
    .uv-auth-main { align-items: flex-start; padding: 32px 20px 48px; }
}
@media (max-width: 575px) {
    .uv-auth-points li span { font-size: 13px; }
    .uv-auth-points li strong { font-size: 14px; }
}
.form-control-wrap .form-icon-left ~ .form-control { padding-left: 2.75rem; }
.form-control-wrap .form-icon-right ~ .form-control { padding-right: 2.75rem; }
.uv-legend { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.link, .link-primary, .link-sm { color: var(--uv-blue) !important; font-weight: 600; }
.link:hover, .link-primary:hover { color: var(--uv-blue-600) !important; }
.uvrg-hero .btn-light { background: #fff; border: 0; color: var(--uv-navy); }
.uvrg-hero .btn-light:hover { background: #fff; color: var(--uv-blue); transform: translateY(-1px); }
.border-bottom { border-color: var(--uv-line) !important; }

/* Only the server-side .uv-active marks the current page (DashLite's script also adds .active on URL prefixes) */
.nk-sidebar .nk-menu > .nk-menu-item.active:not(.uv-active) > .nk-menu-link { background: transparent; box-shadow: none; color: rgba(255, 255, 255, .72); }
.nk-sidebar .nk-menu > .nk-menu-item.active:not(.uv-active) > .nk-menu-link .nk-menu-icon { color: rgba(255, 255, 255, .5); }
.nk-sidebar .nk-menu-sub .nk-menu-item.active:not(.uv-active) > .nk-menu-link { color: rgba(255, 255, 255, .6); }
.dataTables_wrapper .datatable-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* =====================================================================
   Tables (site-wide)
   One look for every table: data tables with search/export, list tables,
   detail tables on sales/invoice pages and plain tables in cards.
   ===================================================================== */

/* Card around data tables */
.dataTables_wrapper .datatable-wrap,
.datatable-wrap {
    background: var(--uv-card);
    border: 1px solid var(--uv-line);
    border-radius: var(--uv-radius);
    box-shadow: var(--uv-shadow);
    margin: 14px 0 !important;
}

/* The old template gave every cell its own shadow, which drew grey lines between columns */
.nk-tb-list .nk-tb-col,
.nk-tb-list .nk-tb-item,
table.dataTable td,
table.dataTable th { box-shadow: none !important; }
.nk-tb-list.is-separate { border-spacing: 0; margin-bottom: 0 !important; }
.nk-tb-list.is-separate .nk-tb-item > .nk-tb-col { background: transparent; }

/* Header row */
.table thead th,
.nk-tb-list .nk-tb-head .nk-tb-col,
table.dataTable thead th {
    background: #f6f9fd !important;
    color: #6b7d9b !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 13px 16px !important;
    border-top: 0 !important;
    border-bottom: 1px solid var(--uv-line) !important;
    white-space: nowrap;
    vertical-align: middle;
}
.nk-tb-list .nk-tb-head .nk-tb-col .sub-text,
.table thead th .sub-text { color: inherit !important; font-size: inherit !important; font-weight: inherit !important; letter-spacing: inherit; }
.datatable-wrap thead th:first-child { border-top-left-radius: var(--uv-radius); }
.datatable-wrap thead th:last-child { border-top-right-radius: var(--uv-radius); }

/* Sort arrows: quiet until the column is sorted */
table.dataTable thead > tr > th.sorting::before, table.dataTable thead > tr > th.sorting::after,
table.dataTable thead > tr > th.sorting_asc::before, table.dataTable thead > tr > th.sorting_asc::after,
table.dataTable thead > tr > th.sorting_desc::before, table.dataTable thead > tr > th.sorting_desc::after { opacity: .25; font-size: 11px; }
table.dataTable thead > tr > th.sorting_asc::before,
table.dataTable thead > tr > th.sorting_desc::after { opacity: 1; color: var(--uv-blue); }
table.dataTable thead > tr > th.sorting_asc,
table.dataTable thead > tr > th.sorting_desc { color: var(--uv-navy) !important; }

/* Body rows */
.table td,
.nk-tb-list .nk-tb-item .nk-tb-col,
table.dataTable tbody td {
    padding: 14px 16px !important;
    border-top: 0 !important;
    border-bottom: 1px solid var(--uv-line) !important;
    color: var(--uv-text);
    font-size: 14px;
    vertical-align: middle !important;
    font-variant-numeric: tabular-nums;
}
.table tbody tr:last-child td,
.nk-tb-list .nk-tb-item:last-child .nk-tb-col,
table.dataTable tbody tr:last-child td { border-bottom: 0 !important; }
.table tbody tr, .nk-tb-list .nk-tb-item { transition: background-color .12s ease; }
.table tbody tr:hover,
.nk-tb-list .nk-tb-item:not(.nk-tb-head):hover,
.nk-tb-list .nk-tb-item:not(.nk-tb-head):hover .nk-tb-col { background-color: #f5faff !important; }
.table td strong, .table td .tb-lead, .nk-tb-col .tb-lead, .tb-amount { color: var(--uv-ink); font-weight: 600; }
.table td a:not(.btn):not(.dropdown-toggle), .nk-tb-col a:not(.btn):not(.dropdown-toggle) { font-weight: 600; }
.table td .sub-text, .nk-tb-col .sub-text { font-size: 12.5px; color: var(--uv-muted); margin-top: 2px; }
.table-sm td, .table-sm th { padding: 10px 12px !important; }
.table-striped tbody tr:nth-of-type(odd) { background-color: #fafcff; }

/* Plain tables inside cards get the same rounded frame */
.card .table:not(.dataTable) { margin-bottom: 0; }
.card-inner > .table:not(.dataTable),
.card-inner > .table-responsive > .table:not(.dataTable) { border: 1px solid var(--uv-line); border-radius: 12px; border-collapse: separate; border-spacing: 0; overflow: hidden; }

/* Status words become soft pills */
.tb-status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: 30px;
    font-size: 12.5px; font-weight: 700; line-height: 1.4; white-space: nowrap;
    background: #eef2f7; color: var(--uv-text);
}
.tb-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tb-status.text-success { background: #e6f8f1; color: #0e9a6f !important; }
.tb-status.text-warning { background: #fff5e0; color: #c47f00 !important; }
.tb-status.text-danger { background: #fdecec; color: #d0383e !important; }
.tb-status.text-info, .tb-status.text-primary { background: var(--uv-blue-50); color: var(--uv-blue-600) !important; }
.badge-dim { font-size: 12px; padding: .38em .85em; }

/* Row action buttons ("...") */
.nk-tb-actions .btn-trigger, .nk-tb-col-tools .btn-trigger {
    width: 36px; height: 36px; border-radius: 10px; color: var(--uv-navy);
    display: inline-flex; align-items: center; justify-content: center;
}
.nk-tb-actions .btn-trigger:hover, .nk-tb-col-tools .btn-trigger:hover,
.nk-tb-col-tools .show > .btn-trigger { background: var(--uv-blue-50); color: var(--uv-blue); }
.nk-tb-actions .btn-trigger .icon, .nk-tb-col-tools .btn-trigger .icon { font-size: 20px; }
.link-list-opt a { font-weight: 600; padding: 10px 18px; }
.link-list-opt a .icon { font-size: 17px; color: var(--uv-blue); }

/* Search, page size and export controls above data tables */
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label { margin: 0; }
.dataTables_wrapper .dataTables_filter .form-control {
    height: 42px; min-width: 260px; padding-left: 40px;
    border: 1px solid var(--uv-line); border-radius: var(--uv-radius-sm); background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%238a9bb8' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: 13px center;
    box-shadow: var(--uv-shadow-sm);
}
.dataTables_wrapper .dataTables_filter .form-control:focus { border-color: var(--uv-blue); box-shadow: 0 0 0 3px rgba(35, 152, 201, .15); }
.dataTables_wrapper .dataTables_length .form-control-select select,
.dataTables_wrapper .dataTables_length select { height: 42px; border-radius: var(--uv-radius-sm); border-color: var(--uv-line); font-weight: 600; }
.dataTables_wrapper .dt-buttons .btn,
.dataTables_wrapper .dt-export-buttons .btn {
    height: 42px; min-width: 42px; background: #fff; border: 1px solid var(--uv-line); color: var(--uv-navy);
    box-shadow: var(--uv-shadow-sm);
}
.dataTables_wrapper .dt-buttons .btn:hover,
.dataTables_wrapper .dt-export-buttons .btn:hover { background: var(--uv-blue-50); color: var(--uv-blue); border-color: rgba(35, 152, 201, .35); }
.dataTables_wrapper .dt-export-title { font-weight: 600; color: var(--uv-muted); }
.dataTables_wrapper .dataTables_info { color: var(--uv-muted); font-size: 13px; padding-top: 0 !important; }
.dataTables_wrapper td.dataTables_empty { padding: 40px 16px !important; text-align: center; color: var(--uv-muted); }

/* Pagination */
.dataTables_wrapper .pagination { gap: 6px; flex-wrap: wrap; margin: 0; }
.dataTables_wrapper .page-link {
    min-width: 40px; height: 40px; padding: 0 12px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--uv-line); border-radius: 10px !important; margin: 0; font-weight: 600; color: var(--uv-navy); background: #fff;
}
.dataTables_wrapper .page-link:hover { background: var(--uv-blue-50); color: var(--uv-blue); border-color: rgba(35, 152, 201, .35); }
.dataTables_wrapper .page-item.active .page-link { color: #fff; border-color: transparent; }
.dataTables_wrapper .page-item.disabled .page-link { color: #b8c3d4; background: #fafcfe; }

/* Rows folded on small screens: the "+" control and the details under it */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    background: var(--uv-blue-50) !important; color: var(--uv-blue) !important; border: 0 !important; box-shadow: none !important;
    width: 20px; height: 20px; line-height: 20px; border-radius: 6px; font-weight: 700;
}
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control::before { background: var(--uv-blue) !important; color: #fff !important; }
table.dataTable > tbody > tr.child > td { background: #fafcff; padding: 6px 16px 12px !important; }
table.dataTable > tbody > tr.child ul.dtr-details { width: 100%; }
table.dataTable > tbody > tr.child ul.dtr-details > li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--uv-line); }
table.dataTable > tbody > tr.child ul.dtr-details > li:last-child { border-bottom: 0; }
table.dataTable > tbody > tr.child span.dtr-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--uv-muted); min-width: 0; }
table.dataTable > tbody > tr.child span.dtr-data { color: var(--uv-ink); text-align: right; }

/* Detail tables (sales form, invoice): label on the left, value on the right */
.invoice-bills .table-striped td:first-child { color: var(--uv-muted); font-weight: 500; width: 38%; }
.invoice-bills .table-striped td:last-child { color: var(--uv-ink); }

.table-responsive, .dataTables_wrapper .datatable-wrap { scrollbar-width: thin; }

/* ---------- Phones ---------- */
@media (max-width: 767px) {
    .dataTables_wrapper .datatable-wrap { border-radius: 12px; }
    .table td, .nk-tb-list .nk-tb-item .nk-tb-col, table.dataTable tbody td { padding: 12px 12px !important; font-size: 13.5px; }
    .table thead th, .nk-tb-list .nk-tb-head .nk-tb-col, table.dataTable thead th { padding: 11px 12px !important; }
    .dataTables_wrapper .dataTables_filter { width: 100%; }
    .dataTables_wrapper .dataTables_filter .form-control { min-width: 0; width: 100%; }
    .dataTables_wrapper .dataTables_info { text-align: center; padding-top: 10px !important; }
    .dataTables_wrapper .dataTables_paginate { display: flex; justify-content: center; }
}
@media (max-width: 575px) {
    /* Detail tables stack: label above value */
    .invoice-bills .table-striped, .invoice-bills .table-striped tbody, .invoice-bills .table-striped tr, .invoice-bills .table-striped td { display: block; width: 100% !important; }
    .invoice-bills .table-striped tr { padding: 10px 2px; border-bottom: 1px solid var(--uv-line); }
    .invoice-bills .table-striped td { border: 0 !important; padding: 0 8px !important; text-align: left !important; }
    .invoice-bills .table-striped td:first-child { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
    .invoice-bills .table-striped td:last-child { font-size: 15px; word-break: break-word; }
}

/* Dates and amounts (cells that carry a sort value) stay on one line */
table td[data-order] { white-space: nowrap; }

/* The template wrapper around data tables acted like a table and grew wider than the screen;
   keep it screen-width so extra columns fold behind the + on phones */
div.nk-tb-list { display: block; width: 100%; max-width: 100%; }
.dataTables_wrapper { max-width: 100%; }

/* ---------- Admin notification bell ---------- */
.uv-bell { position: relative; }
.uv-bell-count {
    position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 10px; background: var(--uv-red); color: #fff; font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
    animation: uv-bell-pop .4s ease;
}
@keyframes uv-bell-pop { from { transform: scale(.4); } to { transform: scale(1); } }
.uv-bell-menu { padding: 0; border-radius: var(--uv-radius); overflow: hidden; max-width: calc(100vw - 24px); }
.uv-bell-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--uv-navy); color: #fff; }
.uv-bell-head span { font-size: 12px; color: rgba(255, 255, 255, .75); }
.uv-bell-item { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--uv-line); color: var(--uv-ink); }
.uv-bell-item:hover { background: var(--uv-blue-50); color: var(--uv-ink); }
.uv-bell-item strong { display: block; font-size: 13.5px; }
.uv-bell-item small { display: block; color: var(--uv-muted); font-size: 12px; margin-top: 2px; }
.uv-bell-ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff4d6; color: #b07a00; font-size: 18px; }
.uv-bell-empty { padding: 26px 18px; text-align: center; color: var(--uv-muted); }
.uv-bell-empty .icon { color: var(--uv-green); font-size: 18px; vertical-align: -3px; }
.uv-bell-foot { display: block; padding: 12px 18px; text-align: center; font-weight: 700; color: var(--uv-blue); background: #fafcff; }
