/* ============================================================
   WE-CAN War Victims & Survivors Support Program
   Design: Deep navy + warm amber — authority, hope, humanity
   ============================================================ */

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

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  --navy:       #1a2744;
  --navy-light: #243159;
  --amber:      #e07b39;
  --amber-soft: #f5a96a;
  --teal:       #2a9d8f;
  --red:        #e63946;
  --green:      #2d9e5f;
  --purple:     #6c4bd8;
  --bg:         #f4f6fb;
  --surface:    #ffffff;
  --border:     #e2e8f0;
  --text:       #1e2d3d;
  --muted:      #64748b;
  --shadow:     0 2px 12px rgba(26,39,68,.08);
  --shadow-md:  0 4px 24px rgba(26,39,68,.13);
  --radius:     12px;
  --radius-sm:  8px;
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
body { font-family:'Inter',sans-serif; background:var(--bg); color:var(--text); font-size:15px; line-height:1.6; }
a { color:var(--amber); text-decoration:none; }
a:hover { text-decoration:underline; }

/* ── Auth Pages ───────────────────────────────────────────── */
.auth-page { min-height:100vh; display:flex; align-items:center; justify-content:center;
             background:linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, #1e3a5f 100%); padding:24px; }
.auth-card { background:var(--surface); border-radius:18px; padding:48px 44px; width:100%; max-width:500px;
             box-shadow:0 20px 60px rgba(0,0,0,.3); }
.auth-logo { text-align:center; margin-bottom:32px; }
.auth-logo img,.auth-logo .logo-icon { width:64px; height:64px; }
.auth-logo h1 { font-family:'Playfair Display',serif; font-size:22px; color:var(--navy); margin-top:12px; line-height:1.3; }
.auth-logo p { color:var(--muted); font-size:13px; margin-top:4px; }
.auth-tabs { display:flex; border-bottom:2px solid var(--border); margin-bottom:28px; }
.auth-tab { flex:1; padding:10px; text-align:center; font-weight:600; font-size:14px; color:var(--muted);
            cursor:pointer; border-bottom:3px solid transparent; margin-bottom:-2px; transition:all .2s; }
.auth-tab.active { color:var(--navy); border-bottom-color:var(--amber); }
.tab-panel { display:none; }
.tab-panel.active { display:block; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom:18px; }
.form-group label:not(.checkbox-item) { display:block; font-size:13px; font-weight:600; color:var(--navy); margin-bottom:6px; }
.form-group input:not([type=checkbox]):not([type=radio]), .form-group select, .form-group textarea {
  width:100%; padding:11px 14px; border:1.5px solid var(--border); border-radius:var(--radius-sm);
  font-size:14px; font-family:inherit; background:var(--surface); color:var(--text);
  transition:border-color .2s, box-shadow .2s; }
.form-group input:not([type=checkbox]):not([type=radio]):focus, .form-group select:focus, .form-group textarea:focus {
  outline:none; border-color:var(--amber); box-shadow:0 0 0 3px rgba(224,123,57,.15); }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-hint { font-size:12px; color:var(--muted); margin-top:4px; }
.checkbox-group { display:flex; flex-wrap:wrap; gap:10px; }
.checkbox-item { display:flex; align-items:center; gap:8px; font-size:13px; cursor:pointer;
                 padding:6px 10px; border-radius:6px; user-select:none; -webkit-user-select:none; }
.checkbox-item:hover { background:rgba(224,123,57,.08); }
.checkbox-item input[type=checkbox] { width:18px; height:18px; min-width:18px; accent-color:var(--amber);
                                      cursor:pointer; touch-action:manipulation; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn { display:inline-flex; align-items:center; gap:8px; padding:11px 22px; border-radius:var(--radius-sm);
       font-size:14px; font-weight:600; cursor:pointer; border:none; transition:all .2s; text-decoration:none; }
.btn-primary   { background:var(--amber); color:#fff; }
.btn-primary:hover { background:#c96e2d; box-shadow:0 4px 12px rgba(224,123,57,.35); }
.btn-navy      { background:var(--navy); color:#fff; }
.btn-navy:hover { background:var(--navy-light); }
.btn-green     { background:var(--green); color:#fff; }
.btn-green:hover { background:#237a49; }
.btn-red       { background:var(--red); color:#fff; }
.btn-red:hover { background:#c0303c; }
.btn-outline   { background:transparent; border:1.5px solid var(--border); color:var(--text); }
.btn-outline:hover { border-color:var(--amber); color:var(--amber); }
.btn-sm        { padding:7px 14px; font-size:13px; }
.btn-full      { width:100%; justify-content:center; }
.btn-icon      { width:36px; height:36px; padding:0; justify-content:center; border-radius:8px; }

/* ── Layout ───────────────────────────────────────────────── */
.app-layout { display:flex; min-height:100vh; }

/* Sidebar */
.sidebar { width:260px; min-width:260px; background:var(--navy); color:#fff; display:flex; flex-direction:column;
           position:fixed; top:0; left:0; height:100vh; overflow-y:auto; z-index:100; }
.sidebar-logo { padding:24px 20px 20px; border-bottom:1px solid rgba(255,255,255,.1); }
.sidebar-logo .logo-wrap { display:flex; align-items:center; gap:12px; }
.sidebar-logo .logo-icon { width:44px; height:44px; background:var(--amber); border-radius:10px;
                            display:flex; align-items:center; justify-content:center; font-size:22px; }
.sidebar-logo h2 { font-family:'Playfair Display',serif; font-size:15px; line-height:1.3; }
.sidebar-logo p  { font-size:11px; opacity:.6; margin-top:2px; }
.user-card { padding:20px; border-bottom:1px solid rgba(255,255,255,.1); }
.user-card-inner { display:flex; align-items:center; gap:12px; }
.user-avatar { width:44px; height:44px; border-radius:50%; object-fit:cover; border:2px solid var(--amber); }
.user-avatar-placeholder { width:44px; height:44px; border-radius:50%; background:var(--amber);
                            display:flex; align-items:center; justify-content:center; font-weight:700; font-size:18px; }
.user-info h4 { font-size:14px; font-weight:600; }
.user-info p  { font-size:12px; opacity:.6; }
.sidebar-nav { padding:16px 0; flex:1; }
.nav-section { padding:8px 20px 4px; font-size:11px; font-weight:700; text-transform:uppercase;
               letter-spacing:.08em; opacity:.45; }
.nav-item { display:flex; align-items:center; gap:10px; padding:11px 20px; font-size:14px;
            color:rgba(255,255,255,.75); cursor:pointer; text-decoration:none; transition:all .2s; position:relative; }
.nav-item:hover { background:rgba(255,255,255,.06); color:#fff; text-decoration:none; }
.nav-item.active { background:rgba(224,123,57,.2); color:var(--amber-soft); }
.nav-item.active::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--amber); border-radius:0 3px 3px 0; }
.nav-item .nav-icon { width:20px; text-align:center; font-size:16px; }
.nav-item .nav-badge { margin-left:auto; background:var(--red); color:#fff; font-size:11px;
                        font-weight:700; padding:2px 7px; border-radius:10px; }
.sidebar-footer { padding:16px 20px; border-top:1px solid rgba(255,255,255,.1); }
.sidebar-footer a { display:flex; align-items:center; gap:8px; color:rgba(255,255,255,.6); font-size:13px; }
.sidebar-footer a:hover { color:#fff; text-decoration:none; }

/* Main Content */
.main-content { margin-left:260px; flex:1; display:flex; flex-direction:column; min-height:100vh; }
.topbar { background:var(--surface); border-bottom:1px solid var(--border); padding:0 28px;
          height:64px; display:flex; align-items:center; justify-content:space-between;
          position:sticky; top:0; z-index:50; box-shadow:var(--shadow); }
.topbar-left h2 { font-size:18px; font-weight:700; color:var(--navy); }
.topbar-left p  { font-size:13px; color:var(--muted); }
.topbar-right { display:flex; align-items:center; gap:16px; }
.topbar-search { display:flex; align-items:center; background:var(--bg); border:1.5px solid var(--border);
                 border-radius:var(--radius-sm); padding:8px 14px; gap:8px; }
.topbar-search input { border:none; background:none; outline:none; font-size:13px; width:200px; }
.notif-btn { position:relative; width:40px; height:40px; border-radius:10px; border:1.5px solid var(--border);
             background:var(--surface); display:flex; align-items:center; justify-content:center;
             cursor:pointer; font-size:18px; }
.notif-badge { position:absolute; top:-4px; right:-4px; background:var(--red); color:#fff;
               font-size:10px; font-weight:700; width:18px; height:18px; border-radius:50%;
               display:flex; align-items:center; justify-content:center; }
.profile-btn { display:flex; align-items:center; gap:8px; cursor:pointer; padding:6px 12px;
               border-radius:var(--radius-sm); border:1.5px solid var(--border); background:var(--surface); }
.profile-btn img { width:32px; height:32px; border-radius:50%; object-fit:cover; }
.profile-btn span { font-size:13px; font-weight:600; }
.page-body { padding:28px; flex:1; }

/* ── Dashboard Cards ──────────────────────────────────────── */
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px,1fr)); gap:18px; margin-bottom:28px; }
.stat-card { background:var(--surface); border-radius:var(--radius); padding:22px; box-shadow:var(--shadow);
             display:flex; align-items:center; gap:16px; border-left:4px solid transparent; }
.stat-card.pending  { border-color:var(--amber); }
.stat-card.approved { border-color:var(--green); }
.stat-card.rejected { border-color:var(--red); }
.stat-card.total    { border-color:var(--navy); }
.stat-icon { width:50px; height:50px; border-radius:12px; display:flex; align-items:center;
             justify-content:center; font-size:22px; flex-shrink:0; }
.stat-card.pending  .stat-icon { background:#fff7ed; }
.stat-card.approved .stat-icon { background:#f0fdf4; }
.stat-card.rejected .stat-icon { background:#fff1f2; }
.stat-card.total    .stat-icon { background:#eef2ff; }
.stat-num  { font-size:28px; font-weight:700; line-height:1; }
.stat-label{ font-size:13px; color:var(--muted); margin-top:4px; }
.stat-sub  { font-size:11px; color:var(--muted); margin-top:2px; }

/* Application Cards */
.app-card { background:var(--surface); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow);
            border:1.5px solid var(--border); margin-bottom:16px; }
.app-card-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.app-comp-num { font-size:16px; font-weight:700; color:var(--navy); }
.app-progress { display:flex; align-items:center; gap:0; position:relative; margin:16px 0; overflow:hidden; }
.progress-step { display:flex; flex-direction:column; align-items:center; flex:1; position:relative; }
.progress-step::before { content:''; position:absolute; top:14px; left:-50%; width:100%; height:2px;
                          background:var(--border); z-index:0; }
.progress-step:first-child::before { display:none; }
.progress-step .step-dot { width:28px; height:28px; border-radius:50%; background:var(--border);
                            display:flex; align-items:center; justify-content:center; font-size:11px;
                            font-weight:700; z-index:1; position:relative; }
.progress-step.done .step-dot    { background:var(--green); color:#fff; }
.progress-step.active .step-dot  { background:var(--amber); color:#fff; }
.progress-step.active::before    { background:var(--green); }
.progress-step.done::before      { background:var(--green); }
.progress-step .step-label { font-size:11px; color:var(--muted); margin-top:6px; text-align:center; white-space:nowrap; }

/* ── Badges ───────────────────────────────────────────────── */
.badge { display:inline-block; padding:3px 10px; border-radius:20px; font-size:12px; font-weight:600; }
.badge-gray   { background:#f1f5f9; color:#64748b; }
.badge-blue   { background:#eff6ff; color:#2563eb; }
.badge-orange { background:#fff7ed; color:#c2410c; }
.badge-purple { background:#f5f3ff; color:#6d28d9; }
.badge-green  { background:#f0fdf4; color:#166534; }
.badge-red    { background:#fff1f2; color:#be123c; }
.badge-paid   { background:#dcfce7; color:#166534; font-size:11px; padding:2px 8px; }

/* ── Tables ───────────────────────────────────────────────── */
.data-table { width:100%; border-collapse:collapse; }
.data-table th { background:#f8fafc; padding:12px 16px; font-size:12px; font-weight:700;
                 text-transform:uppercase; letter-spacing:.06em; color:var(--muted); text-align:left;
                 border-bottom:1.5px solid var(--border); }
.data-table td { padding:14px 16px; border-bottom:1px solid var(--border); font-size:14px; vertical-align:middle; }
.data-table tr:hover td { background:#f8fafc; }
.data-table .applicant-cell { display:flex; align-items:center; gap:10px; }
.data-table .applicant-cell img { width:36px; height:36px; border-radius:50%; object-fit:cover; }
.data-table .applicant-cell .avatar { width:36px; height:36px; border-radius:50%; background:var(--amber);
                                       display:flex; align-items:center; justify-content:center;
                                       font-weight:700; font-size:14px; color:#fff; flex-shrink:0; }

/* ── Card Containers ──────────────────────────────────────── */
.card { background:var(--surface); border-radius:var(--radius); box-shadow:var(--shadow);
        border:1.5px solid var(--border); overflow:hidden; }
.card-header { padding:18px 22px; border-bottom:1px solid var(--border); display:flex;
               align-items:center; justify-content:space-between; }
.card-title { font-size:15px; font-weight:700; color:var(--navy); }
.card-body  { padding:22px; }

/* ── Section Tabs ─────────────────────────────────────────── */
.form-sections { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:24px; }
.section-tab { padding:8px 16px; border-radius:20px; font-size:13px; font-weight:600; cursor:pointer;
               background:var(--bg); color:var(--muted); border:1.5px solid var(--border); transition:all .2s; }
.section-tab.active { background:var(--navy); color:#fff; border-color:var(--navy); }
.form-section { display:none; }
.form-section.active { display:block; }
.section-title { font-family:'Playfair Display',serif; font-size:17px; color:var(--navy);
                 margin-bottom:20px; padding-bottom:10px; border-bottom:2px solid var(--amber); }

/* ── Upload Zone ──────────────────────────────────────────── */
.upload-zone { border:2px dashed var(--border); border-radius:var(--radius); padding:36px; text-align:center;
               transition:all .2s; cursor:pointer; background:var(--bg); }
.upload-zone:hover { border-color:var(--amber); background:#fff7ed; }
.upload-zone input[type=file] { display:none; }
.upload-zone .upload-icon { font-size:40px; margin-bottom:12px; }
.upload-zone p { color:var(--muted); font-size:14px; }
.upload-zone strong { color:var(--amber); }

/* ── Payment Status ───────────────────────────────────────── */
.payment-method-badge { display:inline-flex; align-items:center; gap:6px; padding:5px 12px;
                         border-radius:6px; font-size:13px; font-weight:600;
                         background:#f0fdf4; color:var(--green); }

/* ── Timeline/Steps ───────────────────────────────────────── */
.timeline { list-style:none; padding:0; }
.timeline-item { display:flex; gap:14px; padding-bottom:20px; position:relative; }
.timeline-item::before { content:''; position:absolute; left:15px; top:30px; bottom:0; width:2px;
                          background:var(--border); }
.timeline-item:last-child::before { display:none; }
.timeline-dot { width:32px; height:32px; border-radius:50%; flex-shrink:0; display:flex;
                align-items:center; justify-content:center; font-size:14px; }
.timeline-dot.done    { background:var(--green); color:#fff; }
.timeline-dot.active  { background:var(--amber); color:#fff; }
.timeline-dot.pending { background:var(--border); color:var(--muted); }
.timeline-content h5 { font-size:14px; font-weight:600; color:var(--navy); }
.timeline-content p  { font-size:13px; color:var(--muted); margin-top:2px; }

/* ── Notifications ────────────────────────────────────────── */
.notif-item { display:flex; gap:12px; padding:14px; border-bottom:1px solid var(--border);
              align-items:flex-start; transition:background .15s; }
.notif-item:hover { background:#f8fafc; }
.notif-item.unread { background:#fffbf5; }
.notif-dot { width:10px; height:10px; border-radius:50%; background:var(--amber); flex-shrink:0; margin-top:5px; }
.notif-dot.read { background:var(--border); }
.notif-text h5 { font-size:14px; font-weight:600; color:var(--navy); }
.notif-text p  { font-size:13px; color:var(--muted); margin-top:2px; }
.notif-text time { font-size:11px; color:var(--muted); }

/* ── Flash Messages ───────────────────────────────────────── */
.flash { padding:14px 18px; border-radius:var(--radius-sm); margin-bottom:20px;
         display:flex; align-items:center; gap:10px; font-size:14px; font-weight:500; }
.flash span { font-size:18px; }
.flash-success { background:#f0fdf4; color:#166534; border:1px solid #bbf7d0; }
.flash-error   { background:#fff1f2; color:#be123c; border:1px solid #fecdd3; }
.flash-info    { background:#eff6ff; color:#1e40af; border:1px solid #bfdbfe; }

/* ── Modals ───────────────────────────────────────────────── */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:200;
                 display:none; align-items:center; justify-content:center; }
.modal-overlay.open { display:flex; }
.modal { background:var(--surface); border-radius:var(--radius); padding:32px; width:100%;
         max-width:520px; box-shadow:var(--shadow-md); position:relative; max-height:90vh; overflow-y:auto; }
.modal-close { position:absolute; top:16px; right:16px; width:30px; height:30px; border-radius:50%;
               border:none; background:var(--bg); cursor:pointer; font-size:16px; display:flex;
               align-items:center; justify-content:center; }
.modal h3 { font-size:18px; font-weight:700; color:var(--navy); margin-bottom:20px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform:translateX(-100%); transition:transform .3s; }
  .sidebar.open { transform:translateX(0); }
  .main-content { margin-left:0; }
  .form-row { grid-template-columns:1fr; }
}

/* ── Utility ──────────────────────────────────────────────── */
.flex { display:flex; } .items-center { align-items:center; } .gap-2 { gap:8px; }
.gap-3 { gap:12px; } .gap-4 { gap:16px; } .justify-between { justify-content:space-between; }
.mt-1 { margin-top:4px; } .mt-2 { margin-top:8px; } .mt-3 { margin-top:12px; } .mt-4 { margin-top:20px; }
.mb-2 { margin-bottom:8px; } .mb-3 { margin-bottom:12px; } .mb-4 { margin-bottom:20px; }
.text-sm { font-size:13px; } .text-muted { color:var(--muted); } .text-navy { color:var(--navy); }
.font-bold { font-weight:700; } .font-medium { font-weight:500; }
.w-full { width:100%; } .text-center { text-align:center; }
.divider { border:none; border-top:1px solid var(--border); margin:20px 0; }
.section-divider { border:none; border-top:2px solid var(--border); margin:28px 0; }
.empty-state { text-align:center; padding:48px 24px; }
.empty-state .empty-icon { font-size:48px; margin-bottom:12px; }
.empty-state h3 { font-size:17px; font-weight:600; color:var(--navy); }
.empty-state p  { color:var(--muted); font-size:14px; margin-top:6px; }
