@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

:root {
    --navy-blue: #001f3f;
    --navy-light: #003366;
    --brand-red: #D32F2F;
    --brand-red-hover: #B71C1C;
    --light-gray: #f8f9fa;
    --dark-text: #333;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-text);
}

button, input, select, textarea {
    font-family: inherit;
}

.bg-navy {
    background-color: var(--navy-blue) !important;
    color: white;
}

.text-navy {
    color: var(--navy-blue) !important;
}

.btn-primary {
    background-color: var(--navy-blue);
    border-color: var(--navy-blue);
}

.btn-primary:hover {
    background-color: var(--navy-light);
    border-color: var(--navy-light);
}

.btn-danger {
    background-color: var(--brand-red);
    border-color: var(--brand-red);
}

.btn-danger:hover {
    background-color: var(--brand-red-hover);
    border-color: var(--brand-red-hover);
}

.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 10px;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.navbar {
    background-color: var(--navy-blue) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
    color: white !important;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background:
        radial-gradient(1000px 500px at 10% 0%, rgba(45, 90, 136, 0.24), rgba(45, 90, 136, 0) 60%),
        radial-gradient(900px 520px at 90% 10%, rgba(217, 124, 90, 0.18), rgba(217, 124, 90, 0) 55%),
        linear-gradient(180deg, #f7f6f2 0%, #f3f0ea 100%);
}

.auth-card {
    width: min(460px, 100%);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.12);
    padding: 22px;
    backdrop-filter: blur(10px);
}

.auth-header {
    padding: 4px 0 10px 0;
}

.auth-logo {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 12px auto;
}

.auth-title {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.4px;
    color: #0a2747;
    font-size: 1.9rem;
}

.auth-subtitle {
    margin-top: 6px;
    color: rgba(15, 23, 42, 0.70);
    font-weight: 600;
    font-size: 0.95rem;
}

.auth-form .form-label {
    font-weight: 800;
    color: rgba(15, 23, 42, 0.80);
}

.auth-input {
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.04);
}

.auth-input:focus {
    border-color: rgba(45, 90, 136, 0.55);
    box-shadow: 0 0 0 4px rgba(45, 90, 136, 0.16);
}

.auth-input-group {
    border-radius: 16px;
    overflow: hidden;
}

.auth-eye-btn {
    width: 52px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-left: none;
    background: rgba(255, 255, 255, 0.90);
    color: rgba(15, 23, 42, 0.70);
}

.auth-eye-btn:hover {
    background: rgba(247, 242, 232, 0.95);
    color: rgba(15, 23, 42, 0.88);
}

.auth-submit {
    height: 48px;
    border-radius: 16px;
    font-weight: 900;
    letter-spacing: 0.2px;
}

.login-container {
    max-width: 400px;
    margin: 80px auto;
    padding: 20px;
}

.dashboard-stat {
    font-size: 2rem;
    font-weight: bold;
    color: var(--navy-blue);
}

.logo-img {
    max-height: 80px;
    margin-bottom: 20px;
}

.sidebar {
    min-height: 100vh;
    background-color: var(--navy-blue);
    color: white;
}

.sidebar a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    border-radius: 5px;
    margin-bottom: 5px;
}

.sidebar a:hover, .sidebar a.active {
    background-color: var(--brand-red);
    color: white;
}

.admin-shell {
    background: #f7f6f2;
    color: #0f172a;
}

.admin-layout {
    min-height: 100vh;
    display: flex;
    width: 100%;
}

.admin-sidebar {
    width: 280px;
    flex: 0 0 auto;
    background: linear-gradient(180deg, #0b1f3a 0%, #0a2747 55%, #0b1f3a 100%);
    color: rgba(255, 255, 255, 0.92);
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 14px 12px;
    border-right: 1px solid rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
}

.admin-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 14px 10px;
    position: relative;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    min-width: 0;
}

.admin-sidebar-brand img {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: contain;
    background: transparent;
    padding: 0;
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.25);
}

