/* ============================================================
   LKD PAC FATAYAT NU WINDUSARI — Design System
   ============================================================ */

:root {
    /* Green NU palette */
    --primary: #0A6B3C;
    --primary-dark: #064E2A;
    --primary-light: #0F8A4F;
    --primary-surface: #E6F4EC;
    --primary-glow: rgba(10, 107, 60, 0.15);

    /* Gold accent */
    --gold: #B8861E;
    --gold-light: #D4A843;

    /* Sidebar */
    --sidebar-bg: #041A0E;
    --sidebar-hover: #0D2F1A;
    --sidebar-active: #0A6B3C;

    /* Surfaces */
    --bg: #F5F7F5;
    --card-bg: #FFFFFF;
    --border: #DDE5DC;
    --text: #1A2E1D;
    --text-muted: #6B7D6D;
    --text-light: #8A9A8C;

    /* Status colors */
    --success: #0F8A4F;
    --success-bg: #E6F4EC;
    --warning: #B8861E;
    --warning-bg: #FDF6E8;
    --danger: #C0392B;
    --danger-bg: #FDEAEA;
    --info: #2471A3;
    --info-bg: #E8F4FD;

    /* Layout */
    --sidebar-width: 250px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
    --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    position: fixed;
    left: 0; top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-brand {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.sidebar-title strong {
    display: block;
    font-size: 14px;
    line-height: 1.3;
}

.sidebar-title small {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition);
}

.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.nav-icon { font-size: 18px; width: 24px; text-align: center; }

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.user-info strong { display: block; font-size: 13px; }
.user-info small { font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; }

.btn-logout {
    width: 100%;
    padding: 8px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.7);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: all var(--transition);
}
.btn-logout:hover { background: rgba(255,255,255,0.15); color: #fff; }

.menu-toggle {
    display: none;
    position: fixed;
    top: 12px; left: 12px;
    z-index: 200;
    background: var(--primary);
    color: #fff;
    border: none;
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    font-size: 20px;
    cursor: pointer;
}

/* ============================================================
   MAIN CONTENT (with sidebar)
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 24px 32px;
    min-height: 100vh;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 { font-size: 24px; font-weight: 700; color: var(--text); }
.page-header p { color: var(--text-muted); font-size: 14px; margin-top: 2px; }

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.event-date {
    padding: 6px 14px;
    background: var(--primary-surface);
    color: var(--primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary, .btn-secondary, .btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #A93226; }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }
.btn-text { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 13px; padding: 4px 8px; }
.btn-text:hover { text-decoration: underline; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--primary);
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.stat-card::after {
    content: '';
    position: absolute;
    top: -10px; right: -10px;
    width: 60px; height: 60px;
    border-radius: 50%;
    opacity: 0.3;
}

.stat-card.primary { border-left-color: var(--primary); }
.stat-card.primary::after { background: var(--primary); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.warning::after { background: var(--warning); }
.stat-card.success { border-left-color: var(--success); }
.stat-card.success::after { background: var(--success); }
.stat-card.danger { border-left-color: var(--danger); }
.stat-card.danger::after { background: var(--danger); }
.stat-card.info { border-left-color: var(--info); }
.stat-card.info::after { background: var(--info); }

.stat-icon { font-size: 28px; margin-bottom: 8px; }
.stat-value { font-size: 32px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.card-header h3 { font-size: 16px; font-weight: 600; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background: var(--primary-surface);
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-dark);
    white-space: nowrap;
    border-bottom: 2px solid var(--primary-light);
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:hover td { background: var(--primary-surface); }

.data-table .text-center { text-align: center; }
.data-table .text-muted { color: var(--text-muted); }

/* Table thumbnail */
.table-thumb {
    width: 42px; height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-surface);
}
.table-thumb-fallback {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--primary-surface);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    border: 2px solid var(--primary);
}
.table-name-link {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}
.table-name-link:hover { text-decoration: underline; }

/* Table controls (search + filter bar) */
.table-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.search-input {
    flex: 1; min-width: 200px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--card-bg);
    outline: none;
    transition: border var(--transition);
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.table-controls select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--card-bg);
    outline: none;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-search { flex: 1; min-width: 200px; }

.filter-search input,
.filter-selects select,
.filter-row select {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border var(--transition);
}

.filter-search input:focus,
.filter-selects select:focus,
.filter-row select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.filter-selects { display: flex; gap: 8px; }
.filter-info { margin-top: 10px; font-size: 13px; color: var(--text-muted); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-bar {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 16px;
    border-top: 1px solid var(--border);
}

.btn-page {
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    transition: all var(--transition);
}

.btn-page:hover { background: var(--primary-surface); }
.btn-page.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-dots { padding: 6px 4px; color: var(--text-muted); }

/* ============================================================
   CHARTS
   ============================================================ */
.chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.chart-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }

