/* =============================================
   OneHC SSO â€” Design System
   Clean Modern UI (Reference Style)
   ============================================= */

/* ===== CSS Custom Properties ===== */
:root {
    /* Brand Colors (from Canva) */
    --primary: #2166cc;
    --primary-dark: #1a52a3;
    --primary-light: #4d85da;
    --primary-bg: #e8f0fe;

    --success: #3cb970;
    --success-dark: #30945a;
    --success-bg: #eaf7f0;

    --navy: #0d1d39;
    --navy-light: #1b3a72;

    /* Neutrals */
    --white: #ffffff;
    --light: #f2f6fa;
    /* Soft light blue/gray background */
    --gray-50: #f8fafc;
    --gray-100: #e2e8f0;
    --gray-200: #cbd5e1;
    --gray-300: #94a3b8;
    --gray-400: #64748b;
    --gray-500: #475569;
    --text: #0d1d39;
    /* Use navy for primary text */
    --muted: #64748b;

    /* Status Colors */
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --info: #06b6d4;
    --info-bg: #cffafe;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;

    /* Spacing */
    --sidebar-width: 250px;
    --topbar-height: 70px;

    /* Radius */
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(13, 29, 57, 0.03);
    --shadow-sm: 0 2px 8px rgba(13, 29, 57, 0.04);
    --shadow: 0 8px 16px rgba(13, 29, 57, 0.06);
    --shadow-md: 0 12px 24px rgba(13, 29, 57, 0.08);

    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 13px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text);
    background: var(--light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.admin-body {
    zoom: 0.8;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

code {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* ===== Utilities ===== */
.fw-500 {
    font-weight: 500;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}

.text-sm {
    font-size: 0.85rem;
}

.text-muted {
    color: var(--muted);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-nowrap {
    white-space: nowrap;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.ml-1 {
    margin-left: 0.25rem;
}

.py-3 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-6 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.p-0 {
    padding: 0 !important;
}

.inline-form {
    display: inline;
}

.required {
    color: var(--danger);
}

/* =============================================
   AUTH PAGES (Login)
   ============================================= */
.auth-body {
    background: var(--light);
    min-height: 100vh;
}

.auth-container {
    display: flex;
    min-height: 100vh;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

/* Left Panel: Branding */
.auth-brand-panel {
    flex: 0 0 45%;
    background: linear-gradient(135deg, var(--primary) 0%, #154b9e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-brand-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 440px;
    animation: slideUp 0.6s ease 0.2s both;
}

.auth-brand-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.deco-circle-1 {
    width: 300px;
    height: 300px;
    top: -80px;
    right: -60px;
    animation: float 6s ease-in-out infinite;
}

.deco-circle-2 {
    width: 200px;
    height: 200px;
    bottom: 10%;
    left: -40px;
    animation: float 8s ease-in-out infinite 1s;
}

.deco-circle-3 {
    width: 150px;
    height: 150px;
    top: 18%;
    left: 20%;
    background: rgba(255, 255, 255, 0.03);
    animation: float 7s ease-in-out infinite 2s;
}

.deco-line {
    position: absolute;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.08), transparent);
    width: 1px;
}

.deco-line-1 {
    height: 100%;
    left: 25%;
    top: 0;
}

.deco-line-2 {
    height: 60%;
    left: 50%;
    top: 20%;
    animation: pulse 4s ease infinite;
}

.deco-line-3 {
    height: 80%;
    left: 75%;
    top: 10%;
    animation: pulse 5s ease infinite 1s;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.brand-icon svg {
    width: 60px;
    height: 60px;
}

.brand-text h1 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.brand-tagline {
    font-size: 0.7rem;
    letter-spacing: 3px;
    font-weight: 600;
    opacity: 0.8;
    margin-top: 4px;
}

.auth-brand-description {
    margin-bottom: 2.5rem;
}

.auth-brand-description p {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.85;
}

.auth-brand-quote {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--success);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.8s ease-in-out;
}

.auth-brand-quote .quote-icon {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 0.5rem;
    display: block;
}

.auth-brand-quote .quote-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    font-weight: 400;
}

/* Right Panel: Form Content */
.auth-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    background: var(--white);
    position: relative;
    min-height: 100vh;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.5s ease 0.3s both;
    margin: auto 0;
}

.auth-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.85rem;
    padding: 0 1rem;
}

@media (max-height: 650px) {
    .auth-form-panel {
        padding-top: 3rem;
        padding-bottom: 2rem;
    }
    .auth-form-wrapper {
        margin: 0;
    }
    .auth-footer {
        position: relative;
        bottom: auto;
        margin-top: 2rem;
    }
}

.auth-banner-logo {
    width: 100%;
    max-width: 350px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.spirit-title {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typing-container {
    min-height: 60px;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background-color: white;
    vertical-align: middle;
    margin-left: 4px;
    animation: blink 0.8s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Extra Decorative Circles for abstract background */
.deco-circle-4 {
    width: 450px;
    height: 450px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    bottom: -100px;
    right: -150px;
    animation: float 10s ease-in-out infinite reverse;
}

.deco-circle-5 {
    width: 350px;
    height: 350px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    top: 5%;
    left: -150px;
    animation: float 12s ease-in-out infinite;
}

.deco-circle-6 {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.03);
    top: 15%;
    right: 15%;
    animation: pulse 6s infinite;
}

.mobile-only-banner {
    display: none;
}

@media (max-width: 768px) {
    .auth-brand-panel {
        display: none;
    }

    .mobile-only-banner {
        display: block;
        width: 100%;
        max-width: 250px;
        margin: 0 auto 2rem;
        object-fit: contain;
    }
}

.auth-label {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.auth-form-header h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.auth-form-header p {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.auth-form-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}


/* =============================================
   FORMS
   ============================================= */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--gray-400);
    pointer-events: none;
    z-index: 1;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.input-wrapper .form-input {
    padding-left: 42px;
}

.input-wrapper .form-input:has(+ .input-toggle-password) {
    padding-right: 42px;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.input-toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
}

.input-toggle-password:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

.eye-icon {
    width: 18px;
    height: 18px;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
}

.form-row-between {
    justify-content: space-between;
}

.form-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.form-link:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-200);
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.checkbox-wrapper input:checked+.checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-wrapper input:checked+.checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    color: var(--gray-500);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.filter-form .filter-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(33, 102, 204, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 12px rgba(33, 102, 204, 0.3);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-outline {
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--gray-200);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-sm i {
    width: 16px;
    height: 16px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon i {
    width: 18px;
    height: 18px;
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--navy);
}

.btn-icon-danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.action-btns {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

/* =============================================
   ALERTS
   ============================================= */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.alert i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-dark);
    border: 1px solid rgba(60, 185, 112, 0.3);
}

.alert-error {
    background: var(--danger-bg);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
}

.alert-close:hover {
    opacity: 1;
}

.alert-close i {
    width: 18px;
    height: 18px;
    color: inherit;
}

/* =============================================
   ADMIN LAYOUT
   ============================================= */
.admin-body {
    background: var(--light);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--white);
    color: var(--navy);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--gray-200);
    transition: var(--transition);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 1.5rem;
}

.sidebar-logo img {
    height: 32px;
    object-fit: contain;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    margin-left: auto;
}

.sidebar-close:hover {
    color: var(--navy);
}

.sidebar-close i {
    width: 20px;
    height: 20px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--gray-200);
    border-radius: 4px;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    display: block;
    padding: 0 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-500);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-bottom: 2px;
}

