@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@600;700&display=swap');

/* ═══════════════════════════════════════════════════════════════
   ICAR-IISR APPLICATION PORTAL  —  Premium Design System
   Theme: Clean Corporate White / Forest Green Accent
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────────────── */
:root {
    /* Brand palette */
    --green:         #4a7c00;
    --green-dk:      #2d4f00;
    --green-mid:     #5a8f00;
    --green-lt:      #f0f7e6;
    --green-tint:    #e8f3d4;
    --accent:        #6aab00;

    /* Neutrals */
    --bg:            #f5f6f8;
    --surface:       #ffffff;
    --border:        #e4e8ec;
    --border-dk:     #c8d0d8;
    --text:          #0f1923;
    --text-sub:      #3d4f5e;
    --muted:         #7a8a96;
    --placeholder:   #a0adb8;

    /* Status */
    --red:           #c62828;
    --red-lt:        #fff5f5;
    --amber:         #b45309;
    --blue:          #1d4ed8;
    --blue-lt:       #eff6ff;

    /* Spacing & shape */
    --radius-sm:     4px;
    --radius:        8px;
    --radius-lg:     12px;
    --radius-xl:     16px;

    /* Shadows */
    --shadow-xs:     0 1px 3px rgba(0,0,0,0.05);
    --shadow-sm:     0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md:     0 4px 20px rgba(0,0,0,0.07), 0 2px 8px rgba(0,0,0,0.04);
    --shadow-lg:     0 8px 40px rgba(0,0,0,0.09), 0 2px 10px rgba(0,0,0,0.05);
}

/* ── Reset & Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Sticky Header Container ────────────────────────────────────── */
.sticky-header-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--surface);
    box-shadow: 0 4px 18px rgba(15,25,35,0.06);
}

/* ── Page Header Bar ────────────────────────────────────────────── */
.page-title-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0;
}
.page-title-bar-inner {
    max-width: 100%;
    padding: 22px 40px 20px;
    display: flex;
    align-items: center;
    gap: 48px;
}
.page-title-badge {
    height: 68px;
    background: transparent;
    border-radius: 0;
    display: flex; align-items: center;
    flex-shrink: 0;
    box-shadow: none;
}
.page-title-badge img {
    height: 100%;
    object-fit: contain;
    max-width: none;
}
.page-title-text { flex: 1; }
.page-title-org {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-title-org::before {
    content: '';
    width: 20px; height: 3px;
    background: var(--green);
    display: inline-block;
    border-radius: 2px;
    flex-shrink: 0;
}
.page-title-main {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.4px;
    margin: 0 0 4px;
    line-height: 1.25;
}
.page-title-sub {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
}
.page-title-sub .dot { color: var(--border-dk); }
.page-title-sub strong { color: var(--red); font-weight: 700; }
.page-title-bar-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--green-dk) 0%, var(--green) 40%, var(--accent) 70%, transparent 100%);
}

/* ── Stepper Navigation ─────────────────────────────────────────── */
.stepper {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 4px;
}
.stepper::-webkit-scrollbar { display: none; }
.step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px 12px;
    border-bottom: 3px solid transparent;
    cursor: default;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.1px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.step-num {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--border);
    color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.68rem; font-weight: 700; flex-shrink: 0;
    transition: all 0.2s ease;
}
.step.active {
    color: var(--green-dk);
    border-bottom-color: var(--green);
    font-weight: 600;
}
.step.active .step-num {
    background: var(--green);
    color: #fff;
    box-shadow: 0 2px 6px rgba(74,124,0,0.35);
}
.step.done { color: var(--green-dk); }
.step.done .step-num {
    background: var(--green-dk);
    color: #fff;
}
.step-sep { color: var(--border-dk); font-size: .6rem; padding: 0 2px; align-self: center; }

/* ── Form Wrapper ───────────────────────────────────────────────── */
.form-wrap {
    max-width: 1340px;
    margin: 32px auto 72px;
    padding: 0 24px;
}

/* ── Section Cards ──────────────────────────────────────────────── */
.section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 38px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}
.section-card:hover { box-shadow: var(--shadow-md); }