.admin-sidebar-brand span {
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-sidebar-toggle {
    margin-left: auto;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
}

.admin-nav {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
    border: 1px solid transparent;
}

.admin-nav a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.admin-nav a.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.admin-nav .admin-nav-text {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-sidebar-footer {
    margin-top: auto;
    padding: 12px 10px 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-width: 0;
}

.admin-user-chip .admin-user-meta {
    min-width: 0;
}

.admin-user-chip .admin-user-name {
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-chip .admin-user-role {
    font-size: 0.78rem;
    opacity: 0.85;
}

.admin-logout {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(211, 47, 47, 0.16);
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
}

.admin-main {
    flex: 1 1 auto;
    padding: 18px 18px 40px 18px;
    min-width: 0;
}

.admin-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-mobile-toggle {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
    display: none;
    align-items: center;
    justify-content: center;
}

.admin-page-title {
    font-weight: 800;
    letter-spacing: -0.2px;
    margin: 0;
}

.admin-topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-search {
    width: min(520px, 48vw);
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
}

.admin-search input {
    border: none;
    outline: none;
    width: 100%;
    height: 100%;
    background: transparent;
}

.admin-control-btn {
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.admin-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.06);
    overflow: hidden;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88));
}

.admin-card-title {
    font-weight: 800;
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.2px;
}

.admin-card-body {
    padding: 14px 16px 16px 16px;
}

.admin-stat {
    grid-column: span 3;
    padding: 14px 16px 16px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-stat .admin-stat-label {
    font-size: 0.84rem;
    opacity: 0.75;
    margin-bottom: 2px;
}

.admin-stat .admin-stat-value {
    font-size: clamp(1.25rem, 4.8vw, 1.7rem);
    font-weight: 900;
    letter-spacing: -0.4px;
    margin: 0;
}

.admin-stat .admin-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 39, 71, 0.08);
    color: #0a2747;
    font-size: 1.4rem;
}

.admin-quick {
    grid-column: span 12;
}

.admin-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.admin-quick a {
    text-decoration: none;
    color: inherit;
}

.admin-quick-tile {
    border-radius: 18px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: linear-gradient(180deg, rgba(10, 39, 71, 0.06), rgba(10, 39, 71, 0.02));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.admin-quick-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.10);
}

.admin-quick-tile .admin-quick-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.admin-quick-tile .admin-quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.80);
    border: 1px solid rgba(15, 23, 42, 0.10);
    color: #0a2747;
    font-size: 1.25rem;
}

.admin-quick-tile .admin-quick-title {
    font-weight: 800;
    margin: 0;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-quick-tile .admin-quick-sub {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.75;
}

.admin-charts {
    grid-column: span 8;
}

.admin-sidepanel {
    grid-column: span 4;
}

.admin-table td, .admin-table th {
    vertical-align: middle;
}

.admin-cell-nowrap {
    white-space: nowrap;
}

.admin-cell-clip {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-cell-value {
    min-width: 0;
}

.admin-cell-value-wrap {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.vendor-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.vendor-cal-title {
    font-weight: 900;
    color: rgba(15, 23, 42, 0.84);
    text-transform: capitalize;
}

.vendor-cal-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.92);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vendor-calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
    color: rgba(15, 23, 42, 0.55);
    font-weight: 900;
    font-size: 0.78rem;
    text-align: center;
}

.vendor-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.vendor-cal-day {
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.92);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.78);
    position: relative;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.vendor-cal-empty {
    border-color: transparent;
    background: transparent;
}

.vendor-cal-day:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.08);
}

.vendor-cal-day.is-today {
    border-color: rgba(45, 90, 136, 0.40);
    box-shadow: 0 12px 26px rgba(45, 90, 136, 0.12);
}

.vendor-cal-day.has-sales::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 99px;
    position: absolute;
    bottom: 6px;
    background: rgba(211, 47, 47, 0.75);
}

.vendor-cal-day.pace-danger::after {
    background: rgba(239, 68, 68, 0.88);
}

.vendor-cal-day.pace-warning::after {
    background: rgba(245, 158, 11, 0.92);
}

.vendor-cal-day.pace-success::after {
    background: rgba(22, 163, 74, 0.90);
}

.vendor-cal-badge {
    position: absolute;
    top: 5px;
    right: 6px;
    font-size: 0.62rem;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.72);
    letter-spacing: 0.2px;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 999px;
    padding: 2px 6px;
    line-height: 1;
    pointer-events: none;
}

