/* ============================================================
   Modena World — styles
   Brand: white/light neutral · near-black ink · red accent
   Type: Poppins (headings) · Inter (body)
   ============================================================ */

:root {
  --ink: #1a1a1a;
  --ink-soft: #55565a;
  --red: #e60000;
  --red-dark: #c40000;
  --bg: #f7f7f5;
  --card: #ffffff;
  --line: #e6e6e2;
  --ok: #0e8a5f;
  --warn: #b7791f;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20,20,20,.07), 0 8px 24px rgba(20,20,20,.05);
  --sidebar-w: 218px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Poppins', sans-serif; font-weight: 600; margin: 0 0 .4em; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 13px; margin-top: 1.5em; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
a { color: var(--red); }
button { font: inherit; cursor: pointer; }

/* ---------- wordmark ---------- */
.wordmark { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 40px; letter-spacing: -.02em; color: var(--ink); display: flex; align-items: center; justify-content: center; line-height: 1; user-select: none; }
.wordmark-o { height: .78em; width: .78em; margin: 0 .04em; transform: translateY(.03em); }
.wordmark-sm { font-size: 21px; justify-content: flex-start; }

/* ---------- login ---------- */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 42px 36px 34px; width: 100%; max-width: 380px; }
.login-sub { text-align: center; color: var(--ink-soft); margin: 10px 0 26px; font-size: 13.5px; }
.login-card label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 5px; }
.login-card label small { font-weight: 400; color: var(--ink-soft); }
.login-card input { width: 100%; padding: 11px 12px; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: #fcfcfb; }
.login-card input:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
.login-foot { text-align: center; font-size: 13px; margin: 18px 0 0; }

/* ---------- buttons & alerts ---------- */
.btn-primary { padding: 12px; font: 600 15px 'Inter', sans-serif; color: #fff; background: var(--red); border: 0; border-radius: 8px; transition: background .15s; width: 100%; }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.btn-inline { width: auto; padding: 9px 16px; font-size: 14px; }
.btn-ghost { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-size: 13.5px; color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--ink-soft); color: var(--ink); }
.btn-ghost.danger { color: #a11212; border-color: #eecaca; }
.alert { background: #fdecec; color: #8f1010; border: 1px solid #f5c2c2; border-radius: 8px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 6px; }

/* ---------- app shell ---------- */
.app-body { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--card); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 6px; position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; }
.side-brand { padding: 4px 10px 16px; }
.sidebar nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.nav-item:hover { background: #f1f1ee; }
.nav-item.active { background: #fdeaea; color: var(--red-dark); font-weight: 600; }
.nav-item.stub { color: #b9b9b4; cursor: default; }
.nav-item.stub:hover { background: none; }
.nav-item.stub small { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.side-user { border-top: 1px solid var(--line); padding-top: 12px; display: flex; gap: 10px; align-items: center; font-size: 13px; }
.menu-btn { display: none; position: fixed; top: 12px; left: 12px; z-index: 40; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 18px; }

.main { flex: 1; margin-left: var(--sidebar-w); padding: 26px 32px 80px; max-width: calc(var(--sidebar-w) + 1060px); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-actions { display: flex; gap: 10px; align-items: center; }
.select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font: inherit; }

.avatar { width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.avatar-xs { width: 22px; height: 22px; font-size: 11px; }
.user-name { font-weight: 600; }
.link-quiet { color: var(--ink-soft); text-decoration: none; font-size: 13.5px; }
.link-quiet:hover { color: var(--red); }

/* ---------- work sections & task rows ---------- */
.work-section { margin-bottom: 14px; }
.section-head { width: 100%; text-align: left; background: none; border: 0; padding: 10px 4px; font: 600 14px 'Poppins', sans-serif; color: var(--ink); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.section-head .count { background: #ececea; border-radius: 20px; padding: 1px 9px; font: 600 12px 'Inter', sans-serif; color: var(--ink-soft); }
.section-head.danger { color: var(--red-dark); }
.section-head.danger .count { background: #fdeaea; color: var(--red-dark); }
.section-body.hidden { display: none; }
.empty { color: #b9b9b4; font-size: 13.5px; padding: 10px 4px; }

.task-row { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid #efefec; cursor: pointer; transition: background .12s; }
.task-row:hover { background: #fbfbf9; }
.task-row.done .task-title { text-decoration: line-through; color: #b0b0aa; }
.task-title { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tick { width: 22px; height: 22px; flex: none; border: 2px solid #cfcfc9; border-radius: 50%; background: var(--card); color: #fff; font-size: 12px; line-height: 1; }
.tick:hover { border-color: var(--ok); }
.tick.ticked { background: var(--ok); border-color: var(--ok); }
.sub-count { font-size: 12px; color: var(--ink-soft); background: #f1f1ee; border-radius: 6px; padding: 2px 7px; }
.chip { font-size: 11.5px; font-weight: 600; color: var(--chip, var(--ink)); background: color-mix(in srgb, var(--chip, #888) 12%, white); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.chip-soft { --chip: #55565a; }
.pdot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.p-urgent { background: var(--red); box-shadow: 0 0 0 3px #fdd9d9; }
.p-high { background: #e8871e; }
.p-normal { background: #b9c4cf; }
.p-low { background: #e3e3df; }
.due { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; min-width: 58px; text-align: right; }
.due.overdue { color: var(--red-dark); font-weight: 600; }

/* ---------- projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.project-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .12s; }
.project-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(20,20,20,.1); }
.project-dot { width: 12px; height: 12px; border-radius: 4px; margin-bottom: 10px; }
.inline-dot { display: inline-block; margin: 0 8px 0 0; }
.project-meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-soft); margin: 12px 0 8px; }
.progress { height: 5px; background: #efefec; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tab { padding: 9px 14px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--red-dark); border-bottom-color: var(--red); font-weight: 600; }
.tab-quiet { margin-left: auto; font-style: italic; }
.note-line { font-size: 13px; margin: -4px 0 12px; }

/* ---------- slide-over panel ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20,20,20,.28); z-index: 50; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--card); z-index: 60; box-shadow: -8px 0 30px rgba(20,20,20,.15); display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-close { background: none; border: 0; font-size: 26px; color: var(--ink-soft); line-height: 1; }
.panel-body { padding: 18px 22px 40px; overflow-y: auto; }
.panel-title { font-size: 19px; }
.panel-meta { font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-status { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 10px; border-radius: 20px; background: #f1f1ee; color: var(--ink-soft); }
.st-completed { background: #e2f3ec; color: var(--ok); }
.st-waiting { background: #fbf0dd; color: var(--warn); }
.st-in_progress { background: #e4eefc; color: #1c5fbf; }
.status-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 4px; }
.st-btn { border: 1px solid var(--line); background: var(--card); border-radius: 20px; padding: 6px 13px; font-size: 13px; }
.st-btn.active { border-color: var(--red); color: var(--red-dark); font-weight: 600; background: #fdeaea; }
.panel-desc { background: #fafaf8; border: 1px solid #efefec; border-radius: 8px; padding: 12px 14px; font-size: 14px; margin-top: 12px; }

.sub-list { display: flex; flex-direction: column; gap: 2px; }
.sub-item { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 5px 2px; }
.sub-item.done { color: #b0b0aa; text-decoration: line-through; }
.sub-item small { color: var(--ink-soft); text-decoration: none; }
.sub-del { margin-left: auto; background: none; border: 0; color: #c9c9c3; font-size: 16px; }
.sub-del:hover { color: var(--red); }
.sub-add { display: flex; gap: 8px; margin-top: 8px; }
.sub-add input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

.file-list { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.file-list a { text-decoration: none; }
.file-add { display: inline-block; margin-top: 10px; cursor: pointer; }

.comment-list { display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; gap: 10px; font-size: 14px; }
.comment.c-problem { background: #fdf3f3; border: 1px solid #f5dede; border-radius: 8px; padding: 10px; }
.comment.c-instruction { background: #fdf7ec; border: 1px solid #f0e3c8; border-radius: 8px; padding: 10px; }
.tag-problem { color: var(--red-dark); font-size: 12px; font-weight: 600; }
.tag-instruction { color: var(--warn); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.comment-add { margin-top: 12px; }
.comment-add textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; }
.comment-actions { display: flex; gap: 8px; margin-top: 8px; }
.panel-danger { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(20,20,20,.32); z-index: 70; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto; }
.modal { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 520px; padding: 26px 28px; }
.modal label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 0; }
.modal input:not([type=checkbox]):not([type=color]), .modal select, .modal textarea { width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fcfcfb; }
.modal input:focus, .modal select:focus, .modal textarea:focus { outline: 2px solid var(--red); border-color: transparent; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check-line { display: flex; align-items: center; gap: 8px; font-weight: 500 !important; margin-top: 22px !important; }
.repeat-days { font-weight: 400; color: var(--ink-soft); font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.color-input { width: 60px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; margin-top: 5px; display: block; }

/* ---------- Sanjay ops UI ---------- */
.ops-body { display: block; }
.ops-main { padding: 18px 16px 60px; max-width: 560px; margin: 0 auto; }
.ops-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.ops-head h1 { font-size: 22px; margin-bottom: 2px; }
.big-empty { font-size: 16px; text-align: center; padding: 60px 0; }
.ops-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.ops-card.ops-done { opacity: .62; }
.ops-flag { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--warn); background: #fbf0dd; border-radius: 6px; padding: 3px 9px; margin: 0 6px 8px 0; }
.ops-flag-red { color: var(--red-dark); background: #fdeaea; }
.ops-card-main { display: flex; gap: 14px; align-items: flex-start; }
.ops-tick { width: 34px; height: 34px; flex: none; border: 2.5px solid #cfcfc9; border-radius: 50%; background: var(--card); color: #fff; font-size: 17px; }
.ops-tick.ticked { background: var(--ok); border-color: var(--ok); }
.ops-title { font-size: 16.5px; font-weight: 600; padding-top: 5px; }
.ops-desc { font-size: 13.5px; font-weight: 400; color: var(--ink-soft); margin-top: 4px; }
.ops-actions { display: flex; gap: 8px; margin-top: 13px; }
.ops-btn { flex: 1; text-align: center; background: #f7f7f5; border: 1px solid var(--line); border-radius: 9px; padding: 9px 4px; font-size: 13.5px; font-weight: 500; }
.ops-btn:active { background: #efefec; }
.ops-note-box { margin-top: 10px; display: flex; gap: 8px; align-items: flex-end; }
.ops-note-box textarea { flex: 1; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font: inherit; }
.ops-done-head { margin: 22px 0 10px; font-size: 15px; color: var(--ink-soft); }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 14px); background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 30px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .22s; z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--red-dark); }

/* ---------- misc / legacy proof page ---------- */
.container { max-width: 760px; margin: 34px auto; padding: 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 26px; margin-top: 18px; }
.perm-list { list-style: none; padding: 0; margin: 8px 0 0; }
.perm-list li { padding: 5px 0; font-size: 14px; }
.perm-list .yes { color: var(--ok); font-weight: 500; }
.perm-list .no { color: #b9b9b4; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .18s; }
  .sidebar.open { transform: none; }
  .menu-btn { display: block; }
  .main { margin-left: 0; padding: 60px 16px 80px; }
  .grid-2 { grid-template-columns: 1fr; }
  .task-row .chip-soft { display: none; }
}
@media (max-width: 480px) {
  .login-card { padding: 32px 22px 28px; }
  .wordmark { font-size: 34px; }
  .task-row .chip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Phase 6: planning ---------- */
.back-link { text-decoration: none; font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.back-link:hover { color: var(--red); }
.plan-list { display: flex; flex-direction: column; }
.plan-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; text-decoration: none; color: var(--ink); transition: transform .1s, box-shadow .1s; }
.plan-row:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.plan-row-meta { font-size: 12.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.plan-arrow { color: #c9c9c3; font-size: 18px; }
.plan-title { width: 100%; border: 0; background: none; font: 700 28px 'Poppins', sans-serif; color: var(--ink); padding: 4px 0 10px; letter-spacing: -.01em; }
.plan-title:focus { outline: none; border-bottom: 2px solid var(--red); }
.save-state { font-size: 13px; }

.editor-shell { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 54px 30px; min-height: 320px; }
.editor-shell .ce-block__content, .editor-shell .ce-toolbar__content { max-width: 100%; }
.ce-block { position: relative; }
.convert-btn { position: absolute; z-index: 20; background: var(--ink); color: #fff; border: 0; border-radius: 7px; padding: 4px 10px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow); }
.convert-btn:hover { background: var(--red); }
.task-chip { display: inline-block; margin: 3px 6px 0 0; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 2px 9px; background: #f1f1ee; color: var(--ink-soft); vertical-align: middle; user-select: none; }
.task-chip.st-completed { background: #e2f3ec; color: var(--ok); }
.task-chip.st-in_progress { background: #e4eefc; color: #1c5fbf; }
.task-chip.st-waiting { background: #fbf0dd; color: var(--warn); }
.plan-extras { max-width: 760px; }

/* ---------- Phase 6: notes ---------- */
.note-quick { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.note-quick input[name=title] { border: 0; font: 600 16px 'Inter', sans-serif; padding: 4px 2px; background: none; }
.note-quick input[name=title]:focus, .note-quick textarea:focus { outline: none; }
.note-quick textarea { border: 0; background: none; font: inherit; resize: vertical; padding: 2px; }
.note-quick-row { display: flex; gap: 10px; align-items: center; border-top: 1px solid #f1f1ee; padding-top: 10px; }
.tag-input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; background: #fcfcfb; }

.note-grid { columns: 3 260px; column-gap: 14px; }
.note-card { break-inside: avoid; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px; }
.note-card.pinned { border-color: #f0d9a8; background: #fffdf7; }
.note-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.pin-btn { background: none; border: 0; font-size: 14px; opacity: .25; }
.pin-btn.on, .pin-btn:hover { opacity: 1; }
.note-body { font-size: 13.5px; color: #3c3d40; margin: 8px 0 0; }
.note-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 11.5px; color: var(--ink-soft); text-decoration: none; background: #f1f1ee; border-radius: 6px; padding: 3px 8px; }
.tag:hover { color: var(--red-dark); background: #fdeaea; }
.note-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; margin-top: 10px; flex-wrap: wrap; }
.note-actions { display: flex; gap: 6px; }
.mini-btn { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 11.5px; color: var(--ink-soft); }
.mini-btn:hover { color: var(--ink); border-color: var(--ink-soft); }
.mini-btn.danger:hover { color: var(--red-dark); border-color: #eecaca; }

@media (max-width: 820px) {
  .editor-shell { padding: 14px 16px 24px; }
  .note-grid { columns: 1; }
}

/* ---------- Phase 7: meetings ---------- */
.meet-info { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: -4px 0 16px; }
.meet-info label { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.meet-info input[type=date] { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--card); }
.meet-attendees { display: flex; align-items: center; gap: 5px; font-size: 13px; }
.meet-date { font-weight: 600; color: var(--ink); }
.avatar-stack { display: inline-flex; gap: 3px; }
.attendee-checks { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; }
.attendee-checks .check-line { margin-top: 4px !important; font-size: 14px; }

.meet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.meet-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px 16px; margin-bottom: 14px; }
.meet-grid .meet-block { margin-bottom: 0; }
.meet-block h3 { margin-top: 0; }
.meet-block textarea { width: 100%; border: 0; background: none; font: inherit; resize: vertical; padding: 2px 0; line-height: 1.55; }
.meet-block textarea:focus { outline: none; }
.instructions-block { border-left: 4px solid var(--warn); background: #fffcf5; }
.instructions-block h3 { color: var(--warn); }

.action-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.action-table th { text-align: left; font: 600 12px 'Inter', sans-serif; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); padding: 4px 8px 8px 0; border-bottom: 1px solid var(--line); }
.action-table td { padding: 9px 8px 9px 0; border-bottom: 1px solid #f1f1ee; vertical-align: middle; }
.ai-item { font-weight: 500; }
.ai-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.ai-add { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ai-add input[name=item] { flex: 1; min-width: 200px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fcfcfb; }

@media (max-width: 820px) {
  .meet-grid { grid-template-columns: 1fr; }
}

/* ---------- Phase 8: approvals ---------- */
.ap-status { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 4px 12px; border-radius: 20px; white-space: nowrap; }
.ap-pending { background: #fbf0dd; color: var(--warn); }
.ap-approved { background: #e2f3ec; color: var(--ok); }
.ap-rejected { background: #fdeaea; color: var(--red-dark); }
.ap-discuss { background: #e4eefc; color: #1c5fbf; }
.ap-title { margin-bottom: 10px; }
.ap-details { font-size: 14.5px; line-height: 1.65; }
.decision-box { border-left: 4px solid var(--ink); }
.decision-box textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; resize: vertical; background: #fcfcfb; }
.decide-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.btn-decide { border: 0; border-radius: 8px; padding: 11px 20px; font: 600 14px 'Inter', sans-serif; color: #fff; }
.btn-decide.approve { background: var(--ok); }
.btn-decide.reject { background: var(--red-dark); }
.btn-decide.discuss { background: #1c5fbf; }
.btn-decide:hover { filter: brightness(1.08); }
.decision-block.ap-approved-b { border-left: 4px solid var(--ok); }
.decision-block.ap-rejected-b { border-left: 4px solid var(--red-dark); }
.decision-block.ap-discuss-b { border-left: 4px solid #1c5fbf; }

/* ---------- Phase 9: dashboard, team, search ---------- */
.side-search { padding: 0 4px 12px; }
.side-search input { width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font: 13.5px 'Inter', sans-serif; background: #fbfbf9; }
.side-search input:focus { outline: 2px solid var(--red); border-color: transparent; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; transition: transform .1s; }
.stat-card:hover { transform: translateY(-2px); }
.stat-num { font: 700 26px 'Poppins', sans-serif; line-height: 1.1; }
.stat-label { font-size: 12.5px; color: var(--ink-soft); }
.stat-danger .stat-num { color: var(--red-dark); }
.stat-warn .stat-num { color: var(--warn); }

.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; align-items: start; }
.dash-h { font-size: 15px; display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.dash-h .count { background: #fdeaea; color: var(--red-dark); border-radius: 20px; padding: 1px 9px; font: 600 12px 'Inter', sans-serif; }

.attn-list { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.attn-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid #f1f1ee; cursor: pointer; font-size: 14px; }
.attn-item:last-child { border-bottom: 0; }
.attn-item:hover { background: #fbfbf9; }
.attn-icon { flex: none; }
.attn-text { flex: 1; min-width: 0; }
.attn-when { flex: none; font-size: 12px; }
.attn-problem { border-left: 3px solid var(--red); }
.attn-instruction { border-left: 3px solid var(--warn); }
.attn-overdue { border-left: 3px solid var(--red-dark); }
.attn-waiting { border-left: 3px solid #9aa7b4; }
.attn-approval { border-left: 3px solid #1c5fbf; }
.search-type { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); background: #f1f1ee; border-radius: 6px; padding: 3px 8px; }

.team-mini, .proj-mini { display: flex; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 13px; margin-bottom: 8px; text-decoration: none; color: var(--ink); }
.team-mini:hover, .proj-mini:hover { box-shadow: var(--shadow); }
.proj-mini { flex-direction: column; align-items: stretch; gap: 7px; }
.proj-mini-top { display: flex; justify-content: space-between; font-size: 14px; }
.team-mini-body { min-width: 0; }
.team-mini-stats { font-size: 12.5px; }
.tm-over { color: var(--red-dark); font-weight: 600; }
.tm-ok { color: var(--ok); }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.team-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-decoration: none; color: var(--ink); transition: transform .1s; }
.team-card:hover { transform: translateY(-2px); }
.team-card-head { display: flex; gap: 13px; align-items: center; margin-bottom: 14px; }
.team-card-head h2 { margin: 0; }
.avatar-lg { width: 44px; height: 44px; font-size: 19px; }
.team-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; border-top: 1px solid #f1f1ee; padding-top: 12px; }
.tstat { display: flex; flex-direction: column; }
.team-foot { font-size: 12.5px; margin-top: 12px; }

.ap-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 12px; }
.ap-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ap-card-title { font: 600 15.5px 'Inter', sans-serif; color: var(--ink); text-decoration: none; flex: 1; min-width: 200px; }
.ap-card-title:hover { color: var(--red-dark); }
.ap-card-details { font-size: 13.5px; color: #3c3d40; margin: 9px 0 12px; line-height: 1.55; }
.ap-card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ap-note { flex: 1; min-width: 180px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fcfcfb; }
.ap-card-actions .btn-decide { padding: 9px 14px; font-size: 13px; }

.search-big { display: flex; gap: 10px; margin-bottom: 18px; max-width: 640px; }
.search-big input { flex: 1; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font: 15px 'Inter', sans-serif; background: var(--card); }
.search-big input:focus { outline: 2px solid var(--red); border-color: transparent; }

@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
}
[hidden] { display: none !important; }
/* ==========================================================================
   Modena World — Phase 12 additions (Customer Service + New-task file field)
   Paste this block at the very END of assets/css/app.css. It only ADDS styles.
   ========================================================================== */

/* Safety: anything with the hidden attribute stays hidden until JS opens it.
   This prevents the "modal stuck open on load" problem for good. */
[hidden] { display: none !important; }

/* --- Customer Service page --- */
.cust-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}
.cust-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 260px;
}
.cust-search input[type="search"] {
  flex: 1;
  min-width: 160px;
  padding: 9px 12px;
  border: 1px solid var(--line, #e3e3e0);
  border-radius: 8px;
  font: inherit;
  background: #fcfcfb;
}
.cust-search select {
  padding: 9px 10px;
  border: 1px solid var(--line, #e3e3e0);
  border-radius: 8px;
  font: inherit;
  background: #fcfcfb;
}

.cust-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line, #e3e3e0);
  border-radius: 10px;
  background: #fff;
}
.cust-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.cust-table th,
.cust-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line, #eee);
  vertical-align: top;
}
.cust-table th {
  font-weight: 600;
  color: #666;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #fafafa;
}
.cust-table tr:last-child td { border-bottom: none; }
.cust-table tbody tr:hover { background: #fafafa; }
.cust-sub { font-size: 12px; margin-top: 2px; }
.cust-row-actions { white-space: nowrap; text-align: right; }
.cust-row-actions .mini-btn { margin-left: 6px; }

.mini-btn.danger { color: #c40000; }
.mini-btn.danger:hover { background: #fff5f5; }

/* --- New-task file input --- */
#new-task-form input[type="file"] {
  width: 100%;
  margin-top: 6px;
  padding: 9px;
  border: 1px dashed var(--line, #d7d7d3);
  border-radius: 8px;
  background: #fcfcfb;
  font: inherit;
  cursor: pointer;
}
