/* =====================================================
   SIPADES — Sistem Informasi Pelayanan Administrasi
   Desa/Kelurahan — Official Government Light Theme
   ===================================================== */

/* ==================== IMPORTS ==================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Color Palette - Official Government Light Theme */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --bg-input: #ffffff;
    --bg-sidebar: #ffffff;

    /* Government Navy & Blue Accent */
    --header-navy: #0f2942;
    --header-navy-dark: #0a192f;
    --header-navy-light: #16385c;
    --header-gold: #d97706;
    --header-gold-light: #f59e0b;

    --accent-primary: #0284c7;
    --accent-primary-hover: #0369a1;
    --accent-secondary: #0d9488;
    --accent-glow: rgba(2, 132, 199, 0.15);
    --accent-gradient: linear-gradient(135deg, #0a192f 0%, #0f3860 45%, #1e40af 100%);
    --accent-gradient-2: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    --accent-gradient-gold: linear-gradient(135deg, #d97706 0%, #b45309 100%);

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-heading: #0f172a;
    --text-on-dark: #ffffff;

    /* Borders */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-accent: #cbd5e1;

    /* Status Colors (Light Theme Government Badges) */
    --status-diajukan: #0284c7;
    --status-diperiksa: #d97706;
    --status-revisi: #dc2626;
    --status-diverifikasi: #0d9488;
    --status-menunggu: #7c3aed;
    --status-disetujui: #16a34a;
    --status-ditolak: #dc2626;
    --status-diproses: #2563eb;
    --status-selesai: #15803d;

    /* Typography */
    --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-xs: 0.75rem;
    --font-sm: 0.8125rem;
    --font-base: 0.9375rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --font-4xl: 2.25rem;

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 28px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.12);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --sidebar-width: 270px;
    --header-height: 68px;
}

/* ==================== RESET ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Grid Pattern */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(2, 132, 199, 0.03) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(217, 119, 6, 0.03) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

#app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary-hover);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: var(--font-family);
    font-size: var(--font-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1.4;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
}