.chart-bars { display: flex; flex-direction: column; gap: 10px; }

.bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bar-label {
    width: 100px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    flex: 1;
    height: 22px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.6s ease;
    min-width: 2px;
}

.bar-count {
    width: 36px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-content.modal-lg { max-width: 900px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 1;
}

.modal-header h3 { font-size: 16px; }

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
}

.modal-close:hover { background: var(--bg); }

.modal-body { padding: 20px; }

/* ============================================================
   PROFILE GRID (detail modal)
   ============================================================ */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.profile-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--primary-surface);
    color: var(--primary-dark);
}

.info-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.info-table td { padding: 4px 0; vertical-align: top; }
.info-table td:first-child { width: 120px; color: var(--text-muted); font-size: 12px; }

/* ============================================================
   DOC GRID
   ============================================================ */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
    margin: 8px 0 16px;
}

.doc-item {
    display: block;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.doc-item:hover { border-color: var(--primary); background: var(--primary-surface); }
.doc-item.missing { color: var(--text-muted); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #041A0E 0%, #0A3D1C 40%, #0A6B3C 100%);
    position: relative;
    overflow: hidden;
}

#particleCanvas {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.login-card {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.login-header h2 { font-size: 20px; color: var(--primary-dark); margin: 4px 0; }
.login-header p { font-size: 13px; color: var(--text-muted); }

.login-info {
    margin-top: 20px;
    padding: 14px;
    background: var(--primary-surface);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.login-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.login-table th { background: rgba(0,0,0,0.05); padding: 4px 8px; font-size: 11px; }
.login-table td { padding: 4px 8px; font-size: 12px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.login-table code { background: rgba(0,0,0,0.06); padding: 1px 6px; border-radius: 3px; font-size: 12px; }

/* ============================================================
   FORM PAGE
   ============================================================ */
.form-page {
    min-height: 100vh;
    background: #F5F7F5;
}

/* Form Header */
.form-header {
    background: linear-gradient(135deg, #041A0E 0%, #0A3D1C 50%, #0A6B3C 100%);
    color: #fff;
    padding: 28px 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.header-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    flex-shrink: 0;
}

.header-text { text-align: center; }

.header-text h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.header-text h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 4px;
}

.header-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 6px;
}

.header-date {
    font-size: 15px;
    font-weight: 600;
    color: var(--gold-light);
    background: rgba(255,255,255,0.1);
    display: inline-block;
    padding: 4px 20px;
    border-radius: 20px;
}

/* Form Container */
.form-container {
    max-width: 860px;
    margin: -16px auto 0;
    padding: 0 20px 60px;
    position: relative;
    z-index: 1;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 6px;
    gap: 4px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    flex-wrap: wrap;
    position: sticky;
    top: 10px;
    z-index: 10;
}

.progress-step {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 8px 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    background: transparent;
    transition: all var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    white-space: nowrap;
}

.progress-step:hover { background: var(--bg); }
.progress-step.active { background: var(--primary); color: #fff; }

/* Form Sections */
.form-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.form-section legend {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Section icon — SVG icon on dark green circle */
.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-dark);
    flex-shrink: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
}
.section-icon.si-user     { background-image: url('/static/img/icon-user.svg'); }
.section-icon.si-pin      { background-image: url('/static/img/icon-pin.svg'); }
.section-icon.si-mosque   { background-image: url('/static/img/icon-mosque.svg'); }
.section-icon.si-clipboard{ background-image: url('/static/img/icon-clipboard.svg'); }
.section-icon.si-heart    { background-image: url('/static/img/icon-heart.svg'); }
.section-icon.si-star     { background-image: url('/static/img/icon-star.svg'); }
.section-icon.si-pen      { background-image: url('/static/img/icon-pen.svg'); }

/* Step icon in progress bar — SVG icon */
.step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    margin-right: 4px;
    transition: background var(--transition);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 13px;
}
.step-icon.si-user     { background-image: url('/static/img/icon-user.svg'); }
.step-icon.si-pin      { background-image: url('/static/img/icon-pin.svg'); }
.step-icon.si-mosque   { background-image: url('/static/img/icon-mosque.svg'); }
.step-icon.si-clipboard{ background-image: url('/static/img/icon-clipboard.svg'); }
.step-icon.si-heart    { background-image: url('/static/img/icon-heart.svg'); }
.step-icon.si-star     { background-image: url('/static/img/icon-star.svg'); }
.step-icon.si-pen      { background-image: url('/static/img/icon-pen.svg'); }

.progress-step.active .step-icon {
    background-color: #fff;
    /* White bg on active — icon needs to become green */
}
.progress-step.active .step-icon.si-user     { background-image: url('/static/img/icon-user.svg'); filter: invert(0.3) sepia(1) saturate(5) hue-rotate(90deg); }
.progress-step.active .step-icon.si-pin      { background-image: url('/static/img/icon-pin.svg'); filter: invert(0.3) sepia(1) saturate(5) hue-rotate(90deg); }
.progress-step.active .step-icon.si-mosque   { background-image: url('/static/img/icon-mosque.svg'); filter: invert(0.3) sepia(1) saturate(5) hue-rotate(90deg); }
.progress-step.active .step-icon.si-clipboard{ background-image: url('/static/img/icon-clipboard.svg'); filter: invert(0.3) sepia(1) saturate(5) hue-rotate(90deg); }
.progress-step.active .step-icon.si-heart    { background-image: url('/static/img/icon-heart.svg'); filter: invert(0.3) sepia(1) saturate(5) hue-rotate(90deg); }
.progress-step.active .step-icon.si-star     { background-image: url('/static/img/icon-star.svg'); filter: invert(0.3) sepia(1) saturate(5) hue-rotate(90deg); }
.progress-step.active .step-icon.si-pen      { background-image: url('/static/img/icon-pen.svg'); filter: invert(0.3) sepia(1) saturate(5) hue-rotate(90deg); }

.section-hint { font-size: 13px; color: var(--text-muted); margin: 4px 0 16px; }

/* Form Controls */
.form-group {
    margin-bottom: 16px;
    flex: 1;
    min-width: 180px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group label small {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 12px;
}

.form-group.required label::after {
    content: ' *';
    color: var(--danger);
}

.required-mark { color: var(--danger); font-weight: 700; }

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group textarea { resize: vertical; min-height: 60px; }
.form-group select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7D6D' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row.col-3 .form-group { flex: 1; min-width: 140px; }

/* Radio & Checkbox */
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.radio-label { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; color: var(--text); font-weight: 400; }
.radio-label input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; }

/* Upload Grid */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.upload-item {
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: all var(--transition);
}

.upload-item:hover { border-color: var(--primary-light); background: var(--primary-surface); }

.upload-check { font-size: 18px; line-height: 1; }
.upload-label { font-size: 13px; font-weight: 500; flex: 1; }
.upload-input { font-size: 12px; margin-top: 4px; width: 100%; }

/* Pernyataan Box */
.pernyataan-box {
    background: var(--primary-surface);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--primary-dark);
    line-height: 1.7;
}