.vendor-cal-day.selected {
    background: rgba(10, 39, 71, 0.08);
    border-color: rgba(10, 39, 71, 0.22);
}

@media (max-width: 420px) {
    .vendor-calendar-grid { gap: 6px; }
    .vendor-calendar-week { gap: 6px; }
    .vendor-cal-day { height: 40px; border-radius: 13px; }
    .vendor-cal-badge { top: 4px; right: 5px; font-size: 0.58rem; padding: 2px 5px; }
}

.vendor-day-panel {
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: linear-gradient(180deg, rgba(10, 39, 71, 0.04), rgba(10, 39, 71, 0.01));
    padding: 14px;
}

.vendor-goal-card {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(16px);
}

.vendor-goal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 12px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.vendor-goal-title {
    font-weight: 950;
    font-size: 1.05rem;
    color: rgba(15, 23, 42, 0.92);
}

.vendor-goal-sub {
    font-weight: 850;
    color: rgba(15, 23, 42, 0.58);
}

.vendor-goal-pct {
    font-weight: 980;
    font-size: 1.25rem;
    color: rgba(15, 23, 42, 0.92);
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 999px;
    padding: 8px 12px;
    line-height: 1;
}

.vendor-goal-body {
    padding: 14px 16px 16px 16px;
}

.vendor-goal-kpi {
    height: 100%;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.55);
    padding: 14px;
}

.vendor-goal-amount {
    font-weight: 980;
    font-size: 1.65rem;
    color: rgba(15, 23, 42, 0.92);
    line-height: 1.1;
}

.vendor-goal-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vendor-goal-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.82);
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.10);
    letter-spacing: 0.2px;
}

.vendor-goal-bar {
    margin-top: 12px;
    height: 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.vendor-goal-bar-fill {
    height: 100%;
    border-radius: 999px;
    width: 0%;
}

.vendor-goal-chart {
    height: 100%;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.55);
    padding: 10px 12px;
}

.vendor-goal-ring-wrap {
    height: 100%;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.55);
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vendor-goal-ring {
    width: 176px;
    height: 176px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.10);
}

.vendor-goal-ring-inner {
    width: 132px;
    height: 132px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.10);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.vendor-goal-ring-pct {
    font-weight: 990;
    font-size: 2.05rem;
    line-height: 1;
    color: rgba(15, 23, 42, 0.92);
}

.vendor-goal-ring-sub {
    margin-top: 6px;
    font-weight: 850;
    font-size: 0.9rem;
    color: rgba(15, 23, 42, 0.60);
}

.vendor-goal-panel {
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.55);
    padding: 14px;
}

.vendor-goal-panel-title {
    font-weight: 950;
    color: rgba(15, 23, 42, 0.86);
}

.vendor-goal-notifications {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.vendor-goal-note {
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.55);
    padding: 12px 12px;
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.06);
}

.vendor-goal-note-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.vendor-goal-note-title {
    font-weight: 950;
    color: rgba(15, 23, 42, 0.90);
    line-height: 1.15;
}

.vendor-goal-note-badge {
    flex: 0 0 auto;
    font-weight: 950;
    font-size: 0.72rem;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.10);
    color: rgba(15, 23, 42, 0.80);
    text-transform: uppercase;
    letter-spacing: 0.35px;
}

.vendor-goal-note-body {
    margin-top: 6px;
    font-weight: 850;
    color: rgba(15, 23, 42, 0.80);
    line-height: 1.25;
}

.vendor-goal-note-meta {
    margin-top: 7px;
    font-weight: 850;
    font-size: 0.82rem;
    color: rgba(15, 23, 42, 0.62);
}

.vendor-goal-notifications[data-goal-status="warning"] .vendor-goal-note {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(255, 255, 255, 0.60));
    border-color: rgba(245, 158, 11, 0.26);
}

.vendor-goal-notifications[data-goal-status="danger"] .vendor-goal-note {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.20), rgba(255, 255, 255, 0.60));
    border-color: rgba(239, 68, 68, 0.26);
}

.vendor-goal-notifications[data-goal-status="success"] .vendor-goal-note {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.16), rgba(255, 255, 255, 0.60));
    border-color: rgba(22, 163, 74, 0.24);
}

