/* 员工项目管理系统 — visual system ported from the Claude Design project
   (员工项目管理系统/tokens + components/core + ui_kits). Navy + orange + white,
   specialised for a dense admin/dashboard product. */

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

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

:root {
  /* ---- Brand primaries ---- */
  --ad-orange:       #ec6626;
  --ad-orange-deep:  #d24e14;
  --ad-orange-tint:  #fdefe6;
  --ad-navy:         #021523;
  --ad-navy-700:     #122230;

  /* ---- Supporting brand ---- */
  --ad-green:        #0a9d46;
  --ad-green-deep:   #07823a;
  --ad-green-tint:   #e6f5ed;
  --ad-blue:         #0d52ad;
  --ad-blue-tint:    #e7eef8;
  --ad-gold:         #ffc30e;
  --ad-sale:         #d62828;
  --ad-sale-tint:    #fbeaea;

  /* ---- Grays ---- */
  --g50:  #f7f7f7;
  --g100: #f5f5f5;
  --g200: #ededed;
  --g300: #e5e5e5;
  --g400: #cfcfcf;
  --g500: #9aa0a6;
  --g600: #6b7280;

  /* ---- Semantic text ---- */
  --text-strong: #021523;
  --text-body:   #21313c;
  --text-muted:  #6b7280;
  --hair:        #e5e5e5;

  /* ---- Product surfaces ---- */
  --app-bg:       #eef1f5;
  --surface-card: #ffffff;
  --surface-sunk: #f7f7f7;

  /* ---- Semantic · task status (pending / in_progress / done + timing for a running subtask) ---- */
  --status-pending-fg:     var(--text-muted);
  --status-pending-bg:     var(--g200);
  --status-pending-dot:    var(--g500);
  --status-in_progress-fg: var(--ad-blue);
  --status-in_progress-bg: rgba(13, 82, 173, .10);
  --status-in_progress-dot:var(--ad-blue);
  --status-done-fg:        var(--ad-green-deep);
  --status-done-bg:        var(--ad-green-tint);
  --status-done-dot:       var(--ad-green);
  --status-timing-fg:      var(--ad-orange-deep);
  --status-timing-bg:      var(--ad-orange-tint);
  --status-timing-dot:     var(--ad-orange);

  /* ---- Semantic · priority (muted — daily-use safe). DB values: high / medium / low ---- */
  --prio-high:      var(--ad-sale);
  --prio-high-bg:   rgba(214, 40, 40, .09);
  --prio-medium:    var(--ad-orange);
  --prio-medium-bg: var(--ad-orange-tint);
  --prio-low:       var(--g500);
  --prio-low-bg:    var(--g100);

  --danger:  var(--ad-sale);
  --warning: var(--ad-orange);
  --success: var(--ad-green);
  --info:    var(--ad-blue);
  --star:    var(--ad-gold);

  /* ---- Typography ---- */
  --fh: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fb: 'Roboto', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fm: 'Inter', 'SF Mono', ui-monospace, 'JetBrains Mono', monospace;

  --text-xs: 11px; --text-sm: 12px; --text-base: 13px; --text-md: 14px;
  --text-lg: 16px; --text-xl: 19px; --text-2xl: 22px; --text-3xl: 26px; --text-4xl: 34px;

  /* ---- Spacing / radius / shadow / layout ---- */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 10px; --sp-4: 12px; --sp-5: 14px; --sp-6: 16px;
  --sp-7: 18px; --sp-8: 20px; --sp-10: 24px; --sp-12: 28px; --sp-14: 32px;

  --r-sm: 6px; --r-md: 8px; --r-lg: 9px; --r-xl: 12px; --r-2xl: 14px; --r-3xl: 18px;
  --r-pill: 36px; --r-full: 9999px;

  --maxw-app: 1240px; --sidebar-w: 212px; --topbar-h: 58px;

  --shadow-sm: 0 2px 8px rgba(2,21,35,.06);
  --shadow-md: 0 6px 18px rgba(2,21,35,.08);
  --shadow-lg: 0 14px 40px rgba(2,21,35,.12);

  /* ---- Motion ---- */
  --dur-fast: 0.12s; --dur-base: 0.2s; --dur-mid: 0.25s; --dur-slow: 0.32s;
  --ease-out: cubic-bezier(.4,0,.2,1);
  --trans-color: color var(--dur-base), background-color var(--dur-base), border-color var(--dur-base);
  --trans-card:  box-shadow var(--dur-mid), transform var(--dur-mid);

  /* Back-compat aliases so any un-migrated selector still resolves to something sane */
  --primary: var(--ad-navy);
  --border: var(--hair);
  --muted: var(--text-muted);
  --text: var(--text-body);
  --card: var(--surface-card);
  --bg: var(--app-bg);
  --radius: var(--r-2xl);
}

