@font-face {
    font-family: 'Inter';
    src: url('../vendor/fonts/inter/inter-latin-400-normal.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../vendor/fonts/inter/inter-latin-500-normal.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../vendor/fonts/inter/inter-latin-600-normal.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../vendor/fonts/inter/inter-latin-700-normal.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --sidebar-width: 286px;
    --topbar-height: 72px;
    --card-radius: 20px;

    --body-bg: #eef3f8;
    --text-main: #0f172a;
    --text-muted: #64748b;

    --sidebar-gradient: linear-gradient(180deg, #0f172a 0%, #172554 42%, #1e3a8a 100%);
    --sidebar-hover: rgba(255, 255, 255, 0.10);
    --sidebar-active: linear-gradient(135deg, #f97316, #ea580c);

    --topbar-bg: rgba(255, 255, 255, 0.88);
    --border-soft: rgba(148, 163, 184, 0.18);

    --card-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --card-shadow-hover: 0 22px 50px rgba(15, 23, 42, 0.12);
}

html,
body {
    min-height: 100%;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 20%),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.08), transparent 24%),
        var(--body-bg);
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

.object-fit-cover {
    object-fit: cover;
}

/* =========================
   PREMIUM LOGIN UI
========================= */

.auth-page {
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 24%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.18), transparent 26%),
        linear-gradient(135deg, #0b1220 0%, #132238 38%, #1d3a5f 68%, #0f172a 100%);
}

.auth-shell {
    width: 100%;
    max-width: 380px;
}

.auth-card-premium {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 24px;
    padding: 28px 22px 20px;
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 50px rgba(0,0,0,.28);
}

.auth-top-shape {
    position: absolute;
    top: -55px;
    right: -55px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,126,95,.95), rgba(254,180,123,.50));
    filter: blur(10px);
    opacity: .72;
}

.auth-header {
    position: relative;
    z-index: 2;
    margin-bottom: 1.2rem;
    text-align: center;
}

.login-brand-badge,
.premium-badge {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 14px 28px rgba(255, 126, 95, .30);
}

.auth-title {
    color: #fff;
    font-size: 1.55rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -.02em;
}

.auth-subtitle {
    color: rgba(255,255,255,.76);
    margin-bottom: 0;
    font-size: .86rem;
    line-height: 1.5;
}

.auth-label {
    color: rgba(255,255,255,.92);
    font-weight: 600;
    font-size: .92rem;
    margin-bottom: .4rem;
}

.auth-input-group {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.70);
    z-index: 3;
    font-size: .95rem;
}

.auth-input {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.08);
    color: #fff;
    padding-left: 42px;
    padding-right: 42px;
    box-shadow: none;
    font-size: .95rem;
}

.auth-input::placeholder {
    color: rgba(255,255,255,.48);
}

.auth-input:focus {
    background: rgba(255,255,255,.13);
    border-color: rgba(255,255,255,.22);
    color: #fff;
    box-shadow: 0 0 0 .18rem rgba(255,255,255,.05);
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.78);
    z-index: 3;
    width: 30px;
    height: 30px;
}

.auth-password-toggle:hover {
    color: #fff;
}

.auth-login-btn {
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff7e5f, #f97316, #fb923c);
    box-shadow: 0 12px 24px rgba(249, 115, 22, .28);
    transition: all .2s ease;
}

.auth-login-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(249, 115, 22, .30);
}

.auth-footer-note small {
    color: rgba(255,255,255,.76);
    line-height: 1.65;
    font-size: .78rem;
}

.auth-footer-note strong {
    color: #fff;
    font-weight: 700;
}

.auth-card-premium .alert {
    position: relative;
    z-index: 2;
    padding: .8rem 1rem;
    font-size: .9rem;
}

/* =========================
   SIDEBAR
========================= */

.admin-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    color: #fff;
    background: var(--sidebar-gradient);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.24);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 24px;
}

.admin-sidebar::-webkit-scrollbar {
    width: 8px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 20px;
}