.vendor-goal-notifications[data-goal-status="info"] .vendor-goal-note {
    background: linear-gradient(135deg, rgba(10, 39, 71, 0.10), rgba(255, 255, 255, 0.60));
    border-color: rgba(10, 39, 71, 0.18);
}

.vendor-tint-success {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.16), rgba(255, 255, 255, 0.52));
    border-color: rgba(22, 163, 74, 0.24);
}

.vendor-tint-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.20), rgba(255, 255, 255, 0.52));
    border-color: rgba(245, 158, 11, 0.28);
}

.vendor-tint-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.28), rgba(255, 255, 255, 0.52));
    border-color: rgba(239, 68, 68, 0.34);
}

.vendor-tint-secondary {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.14), rgba(255, 255, 255, 0.52));
    border-color: rgba(100, 116, 139, 0.18);
}

.vendor-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
}

.vendor-card {
    grid-column: span 6;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #fff;
    overflow: hidden;
}

@media (max-width: 992px) {
    .vendor-card {
        grid-column: span 12;
    }
}

.vendor-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 0 14px;
}

.vendor-card-body {
    padding: 12px 14px 14px 14px;
}

.vendor-name {
    font-weight: 950;
    font-size: 1.05rem;
    color: #0a2747;
    line-height: 1.1;
}

.vendor-user {
    font-weight: 800;
    color: #64748b;
    font-size: 0.86rem;
}

.ring {
    width: 74px;
    height: 74px;
    border-radius: 999px;
    display: grid;
    place-items: center;
}

.ring-inner {
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: #fff;
    display: grid;
    place-items: center;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.ring-pct {
    font-weight: 950;
    font-size: 1.02rem;
    color: #0f172a;
}

.kv {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.kv .k {
    color: #64748b;
    font-weight: 800;
}

.kv .v {
    color: #0f172a;
    font-weight: 950;
}

.hint {
    color: #64748b;
    font-weight: 800;
    font-size: 0.86rem;
    margin-top: 10px;
}

.vendor-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: 10px;
}

.month-strip {
    display: flex;
    gap: 10px;
    overflow: auto;
    padding-bottom: 4px;
}

.month-chip {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    white-space: nowrap;
    color: #0f172a;
    text-decoration: none;
}

.month-chip.active {
    background: #0a2747;
    color: #fff;
    border-color: #0a2747;
}

.month-chip.month-chip-soft {
    background: rgba(255, 255, 255, 0.65);
}

.month-picker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.month-picker {
    position: relative;
    display: inline-flex;
}

.month-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: rgba(255, 255, 255, 0.92);
    color: rgba(15, 23, 42, 0.88);
    font-weight: 900;
    text-decoration: none;
    max-width: 100%;
    box-shadow: 0 10px 30px rgba(2, 8, 23, 0.06);
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.month-picker-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(10, 39, 71, 0.28);
    box-shadow: 0 14px 34px rgba(2, 8, 23, 0.10);
}

.month-picker-btn:active {
    transform: translateY(0);
}

.month-picker-btn.is-open {
    border-color: rgba(10, 39, 71, 0.40);
    background: #ffffff;
}

.month-picker-label {
    white-space: nowrap;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.month-picker-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 80;
    width: 340px;
    max-width: min(92vw, 340px);
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 23, 42, 0.10);
    box-shadow: 0 20px 60px rgba(2, 8, 23, 0.18);
    backdrop-filter: blur(10px);
}

.month-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.month-picker-year {
    font-weight: 950;
    color: rgba(15, 23, 42, 0.90);
    letter-spacing: -0.01em;
}

.month-picker-nav {
    display: inline-flex;
    gap: 8px;
}

.month-picker-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(248, 250, 252, 0.92);
    color: rgba(15, 23, 42, 0.86);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.month-picker-nav-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(10, 39, 71, 0.24);
    background: rgba(226, 232, 240, 0.92);
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.month-grid-btn {
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(248, 250, 252, 0.92);
    color: rgba(15, 23, 42, 0.86);
    font-weight: 900;
    padding: 12px 10px;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.month-grid-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(10, 39, 71, 0.24);
    background: rgba(226, 232, 240, 0.92);
}