.section-head {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}
.section-head::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--green), var(--green-mid));
    border-radius: 0 2px 2px 0;
}
.section-head i {
    font-size: 0.95rem;
    color: var(--green);
    width: 32px; height: 32px;
    background: var(--green-lt);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.section-head span, .section-head {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.section-body { padding: 32px 36px 30px; }

/* ── Form Rows & Fields ─────────────────────────────────────────── */
.form-row {
    display: flex;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.form-row:last-child { margin-bottom: 0; }
.fg        { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.fg.w-auto { flex: none; }
.fg.w-sm   { flex: 0 0 130px; }
.fg.w-md   { flex: 0 0 200px; }
.fg.w-full { flex: 0 0 100%; }

/* ── Labels ─────────────────────────────────────────────────────── */
.fl {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-sub);
    margin-bottom: 7px;
    display: block;
}
.req { color: var(--red); }

/* ── Form Inputs ────────────────────────────────────────────────── */
.fi,
.fs {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 0.94rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--surface);
    border: 1.5px solid var(--border-dk);
    border-radius: var(--radius);
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    line-height: 1.5;
    -webkit-appearance: none;
    appearance: none;
}
.fi::placeholder { color: var(--placeholder); }
.fi:hover, .fs:hover { border-color: #aab5c0; }
.fi:focus, .fs:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(74,124,0,0.15);
    background: #fff;
}
.fi.err, .fs.err, .fi.fi-invalid, .fs.fi-invalid {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(198,40,40,0.08);
}
textarea.fi { resize: vertical; min-height: 70px; }
.fs {
    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='%234a7c00' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

/* ── Helper Text ────────────────────────────────────────────────── */
.fi-hint {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 5px;
    line-height: 1.5;
}
.fi-err {
    font-size: 0.72rem;
    color: var(--red);
    margin-top: 5px;
    font-weight: 500;
    display: block;
}

/* ── Phone prefix ────────────────────────────────────────────────── */
.phone-wrap { display: flex; align-items: stretch; }
.phone-prefix {
    display: flex; align-items: center; padding: 0 13px;
    background: #f1f4f7;
    border: 1.5px solid var(--border-dk); border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 0.85rem; font-weight: 700; color: var(--text-sub);
    white-space: nowrap; flex-shrink: 0;
    letter-spacing: 0.5px;
}
.phone-fi { border-radius: 0 var(--radius) var(--radius) 0 !important; flex: 1; }

/* ── Photo Upload ────────────────────────────────────────────────── */
.photo-area { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.photo-box {
    width: 108px; height: 130px;
    border: 2px dashed var(--border-dk);
    border-radius: var(--radius);
    background: #f7f9fb;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; overflow: hidden; cursor: pointer; position: relative;
    transition: all 0.2s ease;
}
.photo-box:hover { border-color: var(--green); background: var(--green-lt); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { text-align: center; color: var(--muted); font-size: 11px; padding: 8px; line-height: 1.5; }
.photo-placeholder i { font-size: 28px; display: block; margin-bottom: 6px; color: var(--border-dk); }
.photo-side { flex: 1; min-width: 180px; }
.upload-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface);
    border: 1.5px solid var(--border-dk);
    color: var(--text-sub);
    padding: 9px 18px; border-radius: var(--radius);
    font-size: 0.82rem; font-weight: 600; cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.18s ease;
}
.upload-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-lt); }
.upload-btn input[type=file] { display: none; }
.file-info { font-size: 0.7rem; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.file-name { font-size: 0.75rem; color: var(--green-dk); font-weight: 600; margin-top: 7px; }
.file-name.err { color: var(--red); }

/* ── PDF Upload ──────────────────────────────────────────────────── */
.pdf-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: #f7f9fb;
    border: 1.5px dashed var(--border-dk);
    color: var(--text-sub); padding: 12px 16px; border-radius: var(--radius);
    font-size: 0.82rem; font-weight: 600; cursor: pointer; width: 100%;
    font-family: 'Inter', sans-serif; transition: all 0.18s ease; text-align: center;
}
.pdf-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-lt); }
.pdf-btn input[type=file] { display: none; }
.pdf-link {
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--green); font-size: 0.78rem; font-weight: 600;
    text-decoration: none; margin-top: 5px;
}
.pdf-link:hover { text-decoration: underline; color: var(--green-dk); }

