/* ========================================================================
   Unified Task Hub Mobile — Warm Newsletter Serif Design System
   ======================================================================== */

/* --- Design Tokens --- */
:root {
  --paper: #F6F1E8;
  --paper-2: #EFE7D8;
  --ink: #1E1A15;
  --ink-2: #3B342A;
  --muted: #7A6F5E;
  --line: #E3D9C4;
  --line-2: #D6C9AE;
  --accent: #B4471F;
  --accent-2: #8E3617;
  --accent-light: rgba(180, 71, 31, 0.10);
  --amber: #C9862B;
  --amber-light: rgba(201, 134, 43, 0.15);
  --sage: #5F7A55;
  --sage-light: rgba(95, 122, 85, 0.15);
  --card: #FBF7EE;
  --erp-dot: #3F6C8C;
  --email-dot: #7A5AA6;
  --defect-dot: #B4471F;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 100px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --transition-fast: 100ms ease;
  --transition-med: 200ms ease-out;
  --transition-slow: 250ms ease-out;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
html, body { background: #EAE2D2; font-family: var(--font-sans); color: var(--ink); min-height: 100vh; }
body { display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; }

/* --- Device Frame --- */
.device {
  width: 422px;
  background: #0b0b0b;
  border-radius: 56px;
  padding: 16px;
  box-shadow: 0 40px 80px rgba(30,26,21,.25), 0 0 0 2px #1a1a1a, inset 0 0 0 2px #2a2a2a;
  position: relative;
}
.device::before, .device::after {
  content: ""; position: absolute; background: #2a2a2a; border-radius: 2px;
}
.device::before { left: -2px; top: 120px; width: 3px; height: 70px; }
.device::after { right: -2px; top: 150px; width: 3px; height: 100px; }
.side-btn { position: absolute; left: -2px; background: #2a2a2a; width: 3px; border-radius: 2px; }
.side-btn.s1 { top: 210px; height: 50px; }
.side-btn.s2 { top: 270px; height: 50px; }

.screen {
  width: 390px;
  background: var(--paper);
  border-radius: 42px;
  overflow: hidden;
  position: relative;
  min-height: 844px;
  display: flex;
  flex-direction: column;
}

/* --- Status Bar --- */
.statusbar {
  height: 54px; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 34px 0; font-family: var(--font-sans); font-weight: 600; font-size: 15px; color: var(--ink);
  position: relative; flex-shrink: 0; z-index: 50;
}
.notch {
  position: absolute; left: 50%; transform: translateX(-50%); top: 11px;
  width: 118px; height: 34px; background: #000; border-radius: 20px; z-index: 51;
}
.sb-right { display: flex; align-items: center; gap: 6px; }
.sb-right svg { display: block; }

/* --- Home Indicator --- */
.home-ind {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 8px;
  width: 134px; height: 5px; background: #1a1a1a; border-radius: 3px; opacity: .35; z-index: 50;
}

/* --- App Container --- */
#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* --- Mobile Header --- */
.mobile-header {
  padding: 14px 22px 10px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.mobile-header .greet .kicker {
  font-family: var(--font-sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 2px;
}
.mobile-header .greet h1 {
  font-family: var(--font-serif); font-weight: 600; font-size: 24px; letter-spacing: -.01em;
  color: var(--ink); line-height: 1.15;
}
.mobile-header .greet h1 em { font-style: italic; font-weight: 500; color: var(--accent); }
.mobile-header .head-actions { display: flex; align-items: center; gap: 10px; }

.mobile-header-simple {
  padding: 10px 22px;
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.mobile-header-simple .back-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--card);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink); flex-shrink: 0;
}
.mobile-header-simple .back-btn:active { background: var(--paper-2); }
.mobile-header-simple h1 {
  font-family: var(--font-serif); font-weight: 600; font-size: 20px;
  color: var(--ink); line-height: 1.2; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* --- Icon Button --- */
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--card);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer; color: var(--ink);
}
.icon-btn:active { background: var(--paper-2); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--card);
}

/* --- Avatar --- */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--ink-2); color: var(--paper);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-serif);
  font-weight: 600; font-size: 15px; letter-spacing: .02em; cursor: pointer; flex-shrink: 0;
}
.avatar:active { opacity: 0.8; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }

/* --- Meta Line --- */
.meta-line {
  padding: 2px 24px 14px; display: flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-size: 12px; color: var(--muted);
}
.meta-line .role { color: var(--ink-2); font-weight: 600; }
.meta-line .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }

/* --- Ornament Divider --- */
.ornament {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 2px 24px 14px;
}
.ornament .rule { flex: 1; height: 1px; background: var(--line); }
.ornament .glyph { font-family: var(--font-serif); font-style: italic; font-size: 13px; color: var(--muted); }

/* --- Summary Cards --- */
.summary-grid {
  padding: 0 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 14px 14px 12px; position: relative; overflow: hidden;
  transition: transform var(--transition-fast);
}
.stat-card:active { transform: scale(1.02); }
.stat-card .lbl {
  font-family: var(--font-sans); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.stat-card .val {
  font-family: var(--font-serif); font-weight: 600; font-size: 36px; letter-spacing: -.02em;
  color: var(--ink); margin-top: 4px; line-height: 1;
}
.stat-card .val em { font-style: italic; font-weight: 500; font-size: 18px; color: var(--muted); margin-left: 4px; }
.stat-card .sub {
  margin-top: 8px; font-family: var(--font-sans); font-size: 11px; color: var(--ink-2);
  display: flex; align-items: center; gap: 6px;
}
.stat-card .sub .pill {
  background: var(--accent-light); color: var(--accent);
  padding: 2px 8px; border-radius: 20px; font-weight: 600; font-size: 10.5px;
}
.stat-card.overdue .val { color: var(--accent); }
.stat-card.overdue { background: linear-gradient(180deg, #FBF3EC 0%, var(--card) 100%); }
.stat-card.due-today .val { color: var(--amber); }

/* --- Search --- */
.search-wrap { padding: 16px 22px 8px; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 14px;
}
.search-box input {
  flex: 1; border: none; background: transparent; outline: none;
  font-family: var(--font-sans); font-size: 14px; color: var(--ink);
}
.search-box input::placeholder { color: var(--muted); }

/* --- Filter Chips --- */
.chips {
  padding: 6px 22px 12px; display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none; flex-shrink: 0;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--card); border: 1px solid var(--line); color: var(--ink-2);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.chip:active { opacity: 0.85; }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .n {
  background: rgba(255,255,255,.15); color: inherit;
  padding: 1px 7px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.chip:not(.active) .n { background: var(--paper-2); color: var(--ink); }
.chip .src-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}

/* --- Section Header --- */
.section-hd {
  padding: 14px 24px 10px; display: flex; align-items: baseline; justify-content: space-between;
}
.section-hd h2 {
  font-family: var(--font-serif); font-weight: 600; font-size: 20px; letter-spacing: -.01em; color: var(--ink);
}
.section-hd h2 em { font-style: italic; font-weight: 500; color: var(--muted); }
.section-hd .sort {
  font-family: var(--font-sans); font-size: 12px; color: var(--muted); font-weight: 500;
  display: flex; align-items: center; gap: 4px; cursor: pointer;
}

/* --- Task Card --- */
.task-list { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.task-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 14px 14px 14px 16px; position: relative; cursor: pointer;
  transition: transform var(--transition-fast);
}
.task-card:active { transform: scale(0.985); }
.task-card .top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px;
}
.task-card h3 {
  font-family: var(--font-serif); font-weight: 600; font-size: 16px; line-height: 1.28;
  color: var(--ink); letter-spacing: -.005em; margin-bottom: 6px;
}
.task-card .desc {
  font-family: var(--font-sans); font-size: 12.5px; line-height: 1.45; color: var(--ink-2);
  margin-bottom: 11px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.task-card .foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px dashed var(--line);
}
.task-card.overdue {
  border-color: #EBC8B4;
  background: linear-gradient(180deg, #FBF1EB 0%, var(--card) 60%);
}
.task-card.overdue::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  background: var(--accent); border-radius: 0 3px 3px 0;
}

/* --- Badges --- */
.badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.badge {
  font-family: var(--font-sans); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; padding: 3px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.badge.src { background: var(--paper-2); color: var(--ink-2); }
.badge.src .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.badge.src.erp .dot { background: var(--erp-dot); }
.badge.src.email .dot { background: var(--email-dot); }
.badge.src.defect .dot { background: var(--defect-dot); }
.badge.pri-critical { background: rgba(180,71,31,.18); color: var(--accent-2); }
.badge.pri-high { background: rgba(180,71,31,.12); color: var(--accent); }
.badge.pri-med { background: var(--amber-light); color: #8A5A15; }
.badge.pri-low { background: var(--sage-light); color: var(--sage); }
.badge.overdue-badge { background: var(--accent); color: var(--paper); }
.badge.sla { background: var(--ink); color: var(--paper); font-weight: 600; }
.badge.status-assigned { background: rgba(63,108,140,.12); color: #3F6C8C; }
.badge.status-inprogress { background: var(--amber-light); color: #8A5A15; }
.badge.status-completed { background: var(--sage-light); color: var(--sage); }
.badge.status-reported { background: rgba(122,90,166,.12); color: #7A5AA6; }
.badge.status-deferred { background: var(--paper-2); color: var(--muted); }
.badge.status-cancelled { background: var(--paper-2); color: var(--muted); text-decoration: line-through; }
.badge.status-verified { background: var(--sage-light); color: var(--sage); }
.badge.severity-critical { background: var(--accent); color: var(--paper); }
.badge.severity-high { background: rgba(180,71,31,.12); color: var(--accent); }
.badge.severity-medium { background: var(--amber-light); color: #8A5A15; }
.badge.sync-ok { background: var(--sage-light); color: var(--sage); }
.badge.sync-pending { background: var(--amber-light); color: #8A5A15; }
.badge.sync-failed { background: rgba(180,71,31,.12); color: var(--accent); }

/* --- Metaline --- */
.metaline { display: flex; align-items: center; gap: 10px; font-family: var(--font-sans); font-size: 11.5px; color: var(--muted); }
.metaline .m { display: flex; align-items: center; gap: 4px; }
.metaline .m.due-red { color: var(--accent); font-weight: 600; }
.metaline .m svg { opacity: .85; }

/* --- Action Buttons --- */
.act-btn {
  background: var(--paper); border: 1px solid var(--line-2);
  width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: var(--ink); cursor: pointer;
}
.act-btn:active { background: var(--paper-2); }
.act-btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.act-btn.primary:active { opacity: 0.85; }

/* --- Full Width Action Button --- */
.action-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 600;
  border: none; border-radius: var(--radius-md); padding: 0 20px;
  height: 48px; cursor: pointer; width: 100%;
  transition: opacity var(--transition-fast);
}
.action-btn:active { opacity: 0.85; }
.action-btn.primary { background: var(--ink); color: var(--paper); }
.action-btn.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.action-btn.accent { background: var(--accent); color: var(--paper); }
.action-btn.danger { background: var(--accent); color: var(--paper); }

/* --- Subsection Divider --- */
.subsection-divider {
  padding: 6px 24px 8px; display: flex; align-items: center; gap: 10px;
}
.subsection-divider .rule { flex: 1; height: 1px; background: var(--line); }
.subsection-divider .lbl {
  font-family: var(--font-serif); font-style: italic; font-size: 13px; color: var(--muted);
}

/* --- Bottom Tab Bar --- */
.tabbar {
  position: relative; flex-shrink: 0;
  background: rgba(246,241,232,.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 10px 20px 26px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--font-sans); font-size: 10.5px; font-weight: 500; color: var(--muted);
  padding: 6px 0 2px; position: relative; cursor: pointer;
  min-height: 44px;
}
.tab:active { opacity: 0.7; }
.tab.active { color: var(--accent); }
.tab.active::before {
  content: ""; position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 2px; background: var(--accent); border-radius: 2px;
}
.tab .b { position: relative; }
.tab .n-badge {
  position: absolute; top: -4px; right: -10px; background: var(--accent); color: var(--paper);
  font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 10px; line-height: 1.3;
}

/* --- Screen Content Area --- */
.screen-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.screen-content::-webkit-scrollbar { display: none; }

/* --- Login Screen --- */
.login-screen {
  display: flex; flex-direction: column; min-height: 100%;
  padding: 20px 22px 40px;
}
.login-screen .login-title {
  font-family: var(--font-serif); font-weight: 600; font-size: 28px;
  color: var(--ink); text-align: center; margin-bottom: 4px; line-height: 1.15;
}
.login-screen .login-subtitle {
  font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 15px;
  color: var(--muted); text-align: center; margin-bottom: 24px;
}
.login-screen .login-label {
  font-family: var(--font-sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 12px;
}
.user-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-md); margin-bottom: 8px;
  background: var(--card); border: 2px solid transparent;
  cursor: pointer; min-height: 56px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.user-card:active { background: var(--paper-2); }
.user-card.selected { border-color: var(--accent); background: rgba(180,71,31,.04); }
.user-card .user-info { flex: 1; min-width: 0; }
.user-card .user-name {
  font-family: var(--font-serif); font-weight: 600; font-size: 15px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-card .user-role {
  font-family: var(--font-sans); font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.login-screen .login-btn {
  margin-top: 16px;
}
.login-error {
  font-family: var(--font-sans); font-size: 13px; color: var(--accent);
  text-align: center; padding: 8px 0;
}

/* --- Bottom Sheet --- */
.bottom-sheet-backdrop {
  position: absolute; inset: 0; background: rgba(30,26,21,.4); z-index: 100;
  animation: fadeIn var(--transition-slow) ease;
}
.bottom-sheet {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 101;
  background: var(--card); border-radius: 20px 20px 0 0;
  padding: 8px 22px 34px; max-height: 75%;
  overflow-y: auto;
  animation: slideUp var(--transition-slow) ease;
}
.bottom-sheet .handle {
  width: 36px; height: 4px; border-radius: 2px; background: var(--line-2);
  margin: 0 auto 16px;
}
.bottom-sheet .sheet-title {
  font-family: var(--font-serif); font-weight: 600; font-size: 18px;
  color: var(--ink); margin-bottom: 16px;
}
.bottom-sheet .sheet-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-sans); font-size: 15px; color: var(--ink);
  cursor: pointer; min-height: 44px;
}
.bottom-sheet .sheet-item:active { opacity: 0.7; }
.bottom-sheet .sheet-item:last-child { border-bottom: none; }
.bottom-sheet .sheet-item svg { color: var(--muted); flex-shrink: 0; }
.bottom-sheet .sheet-item.danger { color: var(--accent); }
.bottom-sheet .sheet-item.danger svg { color: var(--accent); }

/* --- Toast --- */
.toast-container {
  position: absolute; bottom: 80px; left: 22px; right: 22px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: var(--radius-md);
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideUpFade var(--transition-med) ease;
  pointer-events: auto;
}
.toast.success { background: var(--sage); }
.toast.error { background: var(--accent); }
.toast.warning { background: var(--amber); color: var(--ink); }

/* --- Comment Bubble --- */
.comment-bubble {
  padding: 10px 14px; border-radius: 14px 14px 14px 4px;
  background: var(--card); border: 1px solid var(--line);
  margin-bottom: 10px; max-width: 85%;
}
.comment-bubble.own {
  border-radius: 14px 14px 4px 14px;
  background: var(--ink); color: var(--paper);
  margin-left: auto;
}
.comment-bubble .cb-author {
  font-family: var(--font-sans); font-size: 11px; font-weight: 600;
  margin-bottom: 2px;
}
.comment-bubble.own .cb-author { color: rgba(246,241,232,.7); }
.comment-bubble .cb-text {
  font-family: var(--font-sans); font-size: 13px; line-height: 1.45;
}
.comment-bubble .cb-time {
  font-family: var(--font-sans); font-size: 10px; color: var(--muted);
  margin-top: 4px;
}
.comment-bubble.own .cb-time { color: rgba(246,241,232,.5); }

/* --- Comment Input --- */
.comment-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.comment-input-row input {
  flex: 1; height: 40px; border: 1px solid var(--line); border-radius: 20px;
  padding: 0 14px; font-family: var(--font-sans); font-size: 13px;
  background: var(--card); color: var(--ink); outline: none;
}
.comment-input-row input::placeholder { color: var(--muted); }
.comment-input-row .send-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--ink);
  color: var(--paper); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.comment-input-row .send-btn:active { opacity: 0.85; }

/* --- Detail Sections --- */
.detail-section {
  padding: 16px 22px;
}
.detail-section .section-label {
  font-family: var(--font-sans); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 10px;
}
.detail-section .desc-text {
  font-family: var(--font-sans); font-size: 14px; line-height: 1.6; color: var(--ink-2);
}

/* --- Attachment Thumbnails --- */
.attachment-row {
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px;
}
.attachment-row::-webkit-scrollbar { display: none; }
.attachment-thumb {
  width: 72px; height: 72px; border-radius: var(--radius-sm); background: var(--paper-2);
  border: 1px solid var(--line); flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--font-sans); font-size: 9px; color: var(--muted); text-transform: uppercase; font-weight: 600;
  cursor: pointer;
}
.attachment-thumb:active { opacity: 0.7; }

/* --- Escalation Chain --- */
.escalation-chain { padding: 0; }
.esc-step {
  display: flex; gap: 12px; padding: 10px 0; position: relative;
}
.esc-step:not(:last-child)::before {
  content: ""; position: absolute; left: 15px; top: 36px; bottom: -6px;
  width: 2px; background: var(--line);
}
.esc-step .step-dot {
  width: 32px; height: 32px; border-radius: 50%; background: var(--paper-2);
  border: 2px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-size: 11px; font-weight: 700; color: var(--muted);
}
.esc-step.active .step-dot { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.esc-step.done .step-dot { background: var(--sage); border-color: var(--sage); color: var(--paper); }
.esc-step .step-info { flex: 1; }
.esc-step .step-role {
  font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--ink);
}
.esc-step .step-time {
  font-family: var(--font-sans); font-size: 11px; color: var(--muted); margin-top: 2px;
}

/* --- Notification Card --- */
.notif-card {
  display: flex; gap: 12px; padding: 14px 22px;
  border-bottom: 1px solid var(--line); cursor: pointer;
  transition: background var(--transition-fast);
  min-height: 56px;
}
.notif-card:active { background: var(--paper-2); }
.notif-card.unread { background: rgba(180,71,31,.03); }
.notif-card .notif-icon {
  width: 36px; height: 36px; border-radius: 50%; background: var(--paper-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--muted);
}
.notif-card.unread .notif-icon { background: var(--accent-light); color: var(--accent); }
.notif-card .notif-body { flex: 1; min-width: 0; }
.notif-card .notif-title {
  font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--ink);
  line-height: 1.35; margin-bottom: 2px;
}
.notif-card.unread .notif-title { font-weight: 600; }
.notif-card .notif-time {
  font-family: var(--font-sans); font-size: 11px; color: var(--muted);
}
.notif-card .notif-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0; align-self: center;
}

/* --- Notification Group Header --- */
.notif-group-header {
  padding: 16px 22px 8px;
  font-family: var(--font-serif); font-weight: 600; font-size: 14px;
  color: var(--muted); letter-spacing: -.01em;
}

/* --- Empty State --- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 40px; text-align: center;
}
.empty-state .empty-icon { color: var(--line-2); margin-bottom: 16px; }
.empty-state .empty-title {
  font-family: var(--font-serif); font-weight: 600; font-size: 18px; color: var(--ink);
  margin-bottom: 6px;
}
.empty-state .empty-desc {
  font-family: var(--font-sans); font-size: 13px; color: var(--muted); line-height: 1.5;
}

/* --- Quick Actions Bar --- */
.quick-actions {
  padding: 12px 22px 8px; display: flex; gap: 10px; flex-shrink: 0;
  border-top: 1px solid var(--line);
  background: var(--card);
}
.quick-actions .action-btn { flex: 1; }

/* --- Colleague Picker --- */
.colleague-list { max-height: 300px; overflow-y: auto; }
.colleague-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  cursor: pointer; min-height: 44px;
}
.colleague-item:active { opacity: 0.7; }
.colleague-item .col-name {
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--ink);
}
.colleague-item .col-role {
  font-family: var(--font-sans); font-size: 12px; color: var(--muted);
}

/* --- SLA Timer --- */
.sla-timer {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--accent-light); border: 1px solid rgba(180,71,31,.15);
}
.sla-timer .sla-label {
  font-family: var(--font-sans); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; color: var(--accent);
}
.sla-timer .sla-value {
  font-family: var(--font-serif); font-weight: 700; font-size: 22px; color: var(--accent);
}

/* --- Refresh Button --- */
.refresh-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; margin: 0 22px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md);
  font-family: var(--font-sans); font-size: 13px; color: var(--muted); font-weight: 500;
  cursor: pointer;
}
.refresh-btn:active { background: var(--paper-2); }