.btn-primary:hover {
    background: var(--accent-primary-hover);
    border-color: var(--accent-primary-hover);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: #f1f5f9;
    color: var(--header-navy);
    border-color: var(--accent-primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-success {
    background: #16a34a;
    color: #ffffff;
}

.btn-success:hover {
    background: #15803d;
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-warning {
    background: #d97706;
    color: #ffffff;
}

.btn-warning:hover {
    background: #b45309;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-xs);
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: var(--font-base);
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* ==================== PUBLIC PAGE / GOV HEADER ==================== */
.gov-topbar {
    background: var(--header-navy-dark);
    color: #cbd5e1;
    font-size: var(--font-xs);
    padding: 0.5rem 1.5rem;
    border-bottom: 2px solid var(--header-gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gov-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.gov-topbar-left i {
    color: var(--header-gold-light);
}

.gov-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.public-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.public-navbar-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.public-brand-logo {
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(15, 41, 66, 0.25);
    border: 2px solid var(--header-gold-light);
}

.public-brand-text h2 {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--header-navy);
    line-height: 1.1;
}

.public-brand-text span {
    font-size: var(--font-xs);
    color: var(--text-muted);
    font-weight: 500;
}

.public-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.public-nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: var(--font-sm);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.public-nav-link:hover {
    color: var(--accent-primary);
    background: #f1f5f9;
}

.hero-section {
    background: var(--accent-gradient);
    color: #ffffff;
    padding: 4.5rem 1.5rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--header-gold);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 30%, rgba(2, 132, 199, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: 600;
    color: #fef08a;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.hero-desc {
    font-size: var(--font-lg);
    color: #e2e8f0;
    max-width: 720px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-actions .btn-primary {
    background: var(--accent-primary);
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
}

.hero-actions .btn-secondary {
    background: #ffffff;
    color: var(--header-navy);
    border-color: #ffffff;
}

/* ==================== SERVICES SECTION ==================== */
.services-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.section-title {
    font-size: var(--font-3xl);
    font-weight: 800;
    color: var(--header-navy);
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: var(--font-base);
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-primary);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.service-card-icon {
    width: 52px;
    height: 52px;
    background: #eff6ff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    color: var(--accent-primary);
    margin-bottom: 1.25rem;
    border: 1px solid #dbeafe;
}

.service-card h3 {
    font-size: var(--font-xl);
    font-weight: 700;
    color: var(--header-navy);
    margin-bottom: 0.5rem;
}

.service-card p {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    flex-grow: 1;
    line-height: 1.5;
}

.service-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.service-req-tag {
    font-size: var(--font-xs);
    padding: 0.25rem 0.625rem;
    background: #f1f5f9;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

/* ==================== AUTH CONTAINER ==================== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.auth-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}

.auth-card .logo-area {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card .logo-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #ffffff;
    margin: 0 auto 1rem;
    box-shadow: 0 6px 16px rgba(15, 41, 66, 0.2);
    border: 2px solid var(--header-gold-light);
}

.auth-card h2 {
    font-size: var(--font-2xl);
    font-weight: 800;
    color: var(--header-navy);
    margin-bottom: 0.25rem;
}

.auth-card p {
    font-size: var(--font-sm);
    color: var(--text-muted);
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--header-navy);
    margin-bottom: 0.375rem;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-family);
    font-size: var(--font-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.25rem;
}

.form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-xs);
    margin: 1.5rem 0;
}

.form-divider::before, .form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.form-divider::before { margin-right: 0.75rem; }
.form-divider::after { margin-left: 0.75rem; }

/* ==================== DASHBOARD LAYOUT ==================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-base);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--header-navy);
    color: #ffffff;
}

.sidebar-logo {
    width: 38px;
    height: 38px;
    background: var(--accent-gradient-2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: #ffffff;
}

.sidebar-brand h3 {
    font-size: 1.125rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.sidebar-brand span {
    font-size: var(--font-xs);
    color: #94a3b8;
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: 1.25rem 0.75rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: var(--font-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-bottom: 0.25rem;
    transition: all var(--transition-fast);
}

.nav-item i {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
    color: var(--text-muted);
}

.nav-item:hover {
    background: #f1f5f9;
    color: var(--header-navy);
}

.nav-item.active {
    background: #eff6ff;
    color: var(--accent-primary);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.nav-item.active i {
    color: var(--accent-primary);
}

.nav-badge {
    margin-left: auto;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    background: var(--header-navy);
    color: #ffffff;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-sm);
}

.sidebar-user-info {
    flex: 1;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: var(--font-sm);
    font-weight: 700;
    color: var(--header-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: var(--font-xs);
    color: var(--text-muted);
    text-transform: capitalize;
}

/* Top Bar */
.top-bar {
    height: var(--header-height);
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 900;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--header-navy);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-sm);
    color: var(--text-muted);
}

.breadcrumb .link {
    color: var(--text-secondary);
    font-weight: 500;
}

.breadcrumb .current {
    color: var(--header-navy);
    font-weight: 700;
}

.breadcrumb .separator {
    color: var(--text-muted);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notif-btn {
    position: relative;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    color: var(--header-navy);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.notif-btn:hover {
    background: #e2e8f0;
    color: var(--accent-primary);
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 2rem 1.75rem;
    max-width: 1400px;
    width: 100%;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-title h1 {
    font-size: var(--font-2xl);
    font-weight: 800;
    color: var(--header-navy);
}

.page-title p {
    font-size: var(--font-sm);
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--header-navy);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-primary);
}

.stat-card.stat-blue::before { background: #0284c7; }
.stat-card.stat-green::before { background: #16a34a; }
.stat-card.stat-amber::before { background: #d97706; }
.stat-card.stat-red::before { background: #dc2626; }
.stat-card.stat-purple::before { background: #7c3aed; }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--header-navy);
}

.stat-card.stat-blue .stat-icon { background: #eff6ff; color: #0284c7; }
.stat-card.stat-green .stat-icon { background: #f0fdf4; color: #16a34a; }
.stat-card.stat-amber .stat-icon { background: #fffbe6; color: #d97706; }
.stat-card.stat-red .stat-icon { background: #fef2f2; color: #dc2626; }
.stat-card.stat-purple .stat-icon { background: #f5f3ff; color: #7c3aed; }

.stat-info h4 {
    font-size: var(--font-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.stat-info .stat-value {
    font-size: var(--font-2xl);
    font-weight: 800;
    color: var(--header-navy);
    line-height: 1.1;
    margin-top: 0.25rem;
}

/* ==================== TABLES ==================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-sm);
    text-align: left;
    background: #ffffff;
}

.table th {
    background: #f8fafc;
    color: var(--header-navy);
    font-weight: 700;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    vertical-align: middle;
}

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

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    font-size: var(--font-xs);
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
    border: 1px solid transparent;
}

.badge-diajukan { background: #eff6ff; color: #0284c7; border-color: #bfdbfe; }
.badge-diperiksa { background: #fffbe6; color: #b45309; border-color: #fef08a; }
.badge-revisi { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge-diverifikasi { background: #f0fdf4; color: #0d9488; border-color: #99f6e4; }
.badge-menunggu { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.badge-disetujui { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge-ditolak { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }
.badge-diproses { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
.badge-selesai { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

/* ==================== MODALS & DROPDOWNS ==================== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 0.5rem 0;
    display: none;
    z-index: 1000;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: var(--font-sm);
    color: var(--text-primary);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background var(--transition-fast);
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: var(--accent-primary);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 2000;
}

.modal {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header h3 {
    font-size: var(--font-lg);
    font-weight: 800;
    color: var(--header-navy);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--header-navy);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #f8fafc;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.875rem 1.25rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-size: var(--font-sm);
    min-width: 300px;
}

.toast-success { border-left: 4px solid #16a34a; }
.toast-error { border-left: 4px solid #dc2626; }
.toast-info { border-left: 4px solid #0284c7; }

/* Timeline Workflow */
.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin: 2rem 0;
}

.workflow-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
    transform: translateY(-50%);
}

.workflow-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    padding: 0 0.5rem;
}

.workflow-step-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: #f1f5f9;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    border: 2px solid var(--border-color);
}

.workflow-step.completed .workflow-step-icon {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
}

.workflow-step.active .workflow-step-icon {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.workflow-step-label {
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.workflow-step.completed .workflow-step-label,
.workflow-step.active .workflow-step-label {
    color: var(--header-navy);
    font-weight: 700;
}

/* Document Upload Dropzone */
.file-dropzone {
    border: 2px dashed var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-dropzone:hover {
    border-color: var(--accent-primary);
    background: #eff6ff;
}

.file-dropzone i {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 0.875rem;
}

/* ==================== PRINT SURAT STYLING ==================== */
.surat-container {
    background: #ffffff;
    color: #000000;
    padding: 3rem 4rem;
    font-family: 'Times New Roman', Times, serif;
    font-size: 12pt;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.surat-kop {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 3px double #000000;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.surat-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.surat-header-text {
    text-align: center;
    flex: 1;
}

.surat-header-text h3 {
    font-size: 14pt;
    font-weight: bold;
    margin: 0;
    text-transform: uppercase;
}

.surat-header-text h2 {
    font-size: 16pt;
    font-weight: bold;
    margin: 0;
    text-transform: uppercase;
}

.surat-header-text p {
    font-size: 10pt;
    margin: 0;
    font-style: italic;
}

/* ==================== PASSWORD STRENGTH ==================== */
.password-strength {
    margin-top: 0.375rem;
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.password-strength-bar {
    flex: 1;
    height: 4px;
    border-radius: var(--radius-full);
    background: var(--border-color);
    transition: background var(--transition-fast);
}

.password-strength-bar.active.weak { background: #ef4444; }
.password-strength-bar.active.medium { background: #f59e0b; }
.password-strength-bar.active.strong { background: #22c55e; }

.password-strength-label {
    font-size: var(--font-xs);
    font-weight: 600;
    min-width: 50px;
    text-align: right;
}

/* ==================== SEARCH / FILTER BAR ==================== */
.search-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input-wrapper i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: var(--font-sm);
}

.search-input-wrapper .form-control {
    padding-left: 2.5rem;
}

/* ==================== LOADING SPINNER ==================== */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== CONFIRM DIALOG ==================== */
.confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* ==================== NAV SECTION TITLE ==================== */
.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 1rem 1rem 0.375rem;
}

/* ==================== STAT ENHANCEMENTS ==================== */
.stat-card {
    cursor: default;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(2,132,199,0.04) 0%, transparent 70%);
    pointer-events: none;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 640px) {
    .page-content {
        padding: 1.25rem 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .hide-mobile {
        display: none;
    }
}