.nav-link i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--gray-50);
}

.nav-link.active {
    color: var(--white);
    background: var(--primary);
    box-shadow: 0 4px 6px rgba(33, 102, 204, 0.2);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-100);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--danger);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: var(--danger-bg);
    text-decoration: none;
}

.sidebar-logout:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.sidebar-logout i {
    width: 20px;
    height: 20px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 29, 57, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1040;
}

/* Main Content & Topbar */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--topbar-height);
    padding: 0 2rem;
    background: var(--light);
    /* Matches background */
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.topbar-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--navy);
    cursor: pointer;
    padding: 6px;
}

.topbar-menu-btn i {
    width: 24px;
    height: 24px;
}

/* Search Bar */
.topbar-search {
    position: relative;
    max-width: 400px;
    width: 100%;
    display: flex;
    align-items: center;
}

.topbar-search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    color: var(--text);
    outline: none;
}

.topbar-search-input:focus {
    border-color: var(--primary);
}

.topbar-search i {
    position: absolute;
    left: 12px;
    color: var(--gray-400);
    width: 18px;
    height: 18px;
}

.topbar-search-btn {
    position: absolute;
    right: 4px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.topbar-greeting {
    font-size: 0.95rem;
    color: var(--gray-500);
}

.topbar-greeting strong {
    color: var(--navy);
    font-weight: 700;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-icon-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--navy);
    cursor: pointer;
}