@keyframes pm-blink { 0%, 100% { opacity: 1; } 50% { opacity: .28; } }
@keyframes pm-spin { to { transform: rotate(360deg); } }
@keyframes pm-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

body {
  font-family: var(--fb);
  background: var(--app-bg);
  color: var(--text-body);
  line-height: 1.5;
  font-size: var(--text-md);
}

h1, h2, h3 { font-family: var(--fh); color: var(--text-strong); }

/* ============ Buttons ============ */
button {
  font-family: var(--fb);
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  padding: 11px 18px;
  font-size: var(--text-md);
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--trans-color);
  background: var(--ad-navy);
  color: #fff;
}
button:hover { background: var(--ad-navy-700); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.secondary { background: #fff; color: var(--text-strong); border-color: var(--hair); }
button.secondary:hover { background: var(--g50); }
button.ghost { background: transparent; color: var(--text-body); border-color: transparent; }
button.ghost:hover { background: var(--g100); }
button.danger { background: #fff; color: var(--ad-sale); border-color: rgba(214,40,40,.28); }
button.danger:hover { background: var(--ad-sale-tint); }
button.ai { background: var(--ad-orange-tint); color: var(--ad-orange-deep); border-color: rgba(236,102,38,.28); }
button.ai:hover { background: #fbe3d3; }
button.success { background: var(--ad-green); }
button.success:hover { background: var(--ad-green-deep); }
button.sm { padding: 7px 13px; font-size: var(--text-base); }

.spark {
  width: 13px; height: 13px; display: inline-block; margin-right: 6px; vertical-align: -2px;
  background: var(--ad-orange);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l1.9 5.6L19.5 9.5l-5.6 1.9L12 17l-1.9-5.6L4.5 9.5l5.6-1.9z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l1.9 5.6L19.5 9.5l-5.6 1.9L12 17l-1.9-5.6L4.5 9.5l5.6-1.9z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ============ Forms ============ */
input, textarea, select {
  font-family: var(--fb);
  font-size: var(--text-md);
  color: var(--text-strong);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  padding: 10px 12px;
  width: 100%;
  outline: none;
  background: #fff;
  transition: var(--trans-color);
}
.inline-select {
  width: auto;
  min-width: 120px;
  display: inline-block;
  margin-left: 6px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.inline-edit-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.inline-status {
  min-width: 44px;
}
input:focus, textarea:focus, select:focus { border-color: var(--ad-navy); }
textarea { resize: vertical; min-height: 70px; line-height: 1.6; }
label { font-size: var(--text-base); font-weight: 600; color: var(--text-strong); display: block; margin-bottom: 6px; }
.form-row { display: flex; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 160px; }

/* ============ Cards ============ */
.card {
  background: var(--surface-card);
  border: 1px solid var(--hair);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-8) var(--sp-7);
  transition: var(--trans-card);
}
.card h2 { font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--sp-5); letter-spacing: -.2px; }

/* ============ Status badge (todo / doing / done / timing) ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  font-family: var(--fb);
  font-weight: 700;
  font-size: 11.5px;
  white-space: nowrap;
  background: var(--status-pending-bg);
  color: var(--status-pending-fg);
}
.badge::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--status-pending-dot);
}
.badge.pending { background: var(--status-pending-bg); color: var(--status-pending-fg); }
.badge.pending::before { background: var(--status-pending-dot); }
.badge.in_progress { background: var(--status-in_progress-bg); color: var(--status-in_progress-fg); }
.badge.in_progress::before { background: var(--status-in_progress-dot); }
.badge.done { background: var(--status-done-bg); color: var(--status-done-fg); }
.badge.done::before { background: var(--status-done-dot); }
.badge.running { background: var(--status-timing-bg); color: var(--status-timing-fg); }
.badge.running::before { background: var(--status-timing-dot); animation: pm-blink 1s ease-in-out infinite; }

/* ============ Priority tag / select ============ */
.priority-select {
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  flex: none;
  height: 24px;
  padding: 0 22px 0 10px;
  border-radius: var(--r-sm);
  font-family: var(--fb);
  font-weight: 700;
  font-size: 11.5px;
  border: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 14px;
}
.priority-select.priority-high { background-color: var(--prio-high-bg); color: var(--prio-high); }
.priority-select.priority-medium { background-color: var(--prio-medium-bg); color: var(--prio-medium); }
.priority-select.priority-low { background-color: var(--prio-low-bg); color: var(--prio-low); }

/* ============ Progress bar ============ */
.progress-bar { background: var(--g200); border-radius: var(--r-full); height: 8px; overflow: hidden; flex: 1; }
.progress-bar > div { background: var(--ad-navy); height: 100%; border-radius: var(--r-full); transition: width var(--dur-slow) var(--ease-out); }
.progress-bar.complete > div, .task-progress.complete .progress-bar > div { background: var(--ad-green); }
.task-progress { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-4); font-family: var(--fm); font-size: var(--text-base); font-weight: 700; color: var(--text-strong); }

/* ============ Difficulty stars ============ */
.stars { letter-spacing: 1px; color: var(--ad-gold); font-size: 14px; }

/* ============ Empty state ============ */
.empty-state {
  border: 1px dashed var(--g400);
  border-radius: var(--r-2xl);
  background: var(--surface-card);
  padding: 56px 24px;
  text-align: center;
}
.empty-state .icon-tile {
  width: 60px; height: 60px; margin: 0 auto 16px;
  border-radius: var(--r-2xl);
  background: var(--ad-orange-tint);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.empty-state .empty-title { font-family: var(--fh); font-size: 17px; font-weight: 700; color: var(--text-strong); }
.empty-state .empty-desc { font-family: var(--fb); font-size: 13.5px; color: var(--text-muted); margin-top: 8px; max-width: 340px; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* ============ Topbar ============ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--hair);
  display: flex; align-items: center; gap: 16px;
  padding: 0 22px;
}
.topbar .brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.topbar .brand .mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--ad-navy);
  display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0;
}
.topbar .brand .mark span { color: #fff; font: 800 15px var(--fh); letter-spacing: -.5px; }
.topbar .brand .mark .pip {
  position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ad-orange); border: 2px solid #fff;
}
.topbar .brand .name { font: 700 15.5px var(--fh); color: var(--text-strong); letter-spacing: -.3px; }
.topbar .spacer { flex: 1; }
.topbar .avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--ad-navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font: 700 13px var(--fh); flex-shrink: 0;
}
.topbar h1 { font-size: var(--text-lg); }
.topbar .user { color: var(--text-muted); font-size: var(--text-base); display: flex; gap: 12px; align-items: center; }