/* Form Actions */
.form-actions {
    text-align: center;
    padding: 24px 0;
}

.form-note {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.8;
}

.form-note p {
    display: flex;
    align-items: center;
    gap: 8px;
}

.note-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.note-icon.note-warn {
    background: var(--warning);
}

.form-error {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
}

.form-success {
    background: var(--success-bg);
    color: var(--success);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.6;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    border: none;
    padding: 14px 48px;
    font-size: 16px;
    font-weight: 700;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(10, 107, 60, 0.3);
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 107, 60, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form Footer */
.form-footer {
    background: var(--sidebar-bg);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 16px;
    font-size: 12px;
}

/* ============================================================
   PROFILE PAGE (Siskader-style)
   ============================================================ */
.profile-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    align-items: start;
}

.profile-sidebar {
    position: sticky;
    top: 20px;
}

.profile-photo-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}

.profile-photo-lg {
    width: 140px; height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    margin-bottom: 12px;
}

.profile-photo-fallback {
    background: var(--primary-surface);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    font-weight: 800;
    margin: 0 auto 12px;
}

.profile-photo-card h2 {
    font-size: 18px;
    margin: 0 0 2px;
    color: var(--text);
}

.profile-nik {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.profile-badges {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.profile-contact {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.contact-icon { font-size: 18px; flex-shrink: 0; }

.contact-item small {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 1px;
}

.contact-item strong {
    display: block;
    font-size: 13px;
    color: var(--text);
    word-break: break-all;
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-surface);
}

.card-title .section-icon {
    width: 28px; height: 28px;
    background-size: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
}

.info-item { display: flex; flex-direction: column; gap: 2px; }
.info-item label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.info-item span { font-size: 14px; color: var(--text); font-weight: 500; }
.info-item.info-full { grid-column: span 2; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .chart-row { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .header-logo { width: 50px; height: 50px; }
    .header-text h1 { font-size: 18px; }
    .upload-grid { grid-template-columns: 1fr; }
    .profile-layout { grid-template-columns: 1fr; }
    .profile-sidebar { position: static; }
    .info-grid { grid-template-columns: 1fr; }
}