.topbar-icon-btn i {
    width: 20px;
    height: 20px;
}

.topbar-icon-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.topbar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    overflow: hidden;
}

.topbar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Page Content */
.page-content {
    padding: 1.5rem 2rem 2rem;
    flex: 1;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.2;
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-top: 0.2rem;
    display: none;
}

/* =============================================
   CARDS & PANELS
   ============================================= */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
}

.card-title i {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.card-action {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    background: var(--white);
}

/* =============================================
   TABLES
   ============================================= */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem 1.5rem;
    text-align: left;
    vertical-align: middle;
}

.table th {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    background: var(--white);
    border-bottom: 2px solid var(--gray-100);
    white-space: nowrap;
}

.table td {
    font-size: 0.95rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--navy);
    font-weight: 500;
}

.table-hover tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-cell .avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

/* =============================================
   BADGES
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50px;
}

.badge-primary {
    background: var(--primary-bg);
    color: var(--primary);
}

.badge-success {
    background: var(--success-bg);
    color: var(--success-dark);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-bg);
    color: #d97706;
}

.badge-default {
    background: var(--gray-100);
    color: var(--gray-500);
}

/* =============================================
   AVATAR
   ============================================= */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
}

.avatar-sm {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
}

/* =============================================
   STATS CARDS (Dashboard)
   ============================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    width: 28px;
    height: 28px;
}

.stat-icon-blue {
    background: var(--primary-bg);
    color: var(--primary);
}

.stat-icon-cyan {
    background: var(--info-bg);
    color: var(--info);
}

.stat-icon-green {
    background: var(--success-bg);
    color: var(--success);
}

.stat-icon-red {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-top: 4px;
    font-weight: 500;
}

.stat-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    background: var(--success-bg);
    color: var(--success-dark);
}

.stat-badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

/* =============================================
   QUICK ACTIONS & TABS
   ============================================= */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.quick-action-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.quick-action-btn i {
    width: 16px;
    height: 16px;
    color: inherit;
}

.quick-action-btn:hover:not(.active) {
    background: var(--gray-50);
    border-color: var(--primary-light);
    color: var(--primary);
}

/* =============================================
   GRID LAYOUTS
   ============================================= */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* =============================================
   APP CARDS
   ============================================= */
.app-card {
    border-radius: var(--radius-lg);
}

.app-card .app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.app-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon i {
    width: 24px;
    height: 24px;
}

.app-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--navy);
}

.app-stats {
    display: flex;
    gap: 1.5rem;
    margin: 1.25rem 0;
    padding: 1rem 0;
    border-top: 1px dashed var(--gray-200);
    border-bottom: 1px dashed var(--gray-200);
}

.app-stat-value {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--navy);
    display: block;
}

.app-stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

