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

:root {
  --mlg-blue:      #0B6FB8;
  --mlg-blue-dark: #075189;
  --mlg-blue-light:#EAF4FC;
  --accent:        #0ea5e9;
  --accent-hover:  #0284c7;
  --bg:            #F4F8FB;
  --surface:       #FFFFFF;
  --surface-2:     #EAF4FC;
  --border:        #DCEAF5;
  --border-strong: #BBDCF0;
  --text:          #0B6FB8;
  --text-2:        #1479C4;
  --muted:         #5B8CB0;
  --muted-light:   #8FB8D6;
  --red:           #ef4444;
  --red-bg:        #fef2f2;
  --red-border:    #fecaca;
  --radius:        14px;
  --radius-lg:     20px;
  --radius-sm:     10px;
  --shadow-sm:     0 2px 8px rgba(11,111,184,0.08), inset 0 1px 0 #FFFFFF;
  --shadow:        0 8px 28px rgba(11,111,184,0.12), inset 0 1px 0 #FFFFFF;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Top brand bar ── */
.topbar {
  background: linear-gradient(135deg, var(--mlg-blue) 0%, var(--mlg-blue-dark) 100%);
  padding: 22px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(11,111,184,0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo-wrap {
  width: 60px; height: 60px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.brand-logo { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; object-fit: contain; }
.brand-logo-initial { font-size: 1.3rem; font-weight: 800; color: var(--mlg-blue); line-height: 1; }

.brand-firm-name { font-size: 1.15rem; font-weight: 800; color: #ffffff; letter-spacing: -0.03em; line-height: 1.2; }
.brand-sub { font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,0.85); margin-top: 3px; }

.signout-link { font-size: 0.85rem; color: #ffffff; text-decoration: none; font-weight: 600; padding: 8px 16px; border-radius: 99px; background: rgba(255,255,255,0.15); transition: background 0.2s; }
.signout-link:hover { background: rgba(255,255,255,0.28); }

/* ── Layout ── */
main { max-width: 820px; margin: 0 auto; padding: 40px 24px 80px; }

/* ── Case switcher ── */
.case-switcher {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.case-switcher label { font-size: 0.85rem; font-weight: 700; color: var(--mlg-blue-dark); }
.case-switcher select {
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 9px 14px; font-size: 0.9rem; font-family: inherit; font-weight: 600;
  background: var(--surface); color: var(--mlg-blue-dark); cursor: pointer;
}
.case-switcher select:focus { outline: none; border-color: var(--mlg-blue); box-shadow: 0 0 0 4px rgba(11,111,184,0.12); }

/* ── Dashboard header + summary stats (HR + multi-case individual) ── */
.dash-header { margin-bottom: 28px; }
.dash-header h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.03em; color: var(--mlg-blue-dark); margin-bottom: 18px; }
.dash-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.dash-stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 16px 24px; min-width: 100px;
}
.dash-stat-num { font-size: 1.7rem; font-weight: 800; color: var(--mlg-blue); line-height: 1; }
.dash-stat-label { font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.03em; }

/* ── Roster / case-picker grid (HR employees, or an individual's multiple cases) ── */
.roster-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px; margin-bottom: 8px;
}
.roster-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 18px 20px;
  cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s, background 0.15s;
}
.roster-card:hover { box-shadow: var(--shadow); border-color: var(--mlg-blue); }
.roster-card-active { background: var(--mlg-blue-light); border-color: var(--mlg-blue); }
.roster-card-name { font-weight: 800; color: var(--mlg-blue-dark); font-size: 1.02rem; margin-bottom: 4px; }
.roster-card-label { font-size: 0.88rem; color: var(--text-2); font-weight: 600; margin-bottom: 10px; }

.case-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  margin-bottom: 36px;
  background: linear-gradient(135deg, var(--mlg-blue-light) 0%, var(--surface) 75%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.case-header::before {
  content: "";
  position: absolute; top: 0; left: 0; bottom: 0; width: 6px;
  background: linear-gradient(180deg, var(--mlg-blue) 0%, var(--accent) 100%);
}
.case-header h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.03em; color: var(--mlg-blue-dark); }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Status / case-type badges (reused convention from staff dashboard) ── */
.status-badge, .visa-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 99px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.sb-adjudicated { background: #e0f4ff; color: #0369a1; border: 1px solid #7dd3f8; }
.sb-pending     { background: #fef9c3; color: #a16207; border: 1px solid #fde047; }
.sb-preparation { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.sb-hold        { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.sb-other       { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

.vb-h1b { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.vb-tn  { background: #e0f4ff; color: #005A96; border: 1px solid #7dd3f8; }
.vb-o1  { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.vb-gc  { background: #bfebff; color: #005A96; border: 1px solid #5bc8f5; }
.vb-eb  { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.vb-other { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

/* ── Section cards ── */
.section-title {
  font-size: 1.05rem; font-weight: 800; margin: 48px 0 16px; letter-spacing: -0.01em;
  color: var(--mlg-blue-dark);
  display: flex; align-items: center; gap: 10px;
}
.section-title:first-of-type { margin-top: 0; }
.section-title::before {
  content: ""; width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  background: var(--mlg-blue-light);
  border: 1px solid var(--border-strong);
}
.section-title-updates::before { content: "\1F4CB"; }
.section-title-docs::before    { content: "\1F4C1"; }
.section-title-message::before { content: "\1F4AC"; }
.section-title-upload::before  { content: "\2B06\FE0F"; }

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 26px 28px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow); }

.timeline { position: relative; }
.comment-row {
  position: relative;
  border-bottom: 1px solid var(--border);
  padding: 16px 0 16px 24px;
}
.comment-row::before {
  content: "";
  position: absolute; left: 4px; top: 22px;
  width: 9px; height: 9px; border-radius: 99px;
  background: var(--mlg-blue);
  box-shadow: 0 0 0 3px var(--mlg-blue-light);
}
.comment-row::after {
  content: "";
  position: absolute; left: 8px; top: 32px; bottom: -16px;
  width: 1.5px; background: var(--border);
}
.comment-row:last-child { border-bottom: none; }
.comment-row:last-child::after { display: none; }
.comment-row:first-child { padding-top: 0; }
.comment-row:first-child::before { top: 6px; }
.comment-date { font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.comment-text { font-size: 0.98rem; line-height: 1.6; color: var(--text-2); }

.attachment-row {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); padding: 14px 0;
  transition: transform 0.15s;
}
.attachment-row:last-child { border-bottom: none; }
.attachment-row:first-child { padding-top: 0; }
.attachment-row:hover { transform: translateX(2px); }
.attachment-link {
  display: flex; align-items: center; gap: 16px;
  color: var(--mlg-blue-dark); font-weight: 700; font-size: 0.95rem; text-decoration: none;
  width: 100%;
}
.attachment-link:hover { color: var(--mlg-blue); }
.attachment-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--mlg-blue-light); border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.3rem;
  box-shadow: var(--shadow-sm);
}

.empty-state { color: var(--muted-light); font-size: 0.92rem; font-style: italic; padding: 6px 0; }

/* ── Your comment form ── */
textarea.comment-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg);
  resize: vertical;
  min-height: 100px;
  color: var(--text-2);
}
textarea.comment-input:focus { outline: none; border-color: var(--mlg-blue); box-shadow: 0 0 0 4px rgba(11,111,184,0.12); background: var(--surface); }

.form-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

.btn-primary {
  font-size: 0.9rem; font-weight: 700; padding: 12px 26px;
  border-radius: var(--radius-sm); border: none;
  background: linear-gradient(135deg, var(--mlg-blue) 0%, var(--mlg-blue-dark) 100%);
  color: #fff; cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s cubic-bezier(0.22,1,0.36,1);
  font-family: inherit; letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(11,111,184,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(11,111,184,0.4); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(11,111,184,0.3); }
.btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }

.btn-secondary {
  font-size: 0.9rem; font-weight: 700; padding: 12px 26px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong);
  background: var(--surface); color: var(--mlg-blue-dark); cursor: pointer;
  font-family: inherit; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(11,111,184,0.18); border-color: var(--mlg-blue); }

/* ── Upload dropzone ── */
.upload-zone {
  border: 2.5px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  background: var(--surface-2);
  transition: border-color 0.2s, background 0.2s;
}
.upload-zone.dragover { border-color: var(--mlg-blue); background: var(--mlg-blue-light); }
.upload-zone p { font-size: 0.95rem; color: var(--muted); margin-bottom: 14px; font-weight: 500; }
.upload-zone input[type=file] { display: none; }
.upload-hint { font-size: 0.78rem; color: var(--muted-light); margin-top: 12px; font-weight: 600; }

.pending-upload-list { margin-top: 12px; }
.pending-upload-item {
  display: flex; align-items: center; justify-content: between; gap: 8px;
  font-size: 0.82rem; padding: 6px 0; color: var(--text-2);
}

.toast {
  font-size: 0.88rem; font-weight: 700; padding: 12px 18px; border-radius: var(--radius-sm);
  margin-top: 14px; display: none;
}
.toast.success { display: block; background: #e0f4ff; color: #0369a1; border: 1px solid #7dd3f8; }
.toast.error   { display: block; background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }

/* ── Login page ── */
.login-wrap {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: radial-gradient(circle at top left, var(--mlg-blue-light) 0%, var(--bg) 55%);
}
.login-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 48px 44px; width: 400px; box-shadow: var(--shadow);
}
.login-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.login-box h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; color: var(--mlg-blue-dark); }
.login-box .brand-sub { margin-top: 4px; color: var(--muted); }
.login-box label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--mlg-blue-dark); margin-bottom: 6px; }
.login-box input {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 16px; font-size: 0.95rem; margin-bottom: 18px; font-family: inherit; background: var(--bg);
  color: var(--text-2);
}
.login-box input:focus { outline: none; border-color: var(--mlg-blue); box-shadow: 0 0 0 4px rgba(11,111,184,0.12); background: var(--surface); }
.login-box button { width: 100%; margin-top: 6px; }
.login-err { color: var(--red); font-size: 0.85rem; margin-top: 14px; font-weight: 600; }