/* ── Cropper Modal ───────────────────────────────────────────────── */
.cropper-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.75); z-index: 9999;
    align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.cropper-overlay.show { display: flex; }
.cropper-box {
    background: #fff; border-radius: var(--radius-xl); padding: 24px;
    width: 90%; max-width: 520px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}
.cropper-box h5 { font-weight: 700; color: var(--text); margin-bottom: 14px; font-size: 0.95rem; }
.crop-img-wrap { max-height: 360px; overflow: hidden; border-radius: var(--radius); }
.crop-img-wrap img { max-width: 100%; display: block; }
.crop-actions { display: flex; gap: 10px; margin-top: 14px; justify-content: flex-end; flex-wrap: wrap; }

/* ── Declaration Box ─────────────────────────────────────────────── */
.decl-box {
    background: #f7f9fb;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 16px;
}
.decl-box:last-child { margin-bottom: 0; }
.decl-title {
    font-size: 0.78rem; font-weight: 700; color: var(--text);
    text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 16px;
    display: flex; align-items: center; gap: 9px;
}
.decl-title i { color: var(--green); }
.decl-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.decl-item:last-child { margin-bottom: 0; }
.decl-item input[type=checkbox] {
    margin-top: 3px; accent-color: var(--green);
    width: 16px; height: 16px; flex-shrink: 0; cursor: pointer;
}
.decl-item label { font-size: 0.84rem; color: var(--text-sub); line-height: 1.6; cursor: pointer; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-p {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--green);
    color: #fff; border: none; padding: 11px 24px; border-radius: var(--radius);
    font-size: 0.85rem; font-weight: 700; font-family: 'Inter', sans-serif;
    cursor: pointer; transition: all 0.18s ease;
    text-decoration: none; white-space: nowrap;
    box-shadow: 0 2px 8px rgba(74,124,0,0.25);
    letter-spacing: 0.2px;
}
.btn-p:hover {
    background: var(--green-dk);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(74,124,0,0.3);
    color: #fff;
}
.btn-p:active { transform: none; box-shadow: 0 1px 4px rgba(74,124,0,0.2); }

.btn-o {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface); color: var(--text-sub);
    border: 1.5px solid var(--border-dk); padding: 10px 20px; border-radius: var(--radius);
    font-size: 0.85rem; font-weight: 600; font-family: 'Inter', sans-serif;
    cursor: pointer; transition: all 0.18s ease; text-decoration: none; white-space: nowrap;
}
.btn-o:hover { border-color: var(--green); color: var(--green); background: var(--green-lt); }

.btn-d {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface); color: var(--red); border: 1.5px solid #f5c6c6;
    padding: 10px 20px; border-radius: var(--radius);
    font-size: 0.85rem; font-weight: 600; font-family: 'Inter', sans-serif;
    cursor: pointer; transition: all 0.18s ease; white-space: nowrap;
}
.btn-d:hover { background: var(--red-lt); border-color: var(--red); }