.app-key-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.app-key-code {
    display: block;
    font-size: 0.85rem;
    word-break: break-all;
    margin-top: 2px;
    background: none;
    border: none;
    padding: 0;
    color: var(--navy);
}

.app-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--gray-500);
    font-weight: 500;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-500);
    background: transparent;
    border: none;
    border-radius: 50%;
    transition: var(--transition);
}

.pagination-btn:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-brand-panel {
        flex: none;
        height: 250px;
    }

    .auth-form-panel {
        padding: 2rem 1.5rem;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .topbar-menu-btn {
        display: block;
    }

    .page-content {
        padding: 1.5rem;
    }

    .topbar {
        padding: 0 1.5rem;
    }

    .topbar-search,
    .topbar-greeting {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   HR UI DESIGN SYSTEM REFERENCE STYLES (UI/hr_style.css)
   ============================================= */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 125vh;
    width: var(--sidebar-width, 260px);
    background: white;
    border-right: 1px solid var(--gray-200, #e2e8f0);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}
.sidebar-header {
    height: var(--topbar-height, 70px);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--gray-100, #f1f5f9);
}
.sidebar-header h2 { font-weight: 800; font-size: 22px; color: var(--primary); letter-spacing: -0.5px; }
.sidebar-header h2 span { color: var(--secondary); }

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
}
.menu-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 1px;
    margin: 20px 0 10px 10px;
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--gray-500);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}
.menu-item i { width: 20px; height: 20px; flex-shrink: 0; }
.menu-item:hover {
    background: var(--gray-50);
    color: var(--primary);
}
.menu-item.active {
    background: #eff6ff; /* light blue */
    color: var(--primary);
    font-weight: 600;
}
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--gray-100);
}
.user-profile {
    display: flex;
    align-items: center;
    padding: 8px;
    background: var(--gray-50);
    border-radius: 12px;
    cursor: pointer;
}
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 14px;
    margin-right: 12px;
}
.user-info { flex: 1; }
.user-name { font-size: 13px; font-weight: 600; color: var(--dark, #0f172a); display:block; }
.user-role { font-size: 11px; color: var(--gray-500); }

/* ─── MAIN CONTENT & TOPBAR ───────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width, 260px);
    min-height: 125vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--topbar-height, 70px);
    background: white;
    border-bottom: 1px solid var(--gray-200, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
}

/* ─── TOPBAR & BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb { font-size: 14px; color: var(--gray-500); font-weight: 500; }
.breadcrumb span { color: var(--dark, #0f172a); font-weight: 600; }

.topbar-badge {
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    display: flex; align-items: center; gap: 6px;
}
.topbar-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--gray-200);
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}
.topbar-icon:hover { background: var(--gray-50); color: var(--primary); }

.content-area {
    padding: 32px;
    flex: 1;
}

/* ─── GRADIENT BANNER ────────────────────────────────────────────────── */
.welcome-banner {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 40%, #0ea5e9 100%);
    border-radius: 20px;
    padding: 32px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}
.welcome-text h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.welcome-text p { font-size: 15px; opacity: 0.9; }

.welcome-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-pill {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 16px;
    text-align: center;
}
.stat-pill .num { font-size: 24px; font-weight: 800; display: block; margin-bottom: 2px; }
.stat-pill .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.9; font-weight: 600;}

/* ─── SUMMARY CARDS ──────────────────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
@media (max-width: 1200px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .cards-grid { grid-template-columns: 1fr; }
}

.summary-card {
    border-radius: 20px;
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.summary-card::after {
    content: '';
    position: absolute; right: -20px; top: -20px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.summary-card.c-blue { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.summary-card.c-green { background: linear-gradient(135deg, #059669, #34d399); }
.summary-card.c-orange { background: linear-gradient(135deg, #ea580c, #fb923c); }
.summary-card.c-purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

.card-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.summary-card h3 { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.summary-card p { font-size: 14px; font-weight: 600; opacity: 0.9; }
.summary-card span { font-size: 12px; opacity: 0.75; }

/* ─── PANELS / TABLES ────────────────────────────────────────────────── */
.panel {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid var(--gray-100);
    margin-bottom: 24px;
}
.panel-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap; gap: 12px;
}
.panel-title { font-size: 16px; font-weight: 700; color: var(--dark, #0f172a); display: flex; align-items: center; gap: 8px;}
.panel-title i { color: var(--primary); }

.table-modern { width: 100%; border-collapse: collapse; }
.table-modern th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-200);
}
.table-modern td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-700);
    vertical-align: middle;
}
.table-modern tr:last-child td { border-bottom: none; }

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px; font-weight: 600;
    display: inline-block;
}
.status-badge.proses { background: #eff6ff; color: #2563eb; }
.status-badge.selesai { background: #f0fdf4; color: #16a34a; }
.status-badge.antrean { background: #fefce8; color: #ca8a04; }
.status-badge.tolak { background: #fef2f2; color: #dc2626; }

/* ─── ACTION CONTROLS & SEARCH ───────────────────────────────────────── */
.search-bar { display:flex; gap:12px; margin-bottom:20px; flex-wrap:wrap; }
.search-input { flex:1; min-width:200px; padding:10px 14px; border:1px solid var(--gray-200); border-radius:8px; font-size:14px; outline:none; transition: all 0.2s; }
.search-input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.btn-export { background:var(--primary); color:#fff; padding:10px 18px; border-radius:8px; font-size:13px; font-weight:600; border:none; cursor:pointer; display:inline-flex; align-items:center; gap:6px; transition: all 0.2s; }
.btn-export:hover { background: #1e40af; }
.btn-filter { background:#f8fafc; color:#475569; padding:10px 18px; border-radius:8px; font-size:13px; font-weight:600; border:1px solid #cbd5e1; cursor:pointer; display:inline-flex; align-items:center; gap:6px; transition: all 0.2s; }
.btn-filter:hover { background: #f1f5f9; color: var(--primary); }

.tabs { display:flex; gap:16px; border-bottom:1px solid var(--gray-200); margin-bottom:20px; }
.tab-item { padding:10px 16px; font-size:14px; font-weight:600; color:var(--gray-500); text-decoration:none; border-bottom:2px solid transparent; }
.tab-item.active { color:var(--primary); border-bottom-color:var(--primary); }
.btn-rej { background:#dc2626; color:#fff; padding:6px 12px; border-radius:6px; border:none; cursor:pointer; font-size:12px; font-weight:600;}

/* ─── DRAWER FILTER ──────────────────────────────────────────────────── */
.drawer-overlay { display:none; position:fixed; top:0; left:0; width:100%; height:125vh; background:rgba(0,0,0,0.5); z-index:9998; backdrop-filter: blur(2px); }
.drawer-overlay.active { display:block; }
.drawer-side { position:fixed; top:0; right:-550px; width:550px; height:125vh; background:#f8fafc; z-index:9999; box-shadow:-2px 0 12px rgba(0,0,0,0.15); transition:right 0.3s ease; display:flex; flex-direction:column; max-width:100%; }
.drawer-side.active { right:0; }
.drawer-header { padding:20px; background:#fff; border-bottom:1px solid #e2e8f0; display:flex; justify-content:space-between; align-items:center; }
.drawer-body { padding:20px; flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:16px; }
.drawer-footer { padding:20px; background:#fff; border-top:1px solid #e2e8f0; display:flex; gap:12px; }

.filter-group label { display:block; margin-bottom:6px; font-weight:600; font-size:13px; color:#475569; }
.filter-input { width:100%; padding:8px 12px; border:1px solid #cbd5e1; border-radius:6px; font-size:13px; outline:none; }
.checkbox-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.checkbox-item { display:flex; align-items:center; gap:6px; font-size:13px; color:#334155; }