.month-grid-btn.is-active {
    background: #0a2747;
    border-color: #0a2747;
    color: #ffffff;
}

.month-picker-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
}

.month-picker-foot-btn {
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: rgba(15, 23, 42, 0.86);
    font-weight: 900;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.month-picker-foot-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(10, 39, 71, 0.24);
    background: rgba(248, 250, 252, 0.92);
}

.month-picker-links {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.month-picker-link {
    text-decoration: none;
    border-radius: 999px;
    padding: 8px 12px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.65);
    color: rgba(15, 23, 42, 0.86);
    font-weight: 900;
}

.month-picker-link:hover {
    border-color: rgba(10, 39, 71, 0.24);
    background: rgba(255, 255, 255, 0.9);
}

.vendor-day-title {
    font-weight: 900;
    color: rgba(15, 23, 42, 0.84);
}

.vendor-day-sub {
    margin-top: 2px;
    color: rgba(15, 23, 42, 0.62);
    font-weight: 700;
    font-size: 0.86rem;
}

.vendor-day-total {
    font-weight: 900;
    font-size: 1.15rem;
    color: #0a2747;
}

.vendor-sale-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.08);
    margin-bottom: 8px;
}

.vendor-sale-row:last-child {
    margin-bottom: 0;
}

.vendor-sale-left {
    min-width: 0;
}

.vendor-sale-client {
    font-weight: 900;
    color: rgba(15, 23, 42, 0.82);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vendor-sale-meta {
    font-weight: 700;
    font-size: 0.84rem;
    color: rgba(15, 23, 42, 0.58);
}

.vendor-sale-amount {
    font-weight: 900;
    color: rgba(15, 23, 42, 0.80);
}

.vendor-sale-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.vendor-sale-tags {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge-pay {
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 900;
    letter-spacing: 0.2px;
    border: 1px solid rgba(15, 23, 42, 0.10);
}

.badge-pay-cash {
    background: rgba(91, 168, 154, 0.18);
    color: rgba(15, 23, 42, 0.86);
    border-color: rgba(91, 168, 154, 0.36);
}

.badge-pay-card {
    background: rgba(45, 90, 136, 0.18);
    color: rgba(15, 23, 42, 0.86);
    border-color: rgba(45, 90, 136, 0.36);
}

.badge-ship {
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 900;
    letter-spacing: 0.2px;
    background: rgba(217, 124, 90, 0.16);
    color: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(217, 124, 90, 0.34);
}

.badge-vendor {
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 900;
    letter-spacing: 0.2px;
    background: rgba(10, 39, 71, 0.08);
    color: rgba(10, 39, 71, 0.92);
    border: 1px solid rgba(10, 39, 71, 0.18);
}

body.admin-sidebar-collapsed .admin-sidebar {
    width: 92px;
    padding: 14px 10px;
}

body.admin-sidebar-collapsed .admin-sidebar-brand span,
body.admin-sidebar-collapsed .admin-nav .admin-nav-text,
body.admin-sidebar-collapsed .admin-logout .admin-nav-text,
body.admin-sidebar-collapsed .admin-user-chip .admin-user-meta {
    display: none;
}

body.admin-sidebar-collapsed .admin-sidebar-toggle i {
    transform: rotate(180deg);
}

body.admin-sidebar-collapsed .admin-sidebar-header {
    padding: 10px 8px 12px 8px;
    justify-content: center;
}

body.admin-sidebar-collapsed .admin-sidebar-brand img {
    width: 40px;
    height: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.30);
}

body.admin-sidebar-collapsed .admin-sidebar-toggle {
    position: absolute;
    right: 8px;
    top: 8px;
    margin-left: 0;
    width: 40px;
    height: 40px;
    border-radius: 16px;
}

body.admin-sidebar-collapsed .admin-nav {
    margin-top: 14px;
    gap: 10px;
    align-items: center;
}

body.admin-sidebar-collapsed .admin-nav a {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 18px;
}

body.admin-sidebar-collapsed .admin-nav a i {
    width: auto;
    font-size: 1.25rem;
}

body.admin-sidebar-collapsed .admin-sidebar-footer {
    padding: 12px 8px 10px 8px;
    align-items: center;
}

body.admin-sidebar-collapsed .admin-user-chip {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 18px;
}

body.admin-sidebar-collapsed .admin-logout {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 18px;
    gap: 0;
}

.admin-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
    z-index: 40;
}