/* ── Action Bar ──────────────────────────────────────────────────── */
.action-bar {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 18px 24px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.spacer { flex: 1; }

/* ── Alerts ──────────────────────────────────────────────────────── */
.alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 18px; border-radius: var(--radius-lg);
    font-size: 0.84rem; margin-bottom: 20px; line-height: 1.55;
    border: 1px solid;
}
.alert i { margin-top: 1px; flex-shrink: 0; }
.alert-ok   { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-err  { background: var(--red-lt); border-color: #fecaca; color: #991b1b; }
.alert-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: var(--blue-lt); border-color: #bfdbfe; color: #1e40af; }

/* ── Preview Table ───────────────────────────────────────────────── */
.ptable { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.ptable th {
    text-align: left;
    background: #f7f9fb;
    padding: 10px 16px;
    width: 34%;
    color: var(--text-sub);
    font-weight: 600;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.ptable td {
    padding: 10px 16px;
    border: 1px solid var(--border);
    font-weight: 400;
    color: var(--text);
}
.ptable tr:nth-child(even) td { background: #fafbfc; }

/* ── Success Card ────────────────────────────────────────────────── */
.success-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 52px 44px;
    text-align: center; max-width: 640px; margin: 0 auto;
    box-shadow: var(--shadow-lg);
}
.success-icon {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--green), var(--green-dk));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px; color: #fff;
    box-shadow: 0 8px 28px rgba(74,124,0,0.3);
}
.app-num {
    display: inline-block; background: var(--green-lt);
    border: 2px solid var(--green-tint);
    color: var(--green-dk);
    padding: 10px 24px; border-radius: var(--radius-lg);
    font-size: 1.25rem; font-weight: 800;
    letter-spacing: 2px; margin: 10px 0;
}
.muted-sm { font-size: 0.72rem; color: var(--muted); }

/* ── reCAPTCHA ───────────────────────────────────────────────────── */
.recap-wrap { margin: 16px 0 4px; }

/* ════════════════════════════════════════════════════════════════
   ADMIN PANEL STYLES
   ════════════════════════════════════════════════════════════════ */

/* ── Admin Wrap ──────────────────────────────────────────────────── */
.admin-wrap { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.admin-side {
    width: 240px;
    flex-shrink: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}
.side-brand {
    padding: 22px 20px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
}
.side-brand-icon {
    width: 38px; height: 38px;
    background: #ffffff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: flex-start;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-dk);
    padding: 2px;
}
.side-brand-icon img {
    height: 100%;
    width: auto;
    object-fit: cover;
    object-position: left center;
}
.side-brand-text { color: var(--text); }
.side-brand-text strong { display: block; font-size: 0.94rem; font-weight: 800; letter-spacing: 0.4px; color: var(--text); }
.side-brand-text small { font-size: 0.65rem; color: var(--muted); display: block; margin-top: 1px; text-transform: uppercase; letter-spacing: 0.5px; }

.side-nav { padding: 16px 0 16px 10px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; border-radius: 8px 0 0 8px;
    color: var(--text-sub);
    font-size: 0.84rem; font-weight: 600;
    text-decoration: none;
    transition: all 0.18s ease;
    border-left: 3px solid transparent;
}
.side-nav a i { width: 16px; text-align: center; font-size: 0.88rem; opacity: 0.7; }
.side-nav a:hover { background: var(--bg); color: var(--text); }
.side-nav a.active {
    background: linear-gradient(90deg, rgba(103,151,0,0.1) 0%, rgba(103,151,0,0.02) 100%);
    color: var(--green-dk);
    font-weight: 700;
    border-left-color: var(--green);
}
.side-nav a.active i { color: var(--green-dk); opacity: 1; }
.side-nav .side-sep {
    height: 1px;
    background: var(--border);
    margin: 12px 16px 12px 0;
    border: none;
}
.side-nav .dnger { color: var(--red) !important; }
.side-nav .dnger:hover { background: var(--red-lt) !important; color: var(--red-dk) !important; }

/* ── Admin Login Page ────────────────────────────────────────────── */
.admin-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #f8fafc 0%, #e2e8f0 100%);
    font-family: 'Inter', sans-serif;
    padding: 24px;
}
.login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(15,25,35,0.08);
    border: 1px solid var(--border);
    overflow: hidden;
    animation: loginFadeIn 0.4s ease-out;
}
@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
.login-card-header {
    background: #ffffff;
    padding: 38px 32px 32px;
    text-align: center;
    color: var(--text);
    position: relative;
    border-bottom: 4px solid var(--green);
}
.login-card-header i {
    color: var(--green);
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(103,151,0,0.2));
}
.login-card-header h4 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
    color: var(--text);
}
.login-card-header p {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0;
    font-weight: 400;
}
.login-card-body {
    padding: 36px 32px;
}

/* ── Admin Main Content ──────────────────────────────────────────── */
.admin-main { flex: 1; background: var(--bg); overflow-x: hidden; min-width: 0; }