/* --- Deferral Form --- */
.sheet-form-group { margin-bottom: 14px; }
.sheet-form-group label {
  display: block; font-family: var(--font-sans); font-size: 12px;
  font-weight: 600; color: var(--ink-2); margin-bottom: 6px;
}
.sheet-form-group textarea, .sheet-form-group input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-family: var(--font-sans); font-size: 13px;
  background: var(--paper); color: var(--ink); outline: none; resize: vertical;
}
.sheet-form-group textarea:focus, .sheet-form-group input:focus {
  border-color: var(--accent);
}
.sheet-form-group .field-error { border-color: var(--accent); }
.sheet-form-group .error-text {
  font-family: var(--font-sans); font-size: 11px; color: var(--accent); margin-top: 4px;
}

/* --- Push Notification Banner --- */
.push-banner {
  margin: 0 22px 10px;
  padding: 12px 14px; border-radius: var(--radius-md);
  background: var(--ink); color: var(--paper);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; position: relative;
  animation: slideDown var(--transition-med) ease;
}
.push-banner .push-text { flex: 1; font-family: var(--font-sans); font-size: 13px; font-weight: 500; }
.push-banner .push-dismiss {
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  opacity: 0.6; cursor: pointer;
}
.push-banner .push-dismiss:hover { opacity: 1; }

/* --- Sync Status Chip --- */
.sync-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-sans); font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px;
}
.sync-chip.healthy { background: var(--sage-light); color: var(--sage); }
.sync-chip.pending { background: var(--amber-light); color: #8A5A15; }
.sync-chip.failed { background: rgba(180,71,31,.12); color: var(--accent); }

/* --- Local Queue Indicator --- */
.queue-indicator {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; margin: 0 22px 8px;
  background: var(--amber-light); border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 12px; color: #8A5A15; font-weight: 500;
}

/* --- Mark All Read --- */
.mark-all-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; margin: 0 22px;
  font-family: var(--font-sans); font-size: 13px; color: var(--accent); font-weight: 600;
  cursor: pointer; background: none; border: none;
}
.mark-all-btn:active { opacity: 0.7; }

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(100%); } to { transform: translateY(0); }
}
@keyframes slideUpFade {
  from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; }
}
@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; }
}

/* --- Utility --- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.px-22 { padding-left: 22px; padding-right: 22px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