.sidebar-brand {
    padding: 1.15rem 1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-box {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.sidebar-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.sidebar-brand-text h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.sidebar-brand-text small {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.66);
}

.admin-sidebar .nav-section-title {
    padding: 1rem 1rem 0.45rem;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.admin-sidebar .nav-link {
    margin: 0.22rem 0.75rem;
    padding: 0.78rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.78rem;
    border-radius: 14px;
    color: #dbe7ff;
    font-weight: 500;
    position: relative;
    transition: all 0.22s ease;
}

.admin-sidebar .nav-link:hover {
    color: #fff;
    background: var(--sidebar-hover);
    transform: translateX(3px);
}

.admin-sidebar .nav-link.active {
    color: #fff;
    background: var(--sidebar-active);
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.28);
}

.admin-sidebar .nav-link i {
    width: 20px;
    font-size: 1.05rem;
    text-align: center;
}

.admin-sidebar .menu-text {
    flex: 1;
}

.admin-sidebar .menu-caret {
    font-size: 0.8rem;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.admin-sidebar .nav-link[aria-expanded="true"] .menu-caret {
    transform: rotate(180deg);
}

.sidebar-submenu {
    margin: 0.15rem 0.45rem 0.45rem;
    padding: 0.25rem 0 0.2rem 0.4rem;
    border-left: 1px dashed rgba(255, 255, 255, 0.14);
}

.sidebar-submenu .nav-link {
    margin: 0.15rem 0.2rem 0.15rem 0.6rem;
    padding: 0.62rem 0.82rem;
    font-size: 0.94rem;
    border-radius: 12px;
}

/* =========================
   MAIN LAYOUT
========================= */

.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.page-content {
    padding: 1.25rem;
}

/* =========================
   TOPBAR
========================= */

.admin-topbar {
    height: var(--topbar-height);
    padding: 0 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
    background: var(--topbar-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.04);
}

.topbar-title h5 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.topbar-title small {
    color: var(--text-muted);
}

.mobile-topbar-btn {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-size: 1.2rem;
}

.topbar-user {
    padding: 0.35rem 0.45rem;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.topbar-user:hover {
    background: rgba(148, 163, 184, 0.10);
}

.topbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(37, 99, 235, 0.14);
}

/* =========================
   CARDS
========================= */

.content-card,
.dashboard-card {
    border: 0;
    border-radius: var(--card-radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--card-shadow);
}

.content-card:hover,
.dashboard-card:hover {
    box-shadow: var(--card-shadow-hover);
}

.dashboard-card {
    position: relative;
}

.dashboard-card .card-body {
    padding: 1rem;
}

.dashboard-card .stat-label {
    margin-bottom: 0.2rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.82rem;
}

.dashboard-card .stat-value {
    margin-bottom: 0;
    color: #fff;
    font-size: 1.45rem;
    font-weight: 700;
}

.dashboard-card .icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
}

.dashboard-card::after {
    content: "";
    position: absolute;
    top: -22px;
    right: -22px;
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.card-spares {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.card-stock {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.card-sales {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.card-users {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.card-purchase {
    background: linear-gradient(135deg, #0f766e, #059669);
}

.card-expense {
    background: linear-gradient(135deg, #475569, #334155);
}

.dashboard-hero {
    padding: 1.4rem 1.5rem;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 22%),
        radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.12), transparent 25%),
        rgba(255,255,255,.88);
    box-shadow: var(--card-shadow);
}

.dashboard-hero h3 {
    font-weight: 700;
    color: var(--text-main);
}

.chart-badge {
    font-size: .75rem;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    padding: .45rem .75rem;
    border-radius: 999px;
}

.dashboard-stock-list .list-group-item + .list-group-item {
    border-top: 1px solid rgba(148, 163, 184, 0.15) !important;
}

/* =========================
   ALERTS
========================= */

.alert-modern {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

/* =========================
   TABLES
========================= */

.table-responsive {
    border-radius: 16px;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.table tbody td {
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(148, 163, 184, 0.08);
}

/* =========================
   BUTTONS
========================= */

.btn {
    border-radius: 12px;
    font-weight: 600;
}

.btn-dark {
    border: 0;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.btn-dark:hover {
    background: linear-gradient(135deg, #111827, #0f172a);
}

.btn-outline-dark:hover,
.btn-outline-secondary:hover {
    transform: translateY(-1px);
}

.topbar-action-btn {
    border: 0;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-weight: 600;
}

.topbar-action-btn:hover {
    background: rgba(37, 99, 235, 0.14);
    color: #1e40af;
}

/* =========================
   FORMS
========================= */

.form-control,
.form-select {
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 0.18rem rgba(37, 99, 235, 0.10);
}

/* =========================
   PAGINATION
========================= */

.pagination {
    gap: 0.35rem;
}

.page-link {
    min-width: 40px;
    border: 0;
    border-radius: 12px !important;
    text-align: center;
    color: #334155;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.page-link:hover {
    color: #0f172a;
    background: #e2e8f0;
}

.page-item.active .page-link {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* =========================
   OFFCANVAS
========================= */

.admin-offcanvas {
    width: 290px !important;
    background: transparent;
}

.admin-offcanvas .offcanvas-body {
    padding: 0;
}

.admin-offcanvas .admin-sidebar {
    position: static;
    display: block;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    overflow-y: auto;
}

/* =========================
   UTILITIES
========================= */

.pos-product-card {
    transition: .2s ease;
}

.pos-product-card:hover {
    transform: translateY(-2px);
}

#salesBarChart,
#financeLineChart {
    width: 100% !important;
    min-height: 280px;
}

.barcode-preview-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px dashed rgba(148, 163, 184, .35);
    border-radius: 16px;
}

.system-footer {
    border-top: 1px solid rgba(148, 163, 184, .14);
    color: #64748b;
    background: transparent;
    margin-top: 1rem;
}

.system-footer small {
    font-size: .83rem;
}

/* =========================
   PRINT
========================= */

@media print {
    .admin-topbar,
    .admin-sidebar,
    .btn,
    .offcanvas,
    .nav-section-title {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
    }

    .page-content {
        padding: 0 !important;
    }

    body {
        background: #fff !important;
    }

    .content-card,
    .dashboard-card {
        border: 0 !important;
        box-shadow: none !important;
    }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 991.98px) {
    .admin-sidebar {
        position: static;
        display: block;
        width: 100%;
        min-height: auto;
        height: auto;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .page-content {
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    .auth-shell {
        max-width: 100%;
    }

    .auth-card-premium {
        padding: 24px 18px 18px;
        border-radius: 20px;
    }

    .auth-title {
        font-size: 1.35rem;
    }

    .auth-subtitle {
        font-size: .82rem;
    }

    .premium-badge {
        width: 58px;
        height: 58px;
        font-size: 22px;
    }

}