.admin-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 56px;
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-xs);
}
.admin-bar .t {
    font-weight: 700; color: var(--text);
    font-size: 0.9rem; letter-spacing: -0.1px;
}
.admin-bar .admin-user {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.8rem; color: var(--muted);
}
.admin-bar .admin-user-avatar {
    width: 30px; height: 30px;
    background: var(--green-lt);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--green-dk);
    font-size: 0.72rem; font-weight: 700;
    border: 1.5px solid var(--green-tint);
}

.admin-body { padding: 24px; }

/* ── Stat Cards ──────────────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    box-shadow: var(--shadow-xs);
    display: flex; align-items: flex-start; gap: 16px;
    transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-sm); }
.stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}
.stat-icon.green { background: var(--green-lt); color: var(--green); }
.stat-icon.amber { background: #fffbeb; color: #d97706; }
.stat-icon.blue  { background: var(--blue-lt); color: var(--blue); }
.stat-data h3 { font-size: 2rem; font-weight: 800; color: var(--text); margin: 0 0 2px; line-height: 1; }
.stat-data p  { font-size: 0.78rem; color: var(--muted); margin: 0; font-weight: 500; }

/* ── Data Table ──────────────────────────────────────────────────── */
.dtable {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.dtable-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}
.dtable-head h6 { font-weight: 700; font-size: 0.9rem; color: var(--text); margin: 0; }
.dtable-head .sub { font-size: 0.78rem; color: var(--muted); }
.dtable-scroll { overflow-x: auto; }
.dtable table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.dtable table th {
    background: #f7f9fb;
    color: var(--text-sub);
    padding: 11px 16px;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.dtable table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f2f4f6;
    vertical-align: middle;
    color: var(--text);
}
.dtable table tr:last-child td { border-bottom: none; }
.dtable table tr:hover td { background: #fafcf8; }
.dtable-foot {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: #fafbfc;
    font-size: 0.8rem;
}

/* ── Badges ──────────────────────────────────────────────────────── */
.badge-green {
    display: inline-flex; align-items: center;
    background: var(--green-lt); color: var(--green-dk);
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.68rem; font-weight: 700; border: 1px solid var(--green-tint);
    white-space: nowrap; letter-spacing: 0.3px;
}
.badge-amber {
    display: inline-flex; align-items: center;
    background: #fffbeb; color: #92400e;
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.68rem; font-weight: 700; border: 1px solid #fde68a;
    white-space: nowrap;
}
.badge-submitted {
    display: inline-flex; align-items: center;
    background: #eff6ff; color: #1e40af;
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.68rem; font-weight: 700; border: 1px solid #bfdbfe;
    white-space: nowrap;
}

/* ── Action Links (in table) ─────────────────────────────────────── */
.alinks { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.alinks a, .alinks button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border-radius: 7px;
    font-size: 0.78rem;
    cursor: pointer; text-decoration: none;
    border: 1px solid var(--border);
    color: var(--text-sub);
    background: var(--surface);
    font-family: 'Inter', sans-serif;
    transition: all 0.15s ease;
}
.alinks a:hover, .alinks button:hover {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-lt);
}

/* ── Admin Search Bar ────────────────────────────────────────────── */
.search-bar-wrap {
    display: flex; gap: 10px; align-items: center;
    margin-bottom: 20px; flex-wrap: wrap;
}
.search-bar-wrap form { display: flex; gap: 8px; flex: 1; min-width: 260px; }

/* ── Admin Login Page ────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    background: #0f1923;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    position: relative; overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(74,124,0,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(74,124,0,0.08) 0%, transparent 50%);
}
.login-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 100%; max-width: 400px;
    overflow: hidden;
    box-shadow: 0 32px 100px rgba(0,0,0,0.4);
    position: relative; z-index: 1;
    border: 1px solid rgba(255,255,255,0.08);
}
.login-card-head {
    background: linear-gradient(135deg, var(--green-dk), var(--green));
    padding: 32px 28px 26px;
    text-align: center;
    color: #fff;
    position: relative;
}
.login-card-head::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 1px;
    background: rgba(255,255,255,0.15);
}
.login-card-head .login-ico {
    width: 52px; height: 52px;
    background: rgba(255,255,255,0.15);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin: 0 auto 14px;
    backdrop-filter: blur(8px);
}
.login-card-head h4 { font-weight: 800; margin: 0 0 5px; font-size: 1.1rem; letter-spacing: -0.2px; }
.login-card-head p  { opacity: 0.78; font-size: 0.78rem; margin: 0; }
.login-card-body { padding: 28px 28px; }

/* ── Form Control (Bootstrap-compatible admin inputs) ─────────────── */
.form-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-sub);
    margin-bottom: 7px;
    display: block;
}
.form-control {
    display: block; width: 100%;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--surface);
    border: 1.5px solid var(--border-dk);
    border-radius: var(--radius);
    transition: border-color 0.18s, box-shadow 0.18s;
    -webkit-appearance: none; appearance: none;
}
.form-control:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(74,124,0,0.12);
}
.field-group { margin-bottom: 18px; }