/* Language switch (中 / EN) & role/segmented toggle */
.seg-toggle {
  display: inline-flex; background: var(--g100); border: 1px solid var(--hair);
  border-radius: var(--r-lg); padding: 3px; gap: 2px; flex-shrink: 0;
}
.seg-toggle button {
  border: none; background: transparent; color: var(--text-muted);
  box-shadow: none; border-radius: var(--r-md); padding: 6px 15px;
  font: 600 13px var(--fb); cursor: pointer; transition: var(--trans-color);
}
.seg-toggle button.active { background: #fff; color: var(--text-strong); box-shadow: var(--shadow-sm); }

/* ============ App shell: sidebar + main ============ */
.app-shell { display: flex; min-height: calc(100vh - var(--topbar-h)); }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: #fff; border-right: 1px solid var(--hair);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 3px;
}
.sidebar .group-label {
  font: 700 11px var(--fh); letter-spacing: .14em; color: var(--text-muted);
  padding: 6px 12px 10px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; border-radius: var(--r-lg); padding: 10px 12px;
  font: 500 14px var(--fb); color: var(--text-body); cursor: pointer; transition: var(--trans-color);
}
.nav-item:hover { background: var(--g100); }
.nav-item.active { background: var(--ad-orange-tint); color: var(--ad-orange-deep); font-weight: 700; }
.nav-item .icon { font-size: 16px; width: 18px; text-align: center; }
.sidebar .stat-tile {
  margin-top: auto; padding: 12px; border-radius: var(--r-xl); background: var(--ad-navy); color: #fff;
}
.sidebar .stat-tile .num { font: 800 22px var(--fh); }
.sidebar .stat-tile .label { font: 400 11.5px var(--fb); color: #9fb4c4; margin-top: 2px; }

.main-area { flex: 1; min-width: 0; padding: 26px 30px 60px; max-width: var(--maxw-app); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h1 { margin: 0; font: 800 26px var(--fh); color: var(--text-strong); letter-spacing: -.6px; }
.section-head p { margin: 6px 0 0; font: 400 13.5px var(--fb); color: var(--text-muted); }

.pm-section { display: none; }
.pm-section.active { display: block; }

/* ============ Task cards ============ */
.task {
  background: var(--surface-card);
  border: 1px solid var(--hair);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: var(--sp-6);
  transition: var(--trans-card);
}
.task-head { padding: 16px 18px; display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.task-head .title { font: 700 16.5px var(--fh); color: var(--text-strong); letter-spacing: -.3px; flex: 1; min-width: 200px; }
.task-head .task-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.task-meta { padding: 0 18px 14px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: var(--text-base); color: var(--text-muted); }
.task-meta b { color: var(--text-strong); font-weight: 600; }
.task-meta a.link-btn { color: var(--ad-blue); font-weight: 600; text-decoration: underline; cursor: pointer; }
.task > .task-progress { padding: 0 18px 16px; margin-top: 0; }
.learning-box, .feedback-box {
  margin: 0 18px 14px;
  border: 1px solid var(--hair);
  border-radius: var(--r-xl);
  background: #fff;
  padding: 12px 14px;
}
.learning-title { font: 700 13px var(--fh); color: var(--text-strong); margin-bottom: 10px; }
.learning-item { padding: 8px 0; border-top: 1px solid var(--g200); font-size: var(--text-base); color: var(--text-body); }
.learning-item:first-child { border-top: none; padding-top: 0; }
.learning-meta { color: var(--text-muted); font-size: 11.5px; margin-bottom: 4px; }
.feedback-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.form-row.compact { margin-bottom: 10px; }

.subtasks { border-top: 1px solid var(--g200); background: var(--surface-sunk); }
.subtask {
  display: flex; align-items: center; gap: 14px; padding: 12px 18px;
  border-bottom: 1px solid var(--g200); flex-wrap: wrap;
}
.subtask:last-child { border-bottom: none; }
.subtask .st-title { flex: 1; min-width: 180px; font: 600 14px var(--fb); color: var(--text-strong); }
.subtask .st-title small { display: block; font: 400 12px var(--fb); color: var(--text-muted); margin-top: 2px; font-weight: 400; }
.subtask.done .st-title { color: var(--text-muted); }
.time { font-family: var(--fm); font-weight: 700; font-size: 12.5px; white-space: nowrap; color: var(--text-body); min-width: 70px; text-align: right; }
.subtask.running .time, .time.timing { color: var(--ad-orange-deep); }

/* ============ Modal ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(2,21,35,.5);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.modal {
  width: 560px; max-width: 100%; max-height: 85vh; overflow: auto;
  background: var(--surface-card); border-radius: var(--r-2xl); box-shadow: var(--shadow-lg);
  animation: pm-fade-up var(--dur-mid) var(--ease-out);
}
.modal-head {
  padding: 20px 22px; border-bottom: 1px solid var(--g200);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.modal-head h3 { margin: 0; font: 800 18px var(--fh); color: var(--text-strong); }
.modal-close {
  width: 30px; height: 30px; border: none; background: var(--g100); border-radius: var(--r-md);
  color: var(--text-muted); font-size: 13px; cursor: pointer; flex-shrink: 0; padding: 0;
}
.modal-close:hover { background: var(--g200); }
.modal-body { padding: 20px 22px; }
.modal-actions { padding: 16px 22px; border-top: 1px solid var(--g200); display: flex; justify-content: flex-end; gap: 10px; }
.sub-edit { display: flex; gap: 8px; margin-bottom: 8px; align-items: flex-start; }
.sub-edit input.hours { width: 90px; flex: none; }

/* ============ Reports ============ */
table { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--hair); }
th { color: var(--text-muted); font-weight: 600; font-size: var(--text-base); }
.tag-ok { color: var(--ad-green-deep); font-weight: 600; }
.tag-warn { color: var(--ad-sale); font-weight: 600; }
.table-wrap { overflow-x: auto; }

.error { color: var(--ad-sale); font-size: var(--text-base); margin-top: 8px; }
.muted { color: var(--text-muted); font-size: var(--text-base); }

/* ============ Login ============ */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--app-bg); }
.login-card { width: 360px; }
.login-card h1 { font-size: var(--text-2xl); font-weight: 800; margin-bottom: 6px; text-align: center; letter-spacing: -.4px; }
.login-card p { text-align: center; margin-bottom: 18px; }
.login-card button[type=submit] { width: 100%; margin-top: 6px; }