body.admin-sidebar-open .admin-sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 992px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 50;
        transform: translateX(-110%);
        box-shadow: 0 30px 80px rgba(2, 6, 23, 0.22);
    }

    body.admin-sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-mobile-toggle {
        display: inline-flex;
    }

    .admin-search {
        width: 100%;
        max-width: 520px;
    }

    .admin-topbar {
        flex-wrap: wrap;
    }

    .admin-topbar-right {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .admin-topbar-actions-2col {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        align-items: center;
    }

    .admin-topbar-actions-2col > * {
        width: 100%;
    }

    .admin-topbar-actions-2col .dropdown {
        width: 100%;
    }

    .admin-topbar-actions-2col .dropdown > .btn {
        width: 100%;
    }

    .admin-topbar-actions-2col .btn.btn-primary {
        grid-column: 1 / -1;
    }

    .admin-search {
        flex: 1 1 100%;
    }

    .admin-topbar-right .admin-control-btn {
        width: 100%;
    }

    .admin-stat {
        grid-column: span 12 !important;
    }
}

@media (max-width: 768px) {
    .admin-topbar-left {
        width: 100%;
    }

    .admin-search {
        max-width: none;
    }

    .admin-grid > * {
        grid-column: span 12 !important;
    }

    .admin-stat {
        grid-column: span 12 !important;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 10px;
        font-size: 0.92rem;
    }

    .admin-cell-clip {
        max-width: 180px;
    }

    #myClientsTable th:nth-child(2),
    #myClientsTable td:nth-child(2) {
        min-width: 130px;
    }

    #myClientsTable th:nth-child(3),
    #myClientsTable td:nth-child(3) {
        min-width: 190px;
    }

    #clientsTable thead,
    #myClientsTable thead,
    #salesTable thead,
    #usersTable thead {
        display: none;
    }

    #clientsTable,
    #clientsTable tbody,
    #clientsTable tr,
    #clientsTable td,
    #myClientsTable,
    #myClientsTable tbody,
    #myClientsTable tr,
    #myClientsTable td,
    #salesTable,
    #salesTable tbody,
    #salesTable tr,
    #salesTable td,
    #usersTable,
    #usersTable tbody,
    #usersTable tr,
    #usersTable td {
        display: block;
        width: 100%;
    }

    #clientsTable,
    #myClientsTable,
    #salesTable,
    #usersTable {
        border: 0;
    }

    #clientsTable tr,
    #myClientsTable tr,
    #salesTable tr,
    #usersTable tr {
        background: #ffffff;
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 10px 26px rgba(2, 6, 23, 0.06);
        margin-bottom: 12px;
    }

    #clientsTable td,
    #myClientsTable td,
    #salesTable td,
    #usersTable td {
        border: 0;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 14px;
        padding: 10px 12px;
    }

    #clientsTable td:last-child,
    #myClientsTable td:last-child,
    #salesTable td:last-child,
    #usersTable td:last-child {
        border-bottom: 0;
    }

    #clientsTable td::before,
    #myClientsTable td::before,
    #salesTable td::before,
    #usersTable td::before {
        content: attr(data-label);
        flex: 0 0 42%;
        font-weight: 800;
        color: #0a2747;
        font-size: 0.84rem;
    }

    #clientsTable td > .admin-cell-value,
    #clientsTable td > .badge,
    #myClientsTable td > .admin-cell-value,
    #myClientsTable td > .badge,
    #salesTable td > .admin-cell-value,
    #salesTable td > .badge,
    #usersTable td > .admin-cell-value,
    #usersTable td > .badge {
        margin-left: auto;
        max-width: 58%;
        text-align: right;
    }

    .admin-quick {
        grid-column: span 12;
    }

    .admin-charts {
        grid-column: span 12;
    }

    .admin-sidepanel {
        grid-column: span 12;
    }

    .admin-quick-grid {
        grid-template-columns: 1fr;
    }

    .admin-main {
        padding: 14px 14px 30px 14px;
    }
}

@media (max-width: 420px) {
    .admin-page-title {
        font-size: 1.55rem;
    }
}