/* ── Alert (Admin Compat) ──────────────────────────────────────────── */
.alert-iisr {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: var(--radius); font-size: 0.84rem;
    margin-bottom: 16px;
}
.alert-iisr.error { background: var(--red-lt); color: #991b1b; border: 1px solid #fecaca; }
.alert-iisr.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ── Btn Primary IISR (Admin compat) ──────────────────────────────── */
.btn-primary-iisr, .w-full {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--green); color: #fff; border: none;
    padding: 11px 22px; border-radius: var(--radius);
    font-size: 0.88rem; font-weight: 700; font-family: 'Inter', sans-serif;
    cursor: pointer; transition: all 0.18s ease;
    text-decoration: none; white-space: nowrap; width: 100%;
    box-shadow: 0 2px 8px rgba(74,124,0,0.25);
}
.btn-primary-iisr:hover { background: var(--green-dk); color: #fff; transform: translateY(-1px); }
.btn-outline-iisr {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: var(--text-sub);
    border: 1.5px solid var(--border-dk);
    padding: 9px 18px; border-radius: var(--radius);
    font-size: 0.84rem; font-weight: 600;
    cursor: pointer; transition: all 0.18s ease; text-decoration: none; white-space: nowrap;
}
.btn-outline-iisr:hover { border-color: var(--green); color: var(--green); background: var(--green-lt); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .admin-side { display: none; }

    /* Header — tablet */
    .page-title-bar-inner {
        padding: 16px 20px 14px;
        gap: 20px;
    }
    .page-title-badge { height: 52px; }
    .page-title-main { font-size: 1.1rem; }
    .page-title-sub { font-size: 0.73rem; flex-wrap: wrap; }
}

@media (max-width: 640px) {
    .form-row { flex-direction: column; gap: 14px; }
    .fg, .fg.w-sm, .fg.w-md { flex: 1 1 100%; min-width: 0; }
    .section-body { padding: 20px 16px; }
    .action-bar { justify-content: center; }
    .form-wrap { padding: 0 10px; margin-top: 16px; }
}

@media (max-width: 480px) {
    /* Header — stack logo above text on small phones */
    .page-title-bar-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 14px 16px 12px;
        gap: 10px;
    }
    .page-title-badge {
        height: 44px;
        justify-content: center;
        margin: 0 auto;
    }
    .page-title-main {
        font-size: 0.95rem;
        letter-spacing: -0.2px;
    }
    .page-title-sub {
        font-size: 0.7rem;
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
    }
    .page-title-sub .dot { display: none; }

    /* Stepper — hide step labels, show only icons/numbers */
    .step-label { display: none; }
    .step { padding: 10px 10px 8px; gap: 0; }
    .step-num { width: 24px; height: 24px; font-size: 0.65rem; }
    .stepper { gap: 0; }

    /* Photo area — stack vertically */
    .photo-area {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .photo-box {
        width: 90px;
        height: 120px;
    }

    /* Action bar */
    .action-bar {
        flex-direction: column;
        gap: 10px;
    }
    .action-bar .btn-p,
    .action-bar .btn-o,
    .action-bar .btn-d {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Section cards */
    .section-body { padding: 16px 13px; }
    .form-wrap { padding: 0 8px; margin-top: 12px; }

    /* Crop modal */
    .cropper-box { padding: 16px; border-radius: 10px; }
}