/* ============ Employee (mobile-first) ============ */
.employee-app { max-width: 460px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.employee-header {
  flex-shrink: 0; padding: 14px 18px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.employee-header .greet { font: 400 12px var(--fb); color: var(--text-muted); }
.employee-header .me { font: 800 19px var(--fh); color: var(--text-strong); letter-spacing: -.3px; }
.employee-header .right { display: flex; align-items: center; gap: 10px; }
.employee-header .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--ad-navy); color: #fff; display: flex; align-items: center; justify-content: center; font: 700 14px var(--fh); }

.employee-body { flex: 1; padding: 4px 16px 90px; background: var(--app-bg); }

.checkin-hero {
  border-radius: var(--r-3xl); padding: 22px 20px; margin-top: 12px;
  background: radial-gradient(120% 140% at 88% 8%, #123247 0%, #021523 60%);
  color: #fff; box-shadow: var(--shadow-md);
}
.checkin-hero .date { font: 400 12.5px var(--fb); color: #9fb4c4; }
.checkin-hero .title { font: 700 18px var(--fh); margin-top: 2px; }
.checkin-hero .times { display: flex; gap: 12px; margin-top: 20px; }
.checkin-hero .time-tile { flex: 1; background: rgba(255,255,255,.07); border-radius: var(--r-xl); padding: 14px; text-align: center; }
.checkin-hero .time-tile .lbl { font: 400 11.5px var(--fb); color: #9fb4c4; }
.checkin-hero .time-tile .val { font: 800 26px var(--fm); margin-top: 4px; color: #5b7285; }
.checkin-hero .time-tile .val.set { color: #fff; }
.checkin-hero .actions { display: flex; gap: 12px; margin-top: 16px; }
.checkin-hero .actions button {
  flex: 1; border: none; border-radius: 11px; padding: 13px; font: 700 14px var(--fb);
}
.checkin-hero .actions button.clock-in { background: var(--ad-orange); color: var(--ad-navy); }
.checkin-hero .actions button.clock-in:disabled { background: rgba(255,255,255,.12); color: #7f97a8; opacity: 1; }
.checkin-hero .actions button.clock-out { background: #fff; color: var(--ad-navy); }
.checkin-hero .actions button.clock-out:disabled { background: rgba(255,255,255,.06); color: #4a5f6f; opacity: 1; }

.summary-card { margin-top: 16px; background: #fff; border: 1px solid var(--hair); border-radius: var(--r-3xl); padding: 16px; }
.summary-card .hint { font: 400 11.5px var(--fb); color: var(--text-muted); margin-top: 8px; }

.quick-task-card textarea { min-height: 84px; }
.quick-task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.quick-task-types {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}
.quick-task-types button.active {
  background: var(--ad-orange-tint);
  color: var(--ad-orange-deep);
  border-color: rgba(236,102,38,.28);
}
.quick-task-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.quick-task-actions button {
  flex: 1;
  min-width: 150px;
}

.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 460px; margin: 0 auto;
  border-top: 1px solid var(--hair); background: #fff; display: flex; padding: 8px 8px 14px;
  z-index: 30;
}
.tab-bar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: none; background: transparent; color: var(--text-muted); font-weight: 500; padding: 4px;
}
.tab-bar button .icon { font-size: 19px; line-height: 1; }
.tab-bar button .label { font-size: 11px; }
.tab-bar button.active { color: var(--ad-orange-deep); font-weight: 700; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: auto; flex-direction: row; overflow-x: auto; border-right: none;
    border-bottom: 1px solid var(--hair); padding: 10px 12px; gap: 6px;
  }
  .sidebar .group-label { display: none; }
  .sidebar .stat-tile { display: none; }
  .nav-item { flex-shrink: 0; }
  .main-area { padding: 18px 16px 40px; }
  .task-meta { gap: 12px; }
}
@media (max-width: 640px) {
  .container { margin: 12px auto; }
  .time { text-align: left; }
  .topbar .user span:not(.avatar) { display: none; }
  .quick-task-actions button { min-width: 0; }
}
