/* Payter CUG – Application Styles */
:root {
    --sidebar-width: 250px;
    --sidebar-bg: #1a1f2e;
    --sidebar-text: #c9d1d9;
    --sidebar-active: #4f8ef7;
    --topbar-height: 56px;
    --accent: #4f8ef7;
    --accent-dark: #2563eb;
}

body {
    background: #f0f2f5;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* ---- Impersonation bar ---- */
.impersonation-bar {
    background: #f59e0b;
    color: #1a1f2e;
    text-align: center;
    padding: 6px 16px;
    font-weight: 600;
    font-size: .9rem;
    position: sticky;
    top: 0;
    z-index: 1050;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    transition: width .25s;
}

.sidebar.collapsed { width: 0; overflow: hidden; }

.sidebar-brand {
    padding: 18px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-logo {
    max-width: 160px;
    height: auto;
}

.sidebar-nav { padding: 12px 0; flex: 1; }

.sidebar-heading {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7280;
    padding: 16px 16px 4px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 6px;
    margin: 1px 8px;
    font-size: .88rem;
    transition: background .15s, color .15s;
}

.sidebar-nav li a:hover,
.sidebar-nav li.active a {
    background: rgba(79,142,247,.18);
    color: var(--sidebar-active);
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: .85rem;
    border-radius: 6px;
    transition: background .15s;
}

.sidebar-footer a:hover { background: rgba(255,255,255,.08); }

/* ---- Topbar ---- */
.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ---- Cards ---- */
.stat-card {
    border: none;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { font-size: .8rem; color: #6b7280; }

/* ---- Tables ---- */
.table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    overflow: hidden;
}

.table-card .table { margin: 0; }
.table-card .table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    white-space: nowrap;
}

.table-card .table tbody tr:hover { background: #f8fafc; }

/* ---- Search bar ---- */
.search-input-wrap { position: relative; }
.search-input-wrap .bi-search {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}
.search-input-wrap input { padding-left: 32px; }

/* ---- Badges ---- */
.badge-success-soft  { background: #d1fae5; color: #065f46; }
.badge-danger-soft   { background: #fee2e2; color: #991b1b; }
.badge-warning-soft  { background: #fef3c7; color: #92400e; }
.badge-info-soft     { background: #dbeafe; color: #1e40af; }
.badge-secondary-soft{ background: #f1f5f9; color: #475569; }

/* ---- Login page ---- */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1f2e 0%, #2d3748 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.login-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 28px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sidebar { position: fixed; z-index: 200; transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { width: 100%; }
}
