/* ============================================================
   ITIN Plus Client Portal — Shared Styles
   Navy #0a2342 | Blue #1565c0 | Amber #f59e0b
   ============================================================ */

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

:root {
  --navy:   #0a2342;
  --navy2:  #0d2d57;
  --blue:   #1565c0;
  --blue-l: #1976d2;
  --amber:  #f59e0b;
  --amber-d:#d97706;
  --green:  #10b981;
  --red:    #ef4444;
  --gray:   #64748b;
  --bg:     #f1f5f9;
  --white:  #ffffff;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 1px 4px rgba(0,0,0,.08);
}

body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: #1a1a2e; line-height: 1.6; min-height: 100vh; }

/* ---- NAV ---- */
.nav { background: var(--navy); display: flex; align-items: center; padding: 0 24px; height: 60px; gap: 8px; }
.nav-brand { color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; margin-right: auto; }
.nav-brand span { color: var(--amber); }
.nav a { color: rgba(255,255,255,.75); text-decoration: none; padding: 6px 14px; border-radius: 6px; font-size: .88rem; transition: all .15s; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.nav .badge-unread { background: var(--amber); color: var(--navy); font-size:.7rem; font-weight:700; padding:1px 6px; border-radius:10px; margin-left:4px; }
.nav .logout-btn { margin-left: 8px; background: rgba(239,68,68,.2); color: #fca5a5; }
.nav .logout-btn:hover { background: rgba(239,68,68,.35); color: #fff; }

/* ---- MAIN LAYOUT ---- */
.wrap { max-width: 960px; margin: 0 auto; padding: 32px 20px; }
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--navy); margin-bottom: 24px; }

/* ---- CARDS ---- */
.card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px; }
.card-header { background: var(--navy); color: #fff; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; }
.card-header h2 { font-size: 1rem; font-weight: 600; }
.card-body { padding: 20px; }

/* ---- STAT BOXES ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-box { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; text-align: center; }
.stat-box .num { font-size: 2rem; font-weight: 800; color: var(--navy); }
.stat-box .label { font-size: .78rem; color: var(--gray); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }

/* ---- BADGES / STATUS ---- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .78rem; font-weight: 700; }
.badge-docs    { background: #dbeafe; color: #1e40af; }
.badge-w7      { background: #e9d5ff; color: #6b21a8; }
.badge-irs     { background: #fef9c3; color: #854d0e; }
.badge-process { background: #fed7aa; color: #9a3412; }
.badge-approved{ background: #dcfce7; color: #14532d; }
.badge-complete{ background: #d1fae5; color: #065f46; }
.badge-pending { background: #f1f5f9; color: #475569; }
.badge-verified{ background: #dcfce7; color: #065f46; }
.badge-rejected{ background: #fee2e2; color: #991b1b; }
.badge-paid    { background: #dcfce7; color: #065f46; }
.badge-unpaid  { background: #fee2e2; color: #991b1b; }

/* ---- PROGRESS TIMELINE ---- */
.timeline { display: flex; align-items: flex-start; gap: 0; margin: 24px 0; }
.tl-step { flex: 1; text-align: center; position: relative; }
.tl-step::before { content: ''; position: absolute; top: 16px; left: 50%; right: -50%; height: 3px; background: var(--border); z-index: 0; }
.tl-step:last-child::before { display: none; }
.tl-dot { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-size: .8rem; font-weight: 700; position: relative; z-index: 1; color: #94a3b8; }
.tl-step.done .tl-dot  { border-color: var(--green); background: var(--green); color: #fff; }
.tl-step.active .tl-dot{ border-color: var(--amber); background: var(--amber); color: var(--navy); }
.tl-step.done::before  { background: var(--green); }
.tl-label { font-size: .72rem; color: var(--gray); line-height: 1.3; }
.tl-step.done .tl-label, .tl-step.active .tl-label { color: var(--navy); font-weight: 600; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: .85rem; font-weight: 600; color: var(--navy); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=tel], select, textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 7px;
  font-size: .95rem; font-family: inherit; background: #fff; transition: border .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,101,192,.1); }
textarea { resize: vertical; min-height: 90px; }

/* ---- BUTTONS ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 7px; font-size: .9rem; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all .15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-l); }
.btn-amber  { background: var(--amber); color: var(--navy); }
.btn-amber:hover { background: var(--amber-d); }
.btn-outline { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .82rem; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-block { width: 100%; justify-content: center; }

/* ---- ALERTS ---- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: .9rem; }
.alert-success { background: #d1fae5; border-left: 4px solid #10b981; color: #065f46; }
.alert-error   { background: #fee2e2; border-left: 4px solid #ef4444; color: #991b1b; }
.alert-info    { background: #dbeafe; border-left: 4px solid #3b82f6; color: #1e40af; }
.alert-warning { background: #fffbeb; border-left: 4px solid #f59e0b; color: #92400e; }

/* ---- TABLES ---- */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th { background: #f8fafc; text-align: left; padding: 10px 14px; color: var(--gray); font-weight: 600; border-bottom: 2px solid var(--border); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
tbody td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }

/* ---- MESSAGES ---- */
.msg-thread { display: flex; flex-direction: column; gap: 12px; }
.msg-bubble { max-width: 80%; padding: 12px 16px; border-radius: 12px; font-size: .9rem; line-height: 1.5; }
.msg-bubble.client { background: var(--blue); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-bubble.staff  { background: #f1f5f9; color: var(--navy); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-meta { font-size: .72rem; opacity: .6; margin-top: 4px; }

/* ---- UPLOAD ---- */
.upload-zone { border: 2px dashed var(--border); border-radius: 10px; padding: 32px; text-align: center; color: var(--gray); cursor: pointer; transition: all .15s; }
.upload-zone:hover { border-color: var(--blue); background: #eff6ff; color: var(--blue); }

/* ---- LOGIN PAGE ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy) 0%, #1565c0 100%); }
.login-card { background: #fff; border-radius: 16px; padding: 44px 40px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-size: 1.6rem; color: var(--navy); font-weight: 800; }
.login-logo h1 span { color: var(--amber); }
.login-logo p { color: var(--gray); font-size: .88rem; margin-top: 4px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .nav { padding: 0 12px; gap: 4px; }
  .nav a { padding: 5px 8px; font-size: .78rem; }
  .wrap { padding: 20px 12px; }
  .timeline { flex-direction: column; gap: 8px; }
  .tl-step::before { display: none; }
}
