:root {
  --bg: #f5f1e9;
  --notebook-bg: #eee8dc;
  --panel: #ffffff;
  --text: #182230;
  --muted: #667385;
  --line: #d8e1ec;
  --nav: #102033;
  --blue: #276ef1;
  --green: #138a5b;
  --amber: #c56b10;
  --red: #c83e52;
  --shadow: 0 10px 24px rgba(16, 32, 51, 0.10);
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #f7f1e7, #eef3ee 58%, #f5f1e9);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
}

.boot-screen {
  display: none;
}

body.app-booting {
  overflow: hidden;
}

body.app-booting .app-shell,
body.app-booting .lock-screen {
  visibility: hidden;
  opacity: 0;
}

body.app-booting .boot-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f7f1e7, #eef3ee 58%, #f5f1e9);
}

body.is-local-env.app-booting .boot-screen {
  background: linear-gradient(180deg, #f2f7fc, #e8f0f7 62%, #edf4fb);
}

.boot-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(24, 34, 48, .10);
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 14px 32px rgba(24, 34, 48, .10);
  color: #162231;
  font-size: 13px;
  font-weight: 900;
  animation: bootFadeIn 160ms ease-out;
}

.boot-card img {
  display: block;
  width: 36px;
  height: 36px;
}

.app-shell,
.lock-screen {
  transition: opacity 180ms ease;
}

@keyframes bootFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

body.is-local-env {
  --bg: #edf4fb;
  --notebook-bg: #e9f0f7;
  background: linear-gradient(180deg, #f2f7fc, #e8f0f7 62%, #edf4fb);
}

body.is-local-env .sidebar {
  background: linear-gradient(180deg, #10233a, #173d62);
}

body.is-local-env::after {
  content: "LOCAL";
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 120;
  padding: 5px 9px;
  border: 1px solid rgba(39, 110, 241, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: #1d4f88;
  box-shadow: 0 8px 22px rgba(16, 32, 51, .12);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  pointer-events: none;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button,
[data-quick-add],
[data-notebook-add] {
  touch-action: manipulation;
}

body.is-locked {
  overflow: hidden;
}
body.is-locked .app-shell {
  display: none;
}
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: #f3f1ec;
}
.lock-screen[hidden] {
  display: none;
}
.lock-card {
  display: grid;
  justify-items: stretch;
  gap: 16px;
  width: min(92vw, 400px);
  padding: 30px;
  border: 1px solid rgba(24, 34, 48, .10);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(24, 34, 48, .10);
  animation: cardFadeIn 180ms ease-out;
}
.lock-logo {
  display: block;
  justify-self: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(20, 38, 55, .08);
}
.lock-title {
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
  text-align: center;
}
.lock-title h1 {
  margin: 0;
  color: #162231;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}
.lock-title p {
  margin: 0;
  color: #667385;
  font-size: 13px;
  line-height: 1.45;
}
.lock-error {
  min-height: 18px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}
.password-field input {
  min-width: 0;
}
.password-toggle {
  min-height: 36px;
  min-width: 64px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.password-toggle:hover {
  background: #eef3f5;
  border-color: #c7d2df;
}
.lock-submit {
  min-height: 44px;
  border-radius: 10px;
  font-size: 13px;
}
.lock-meta {
  margin-top: 2px;
  color: #8a95a3;
  font-size: 11px;
  text-align: center;
}
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-toast {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 60;
  display: none;
  min-width: 180px;
  max-width: min(92vw, 360px);
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(23, 29, 51, 0.94);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(23, 29, 51, 0.2);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transform: translateX(-50%);
}
.app-toast.show {
  display: block;
  animation: toastIn 180ms ease-out;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.app-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-content: start;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  position: sticky;
  top: 0;
  flex-direction: column;
  align-items: stretch;
  align-self: start;
  gap: 10px;
  min-height: 100vh;
  padding: 14px 12px;
  color: #f7fafc;
  background: linear-gradient(180deg, #102033, #173451);
}

.brand { display: flex; align-items: center; gap: 0; min-height: 34px; }
.brand-logo {
  display: block;
  width: 104px;
  height: 32px;
}
.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.brand h1, .brand p, .topbar h2, .topbar p, .metric span, .metric strong, h3 { margin: 0; }
.brand p, .sidebar-footer { color: #b9c4cd; font-size: 9px; }

.menu-toggle { display: none; }
.nav-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
}
.nav-item {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  color: #dce8f5;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.05;
}
.nav-item.active, .nav-item:hover { color: #ffffff; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.14); }
.logout-nav-button {
  margin-top: auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  color: #ffdfe5;
  border-color: rgba(255,255,255,.18);
  background: rgba(196, 74, 92, .16);
}
.logout-nav-button:hover {
  color: #ffffff;
  border-color: rgba(255,255,255,.28);
  background: rgba(196, 74, 92, .26);
}
.sidebar-footer { display: none; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #44c07b; }
.logout-button {
  min-height: 34px;
  margin-top: auto;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}
.logout-button[hidden] {
  display: none;
}
.logout-button:hover {
  background: rgba(255,255,255,.14);
}

.workspace { width: 100%; min-width: 0; padding: 2px 10px 12px; }
.topbar, .topbar-actions, .section-toolbar, .form-actions, .modal-head, .projects-actions {
  display: flex;
  align-items: center;
}
.topbar { height: 0; min-height: 0; overflow: hidden; margin: 0; padding: 0; }
.eyebrow { color: var(--muted); font-size: 8px; font-weight: 700; line-height: 1; }
.topbar h2 { margin-top: 0; font-size: 14px; line-height: 1; }
.topbar-actions, .section-toolbar, .projects-actions { gap: 6px; }
.hidden-action { display: none !important; }

.primary-button, .ghost-button, .icon-button, .danger-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.primary-button { padding: 0 13px; color: #ffffff; border-color: var(--blue); background: var(--blue); font-weight: 700; }
.ghost-button, .icon-button { color: var(--text); background: #ffffff; }
.danger-button { padding: 0 14px; color: #ffffff; border-color: var(--red); background: var(--red); font-weight: 700; }
.ghost-button { padding: 0 12px; }
.primary-button:hover { background: #1f5fd3; border-color: #1f5fd3; }
.ghost-button:hover, .icon-button:hover { background: #f4f7f8; border-color: #cbd6e2; }
.danger-button:hover { background: #aa3144; border-color: #aa3144; }
.icon-button { display: grid; width: 40px; place-items: center; font-size: 19px; }
.small-icon-button {
  width: 30px;
  min-width: 30px;
  min-height: 32px;
  padding: 0;
  border-radius: 7px;
  font-size: 15px;
}
.danger-icon {
  color: #ffffff;
  border-color: var(--red);
  background: var(--red);
}
.project-delete-icon {
  color: #715217;
  border-color: #e1c67b;
  background: #fff6d9;
}
.small-button { min-height: 29px; padding: 0 8px; font-size: 11px; }
.icon-action {
  width: 30px;
  min-width: 30px;
  padding: 0;
  text-align: center;
  font-weight: 800;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 6px;
}
.metric, .day-panel, .completed-section, .report-panel, .project-card, .project-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
}
.metric span { display: block; color: var(--muted); font-size: 10px; }
.metric strong { display: block; margin-top: 0; font-size: 14px; }

.view { display: none; width: 100%; margin: 0; padding-top: 0; }
.active-view { display: block; }
#meetingsView {
  padding-top: 4px;
}
.section-heading { margin: 0 0 8px; }
.section-heading h3 { font-size: 16px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.project-name-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #27435d;
  font-weight: 800;
  text-align: left;
}

.project-name-button:hover { color: #1d344a; text-decoration: underline; }

label { display: grid; gap: 5px; color: var(--text); font-size: 11px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 16px;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #7a8f68;
  box-shadow: 0 0 0 3px rgba(122, 143, 104, .14);
}
textarea { resize: vertical; }
.form-section {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fbff;
}
.form-section h4 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
}
.form-section-main input {
  min-height: 38px;
  font-size: 14px;
  font-weight: 800;
}
.compact-task-main {
  gap: 6px;
}
.compact-task-main .project-picker input {
  min-height: 32px;
  font-size: 13px;
}
.compact-task-main #taskTitle {
  min-height: 36px;
  font-size: 14px;
}
.compact-task-main textarea {
  min-height: 44px;
}
.compact-date-section {
  gap: 6px;
  background: #fbfdff;
}
.compact-date-section > label {
  margin: 0;
}
.compact-date-section .simple-date-choice {
  grid-template-columns: minmax(150px, 1fr) 120px auto;
  align-items: end;
  gap: 6px;
  padding: 6px;
}
.compact-date-section .date-quick-grid {
  grid-column: 1 / -1;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.compact-date-section .date-chip {
  min-height: 32px;
  padding: 4px 6px;
  font-size: 11px;
}

.compact-date-section .date-chip span {
  font-size: 9px;
}
.compact-date-section .inline-date-input {
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 5px 6px;
  min-width: 0;
}
.compact-date-section .inline-date-input input {
  min-width: 0;
}
.compact-date-section .ghost-button {
  min-height: 32px;
  padding: 0 8px;
  white-space: nowrap;
}
.modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
  background: #ffffff;
}
.inline-row-input {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.quick-project-cell { position: relative; }
.quick-project-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  display: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  width: min(100%, 280px);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(20, 28, 36, 0.14);
}
.quick-project-suggestions button {
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--project-color, var(--blue));
  border-radius: 7px;
  background: #f8fafb;
  text-align: left;
  font-size: 11px;
}
.quick-project-suggestions button:hover { background: #f3f6fb; }

.task-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.task-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 10px; }
.dashboard-task-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.dashboard-task-table th:nth-child(1), .dashboard-task-table td:nth-child(1) { width: 18%; }
.dashboard-task-table th:nth-child(2), .dashboard-task-table td:nth-child(2) { width: 34%; }
.dashboard-task-table th:nth-child(3), .dashboard-task-table td:nth-child(3) { width: 18%; }
.dashboard-task-table th:nth-child(4), .dashboard-task-table td:nth-child(4) { width: 30%; }
.dashboard-task-table .description-cell {
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-table th, .task-table td {
  padding: 6px 7px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.task-table th { color: var(--muted); background: #f8fafb; font-size: 10px; font-weight: 800; }
.task-table tbody tr { border-left: 5px solid var(--project-color, var(--blue)); }
.task-table tbody tr:last-child td { border-bottom: 0; }
.dashboard-task-table tbody tr.board-row {
  counter-increment: board-row-number;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.dashboard-task-table tbody {
  counter-reset: board-row-number;
}
.dashboard-task-table tbody tr.board-row td:first-child {
  position: relative;
  padding-left: 26px;
}
.dashboard-task-table tbody tr.board-row td:first-child::before {
  content: counter(board-row-number) ".";
  position: absolute;
  left: 6px;
  top: 50%;
  min-width: 14px;
  color: #718093;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: right;
  transform: translateY(-50%);
}
.description-cell { max-width: 420px; color: #3d4a56; line-height: 1.35; }
.description-cell small { display: block; margin-top: 4px; color: var(--muted); }
.action-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  min-height: 34px;
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
}
td.action-cell {
  display: table-cell;
  text-align: right;
  white-space: nowrap;
}
.action-cell-inner {
  width: 100%;
}
.date-cell {
  white-space: nowrap;
}
.date-cell small {
  margin-left: 6px;
  color: var(--muted);
}
.defer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 3px;
  width: auto;
  min-width: max-content;
  padding: 0;
  border: 1px solid rgba(143, 31, 49, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .45);
}
.dashboard-task-table .action-cell .defer-actions {
  flex: 0 0 auto;
  min-width: max-content;
}
.dashboard-task-table .action-cell-inner {
  justify-content: flex-end;
}
.dashboard-task-table .action-cell-inner > .icon-action,
.dashboard-task-table .action-cell-inner > [data-confirm-complete-id],
.dashboard-task-table .action-cell-inner > [data-cancel-complete],
.dashboard-task-table .action-cell-inner > [data-undo-complete-id] {
  margin-left: 0;
}
.dashboard-task-table .action-cell-inner .defer-actions + .icon-action,
.dashboard-task-table .action-cell-inner .defer-actions + [data-confirm-complete-id] {
  margin-left: auto;
}
.defer-label {
  display: none;
}
.defer-button {
  min-width: 68px;
  min-height: 24px;
  padding: 2px 5px;
  border: 0;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
.action-cell > .icon-action,
.action-cell > [data-confirm-complete-id],
.action-cell > [data-cancel-complete],
.action-cell > [data-undo-complete-id] {
  flex: 0 0 auto;
}

.is-late { background: #ffecef !important; }
.is-today { background: #fff4c7 !important; }
.is-done { background: #e7f7ee !important; }
.is-new-task {
  box-shadow: inset 5px 0 0 #2f65b7, 0 0 0 1px rgba(47, 101, 183, .08);
}
.task-table tbody tr.is-new-task {
  border-left-color: #2f65b7;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf1f4;
  color: var(--text);
  font-size: 11px;
  white-space: nowrap;
}
.priority-high { color: #8f1f31; background: #ffdfe5; }
.priority-medium { color: #744000; background: #ffebbd; }
.priority-low { color: #075f43; background: #d9f2e5; }

.mobile-task-list { display: none; }
.mobile-task-list.always { display: grid; }
.mobile-task-list {
  counter-reset: mobile-task-number;
}
.task-card {
  counter-increment: mobile-task-number;
}
.task-card .task-card-main {
  position: relative;
  padding-left: 17px;
}
.task-card .task-card-number {
  position: absolute;
  left: 0;
  top: 1px;
  color: #718093;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}
.task-card .task-card-number::before {
  content: counter(mobile-task-number) ".";
}

.completed-section { margin-top: 16px; padding: 0; overflow: hidden; }
.completed-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}
.completed-section summary span {
  display: inline-grid;
  min-width: 28px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #edf1f4;
  color: var(--muted);
  font-size: 12px;
}
.quick-add-row {
  border-left-color: var(--green) !important;
  background: #f3fbf7;
}
.quick-add-row td {
  padding: 6px;
}
.dashboard-search-row {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.dashboard-search-row input {
  min-width: 0;
  width: 100%;
  min-height: 32px;
}
.board-add-row {
  display: grid;
  grid-template-columns: 210px minmax(200px, 1fr) auto auto auto 150px auto minmax(240px, 320px);
  gap: 8px;
  align-items: center;
  width: 100%;
}
.board-add-row input {
  width: 100%;
  min-width: 0;
}
.board-add-row .quick-date-button {
  min-width: 66px;
  white-space: nowrap;
}
.board-add-row .primary-button {
  min-width: 64px;
}
.quick-add-row input,
.quick-add-row select {
  min-height: 30px;
  border-color: #cbd9d1;
  background: #ffffff;
  font-size: 11px;
}
.quick-date-control {
  display: grid;
  grid-template-columns: auto auto auto minmax(118px, 1fr);
  gap: 5px;
  align-items: center;
  max-width: 100%;
  min-width: 0;
}
.dashboard-task-table .quick-date-control {
  grid-template-columns: repeat(3, minmax(60px, auto)) minmax(132px, 1fr);
  gap: 4px;
}
.dashboard-task-table .quick-add-row .action-cell {
  justify-content: center;
}
.quick-date-button {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid #cbd9d1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}
.dashboard-task-table .quick-date-button {
  min-height: 30px;
  padding: 0 5px;
  font-size: 10px;
}
.quick-date-button.active {
  border-color: var(--blue);
  background: #eaf1ff;
  color: #174d9c;
}
.quick-date-control input { min-width: 118px; }
.dashboard-task-table .quick-date-control input {
  width: 100%;
  min-width: 0;
}
.quick-add-mobile { display: none; }
.quick-add-card {
  display: grid;
  position: relative;
  z-index: 1;
  gap: 7px;
  padding: 10px;
  border: 1px solid #cbd9d1;
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: #f3fbf7;
}
.completed-section .task-table-wrap { border-right: 0; border-bottom: 0; border-left: 0; border-radius: 0; box-shadow: none; }

@media (hover: hover) and (pointer: fine) {
  .dashboard-task-table tbody tr.board-row:hover {
    background-color: #f6f2e8 !important;
    box-shadow: 0 1px 5px rgba(34, 40, 48, .06);
  }

  .dashboard-task-table tbody tr.board-row:hover td {
    background-color: rgba(246, 242, 232, .82);
  }
}

@media (min-width: 900px) {
  .dashboard-task-table {
    font-size: 12px;
  }
  .dashboard-task-table th {
    font-size: 11px;
  }
  .dashboard-task-table td {
    font-size: 12px;
  }
  .dashboard-task-table .project-name-button,
  .dashboard-task-table .description-cell,
  .dashboard-task-table .pill {
    font-size: 12px;
  }
  .dashboard-task-table .small-button,
  .dashboard-task-table .quick-date-button,
  .dashboard-task-table .quick-add-row input {
    font-size: 12px;
  }
  .dashboard-task-table .quick-add-row {
    display: table-row;
  }
  .dashboard-task-table .quick-add-row td {
    display: table-cell;
    padding: 6px;
    border-bottom: 1px solid var(--line);
  }
  .dashboard-task-table .quick-add-row input {
    width: 100%;
  }
  .dashboard-task-table .quick-add-row .quick-date-button {
    min-width: 0;
    padding: 0 8px;
    white-space: nowrap;
  }
}

@media (min-width: 900px) and (max-width: 1260px) {
  .board-add-row {
    grid-template-columns: 210px minmax(220px, 1fr) auto auto auto 150px auto;
  }
  .board-add-row .dashboard-search-row {
    grid-column: 1 / -1;
  }
}

.day-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.day-tab {
  display: grid;
  gap: 3px;
  min-width: 118px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
}
.day-tab span { color: var(--muted); font-size: 12px; }
.day-tab.active { color: #ffffff; border-color: var(--blue); background: var(--blue); }
.day-tab.active span { color: #e8f0fb; }
.day-panel { padding: 6px 8px; }
.day-panel h3 {
  margin: 0 0 5px;
  font-size: 13px;
  line-height: 1.15;
}
.daily-list, .project-tasks, .compact-list, .bars { display: grid; gap: 8px; margin-top: 8px; }
.daily-list { gap: 2px; margin-top: 4px; }
.daily-table {
  display: grid;
  gap: 2px;
  counter-reset: daily-row-number;
}
.daily-table-head {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 310px;
  align-items: center;
  column-gap: 0;
  padding: 3px 8px 4px 11px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.daily-task-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 310px;
  align-items: center;
  column-gap: 0;
  width: 100%;
  min-height: 24px;
  padding: 1px 5px 1px 7px;
  border-left-width: 4px;
  box-shadow: 0 1px 3px rgba(16, 32, 51, .04);
  cursor: text;
}
.daily-project-name {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: #27435d;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.daily-task-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding-left: 16px;
  color: #354256;
  line-height: 1.1;
  text-align: left;
  white-space: nowrap;
}
.daily-task-main span {
  min-width: 0;
  overflow: hidden;
  color: #3d4a56;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  text-align: left;
  white-space: nowrap;
}
.daily-task-card p { margin-top: 0; line-height: 1.2; }
.daily-task-card .task-card-meta {
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: auto;
  gap: 3px;
}
.daily-actions {
  width: 100%;
  min-width: 0;
  justify-content: flex-end;
}
.daily-actions .defer-actions {
  margin-right: 4px;
}
.daily-actions .defer-button {
  min-width: 68px;
}
.daily-task-card .small-icon-button,
.daily-task-card .small-button {
  min-width: 26px;
  min-height: 24px;
  padding: 0 6px;
  font-size: 11px;
}

@media (min-width: 900px) {
  .daily-table-head {
    font-size: 12px;
  }
  .daily-task-card {
    min-height: 26px;
    padding-top: 2px;
    padding-bottom: 2px;
  }
  .daily-project-name,
  .daily-task-main span {
    font-size: 12px;
  }
  .daily-task-card .small-button,
  .daily-task-card .small-icon-button,
  .daily-actions .defer-button {
    font-size: 12px;
  }
}

.task-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--project-color, var(--blue));
  border-radius: 8px;
  background: #ffffff;
}
.task-card p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.task-card-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 230px; }

.task-card.daily-task-card {
  display: grid;
  position: relative;
  grid-template-columns: 280px minmax(0, 1fr) 310px;
  align-items: center;
  gap: 0;
  min-height: 34px;
  padding: 3px 6px 3px 28px;
  box-shadow: 0 1px 2px rgba(16, 32, 51, .035);
  counter-increment: daily-row-number;
}
.task-card.daily-task-card::before {
  content: counter(daily-row-number) ".";
  position: absolute;
  left: 8px;
  top: 50%;
  color: #718093;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
}
.task-card.daily-task-card .task-card-meta {
  gap: 3px;
  min-width: 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f7;
  box-shadow: var(--shadow);
}
.calendar-day {
  min-height: 500px;
  border-right: 1px solid var(--line);
  background: #fbfcfd;
}
.calendar-day:last-child { border-right: 0; }
.calendar-day:nth-child(1) { --day-accent: #2f65b7; --day-tint: #eef5ff; }
.calendar-day:nth-child(2) { --day-accent: #16845b; --day-tint: #eefbf5; }
.calendar-day:nth-child(3) { --day-accent: #b66b00; --day-tint: #fff7e8; }
.calendar-day:nth-child(4) { --day-accent: #237c8f; --day-tint: #ecf9fc; }
.calendar-day:nth-child(5) { --day-accent: #6f55b5; --day-tint: #f4f0ff; }
.calendar-day:nth-child(6) { --day-accent: #c43d4a; --day-tint: #fff0f2; }
.calendar-day:nth-child(7) { --day-accent: #8b6f2a; --day-tint: #fff8df; }
.calendar-day.today header { box-shadow: inset 0 0 0 2px rgba(47, 101, 183, 0.2); }
.calendar-day header {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  border-top: 5px solid var(--day-accent, var(--blue));
  background: rgba(255,255,255,.78);
}
.calendar-day header span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.calendar-slots {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 430px;
  padding: 9px;
  background: #fbfcfd;
}
.calendar-task {
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--project-color, var(--blue));
  border-radius: 7px;
  background: rgba(255,255,255,.95);
  text-align: left;
  font-size: 11px;
  box-shadow: 0 5px 12px rgba(25, 38, 52, 0.08);
}
.calendar-task strong { font-size: 12px; }
.calendar-task span, .calendar-empty { color: var(--muted); line-height: 1.3; font-size: 11px; }
.calendar-empty {
  padding: 8px;
  border: 1px dashed rgba(101, 113, 126, .32);
  border-radius: 7px;
  background: rgba(255,255,255,.62);
}

.work-plan-page {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  min-height: calc(100vh - 20px);
  width: 100%;
}
.work-plan-toolbar,
.work-plan-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 7px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .82);
}
.work-plan-row-actions[hidden] {
  display: none !important;
}
.work-plan-toolbar label {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.work-plan-toolbar input {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}
.work-plan-name {
  flex: 1 1 320px;
  min-width: 240px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-weight: 900;
}
.work-plan-toolbar input[type="date"] { width: 150px; }
.work-plan-toolbar input[type="number"] { width: 76px; }
.work-plan-zoom,
.work-plan-download {
  position: relative;
  display: flex;
  gap: 4px;
  align-items: center;
}
.work-plan-download-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 35;
  display: grid;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}
.work-plan-download-menu button {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  font-weight: 800;
}
.work-plan-download-menu button:hover { background: #eef3f8; }
.work-plan-list-page {
  display: grid;
  align-content: start;
  grid-template-rows: auto auto;
  gap: 10px;
  width: 100%;
  min-height: 0;
  padding: 10px;
  border: 1px solid #d6e4f3;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(225, 239, 255, .82), rgba(255, 248, 226, .72) 48%, rgba(234, 248, 240, .8)),
    #eef5fb;
}
.work-plan-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid #c6d8ea;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #edf6ff);
  box-shadow: 0 8px 20px rgba(43, 91, 139, .08);
}
.work-plan-list-head h2 {
  margin: 0;
  font-size: 19px;
}
.work-plan-list-head p {
  margin: 2px 0 0;
  color: var(--muted);
}
.work-plan-list-section {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d4e0ec;
  border-radius: 12px;
  background: rgba(255,255,255,.8);
  box-shadow: 0 6px 16px rgba(30, 56, 86, .06);
}
.work-plan-list-section.active {
  border-color: #b9d7ef;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(235, 247, 255, .86));
}
.work-plan-list-section.archived {
  border-color: #ead9ad;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255, 248, 225, .8));
}
.work-plan-list-section.deleted {
  border-color: #e8c5c5;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255, 239, 239, .76));
}
.work-plan-list-section h3,
.work-plan-list-section summary {
  margin: 0;
  color: #182230;
  font-size: 13px;
  font-weight: 900;
}
.work-plan-list-section summary {
  cursor: pointer;
}
.work-plan-list-section summary span {
  float: right;
  color: var(--muted);
}
.work-plan-card-list {
  display: grid;
  gap: 5px;
}
.work-plan-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 6px;
  border: 1px solid #d5e0eb;
  border-left: 4px solid #4f8cc9;
  border-radius: 8px;
  background: linear-gradient(90deg, #ffffff, #fbfdff);
  box-shadow: 0 4px 12px rgba(30, 56, 86, .04);
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.work-plan-list-section.archived .work-plan-card,
.work-plan-list-section.deleted .work-plan-card {
  cursor: pointer;
}
.work-plan-list-section.archived .work-plan-card {
  border-left-color: #c89b2d;
}
.work-plan-list-section.deleted .work-plan-card {
  border-left-color: #b97d7d;
}
@media (hover: hover) and (pointer: fine) {
  .work-plan-card:hover {
    border-color: #bfd2e5;
    background: linear-gradient(90deg, #ffffff, #f1f7ff);
    box-shadow: 0 6px 16px rgba(30, 56, 86, .08);
  }
}
.work-plan-card-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.work-plan-card-main strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-plan-card-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-plan-card-badges,
.work-plan-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}
.work-plan-card-badges span {
  padding: 3px 7px;
  border: 1px solid #dbe3ec;
  border-radius: 999px;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 800;
}
.work-plan-inline-confirm {
  padding: 4px 6px;
  border-radius: 7px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.work-plan-scroll {
  width: 100%;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 32, 51, .06);
}
.work-plan-table {
  --work-plan-scale: 1;
  --work-plan-date-width: 26px;
  --work-plan-row-height: 32px;
  --work-plan-task-width: 255px;
  --work-plan-days-width: 50px;
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: calc(12px * var(--work-plan-scale));
}
.work-plan-table.compact-mode {
  --work-plan-date-width: 23px;
  --work-plan-row-height: 30px;
  --work-plan-task-width: 240px;
  --work-plan-days-width: 46px;
  font-size: calc(11px * var(--work-plan-scale));
}
.work-plan-table.dense-mode {
  --work-plan-date-width: 21px;
  --work-plan-row-height: 28px;
  --work-plan-task-width: 225px;
  --work-plan-days-width: 42px;
  font-size: calc(10px * var(--work-plan-scale));
}
.work-plan-table th,
.work-plan-table td {
  border-right: 1px solid #dbe3ec;
  border-bottom: 1px solid #dbe3ec;
  padding: 0;
  line-height: 1;
  vertical-align: middle;
  background: #fff;
}
.work-plan-table tr {
  height: calc(var(--work-plan-row-height) * var(--work-plan-scale)) !important;
}
.work-plan-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  height: calc(72px * var(--work-plan-scale));
  background: #eef3f8;
  color: #263548;
  font-weight: 900;
  white-space: nowrap;
}
.work-plan-date-col {
  position: sticky;
  width: calc(var(--work-plan-date-width) * var(--work-plan-scale));
  min-width: calc(var(--work-plan-date-width) * var(--work-plan-scale));
  text-align: center;
  overflow: hidden;
}
.work-plan-date-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  height: calc(64px * var(--work-plan-scale));
  width: calc(var(--work-plan-date-width) * var(--work-plan-scale));
  margin: 3px auto;
  font-size: calc(10px * var(--work-plan-scale));
  font-weight: 800;
  line-height: 1.05;
}
.work-plan-date-col small {
  color: var(--muted);
  font-size: calc(9px * var(--work-plan-scale));
}
.work-plan-sticky {
  position: sticky;
  z-index: 7;
}
.work-plan-task-col {
  left: 0;
  width: calc(var(--work-plan-task-width) * var(--work-plan-scale));
  min-width: calc(var(--work-plan-task-width) * var(--work-plan-scale));
}
.work-plan-days-col {
  left: calc(var(--work-plan-task-width) * var(--work-plan-scale));
  width: calc(var(--work-plan-days-width) * var(--work-plan-scale));
  min-width: calc(var(--work-plan-days-width) * var(--work-plan-scale));
  text-align: center;
}
.work-plan-planned-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  height: calc(64px * var(--work-plan-scale));
  width: calc(var(--work-plan-days-width) * var(--work-plan-scale));
  margin: 3px auto;
  font-size: calc(10px * var(--work-plan-scale));
  font-weight: 900;
  line-height: 1.05;
}
th.work-plan-sticky { z-index: 12; background: #e6eef7; }
th.work-plan-task-col {
  color: #182230;
  font-size: calc(18px * var(--work-plan-scale));
  font-weight: 950;
  letter-spacing: 0;
  text-align: left;
  padding-left: calc(8px * var(--work-plan-scale));
}
.work-plan-row.selected td,
.work-plan-row.selected input {
  box-shadow: inset 0 0 0 999px rgba(96, 165, 250, .14);
}
.work-plan-row.selected .work-plan-task-col,
.work-plan-row.selected .work-plan-days-col {
  background: #dbeafe;
}
.work-plan-row.selected {
  outline: 0;
  background: #dbeafe;
}
.work-plan-date-col.selected-col {
  background: rgba(191, 219, 254, .78) !important;
  color: #1e3a8a !important;
  box-shadow: inset 1px 0 0 rgba(37, 99, 235, .42), inset -1px 0 0 rgba(37, 99, 235, .42);
}
.work-plan-date-cell.selected-col,
.work-plan-date-cell.selected-col input {
  box-shadow: inset 0 0 0 999px rgba(37, 99, 235, .14), inset 1px 0 0 rgba(37, 99, 235, .40), inset -1px 0 0 rgba(37, 99, 235, .40);
}
.work-plan-row.selected .work-plan-date-cell.selected-col,
.work-plan-row.selected .work-plan-date-cell.selected-col input {
  box-shadow: inset 0 0 0 999px rgba(37, 99, 235, .24), inset 1px 0 0 rgba(37, 99, 235, .55), inset -1px 0 0 rgba(37, 99, 235, .55);
}
.work-plan-table input {
  width: 100%;
  height: calc(var(--work-plan-row-height) * var(--work-plan-scale));
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0 3px;
  background: transparent;
  color: inherit;
  outline: none;
  font-size: calc(11px * var(--work-plan-scale)) !important;
  line-height: 1;
  font-weight: 800;
}
.work-plan-page input:disabled,
.work-plan-table input:disabled {
  opacity: 1;
  color: inherit;
  cursor: default;
}
.work-plan-page .work-plan-table td {
  height: calc(var(--work-plan-row-height) * var(--work-plan-scale)) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1 !important;
}
.work-plan-page .work-plan-table .task-name-cell,
.work-plan-page .work-plan-table .task-name-cell span,
.work-plan-page .work-plan-table .task-name-display {
  font-size: calc(14px * var(--work-plan-scale)) !important;
  line-height: 1 !important;
}
.work-plan-page .work-plan-table .task-name-cell input,
.work-plan-page .work-plan-table .task-name-cell textarea,
.work-plan-page .work-plan-table .task-name-cell [contenteditable="true"] {
  font-size: calc(14px * var(--work-plan-scale)) !important;
  line-height: 1 !important;
  padding: 0 calc(4px * var(--work-plan-scale)) !important;
}
.work-plan-task-input {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: calc(14px * var(--work-plan-scale)) !important;
  line-height: 1.05;
}
.work-plan-task-input:focus {
  overflow: visible;
  text-overflow: clip;
  font-size: calc(14px * var(--work-plan-scale)) !important;
}
.work-plan-days-output {
  display: grid;
  place-items: center;
  height: calc(var(--work-plan-row-height) * var(--work-plan-scale));
  font-weight: 900;
}
.work-plan-planned-count {
  font-size: calc(13px * var(--work-plan-scale));
  font-weight: 900;
  text-align: center;
}
.task-name-cell {
  height: calc(var(--work-plan-row-height) * var(--work-plan-scale));
  padding: 0 4px;
  font-size: calc(14px * var(--work-plan-scale));
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.work-plan-table.compact-mode .task-name-cell,
.work-plan-table.compact-mode .work-plan-task-input {
  font-size: calc(13px * var(--work-plan-scale)) !important;
}
.work-plan-table.dense-mode .task-name-cell,
.work-plan-table.dense-mode .work-plan-task-input {
  font-size: calc(12px * var(--work-plan-scale)) !important;
}
.work-plan-date-cell {
  width: calc(var(--work-plan-date-width) * var(--work-plan-scale));
  min-width: calc(var(--work-plan-date-width) * var(--work-plan-scale));
  height: calc(var(--work-plan-row-height) * var(--work-plan-scale));
  text-align: center;
}
.work-plan-date-cell input {
  text-align: center;
  text-transform: lowercase;
  font-weight: 900;
  font-size: calc(9px * var(--work-plan-scale)) !important;
  padding: 0 !important;
}
.work-plan-date-cell.y-cell,
.work-plan-date-cell.y-cell input {
  background: #8ee59a;
  color: transparent;
}
.work-plan-date-cell.k-cell,
.work-plan-date-cell.k-cell input {
  background: #f29a9a;
  color: transparent;
}
.work-plan-date-cell.empty-cell,
.work-plan-date-cell.empty-cell input {
  background: #ffffff;
  color: transparent;
}
.work-plan-date-col.sunday,
.work-plan-date-header.sunday {
  background: #fff1f2;
  color: #991b1b;
}
.work-plan-date-col.today,
.work-plan-date-header.today {
  background: rgba(219, 234, 254, .55) !important;
  color: #1d4ed8 !important;
  font-weight: 900 !important;
  box-shadow: inset 1px 0 0 rgba(37, 99, 235, .35), inset -1px 0 0 rgba(37, 99, 235, .35);
}
.work-plan-date-cell.today {
  box-shadow: inset 1px 0 0 rgba(37, 99, 235, .28), inset -1px 0 0 rgba(37, 99, 235, .28);
}
.work-plan-date-cell.sunday.empty-cell,
.work-plan-date-cell.sunday.empty-cell input {
  background: #fff8f8;
}
.work-plan-date-cell.today.empty-cell,
.work-plan-date-cell.today.empty-cell input {
  background: rgba(239, 246, 255, .72) !important;
}
.work-plan-date-cell.today.y-cell,
.work-plan-date-cell.today.y-cell input {
  background: #8ee59a !important;
  box-shadow: inset 1px 0 0 rgba(37, 99, 235, .30), inset -1px 0 0 rgba(37, 99, 235, .30);
}
.work-plan-date-cell.today.k-cell,
.work-plan-date-cell.today.k-cell input {
  background: #f29a9a !important;
  box-shadow: inset 1px 0 0 rgba(37, 99, 235, .30), inset -1px 0 0 rgba(37, 99, 235, .30);
}
.work-plan-date-cell.sunday.y-cell,
.work-plan-date-cell.sunday.y-cell input {
  background: #8ee59a;
}
.work-plan-date-cell.sunday.k-cell,
.work-plan-date-cell.sunday.k-cell input {
  background: #f29a9a;
}
.work-plan-table input:focus {
  box-shadow: inset 0 0 0 2px rgba(39, 110, 241, .55);
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}
@media (hover: hover) and (pointer: fine) {
  .work-plan-date-cell.empty-cell:hover,
  .work-plan-date-cell.empty-cell:hover input {
    background: #eef2ff;
  }
  .work-plan-date-cell.y-cell:hover,
  .work-plan-date-cell.y-cell:hover input,
  .work-plan-date-cell.today.y-cell:hover,
  .work-plan-date-cell.today.y-cell:hover input {
    background: #8ee59a !important;
  }
  .work-plan-date-cell.k-cell:hover,
  .work-plan-date-cell.k-cell:hover input,
  .work-plan-date-cell.today.k-cell:hover,
  .work-plan-date-cell.today.k-cell:hover input {
    background: #f29a9a !important;
  }
}
body.work-plan-fullscreen .sidebar,
body.work-plan-fullscreen .topbar {
  display: none;
}
body.work-plan-fullscreen .app-shell {
  grid-template-columns: 1fr;
}
body.work-plan-fullscreen .workspace {
  padding: 2px;
}
body.work-plan-fullscreen #workPlanView {
  min-height: calc(100vh - 4px);
  padding: 0;
}
body.work-plan-fullscreen .work-plan-page {
  gap: 4px;
  min-height: calc(100vh - 4px);
}
body.work-plan-fullscreen .work-plan-toolbar,
body.work-plan-fullscreen .work-plan-row-actions {
  gap: 4px;
  padding: 4px;
  border-radius: 7px;
}
body.work-plan-fullscreen .work-plan-toolbar input,
body.work-plan-fullscreen .work-plan-name {
  height: 28px;
}
body.work-plan-fullscreen .work-plan-toolbar label {
  gap: 1px;
  font-size: 9px;
}
body.work-plan-fullscreen .small-button {
  min-height: 26px;
  padding: 0 6px;
  font-size: 10px;
}
body.work-plan-fullscreen .work-plan-zoom {
  display: none;
}
body.work-plan-fullscreen .work-plan-scroll {
  border-radius: 7px;
}
body.work-plan-share-mode .sidebar,
body.work-plan-share-mode .topbar {
  display: none;
}
body.work-plan-share-mode .app-shell {
  grid-template-columns: 1fr;
}
body.work-plan-share-mode .workspace {
  padding: 8px;
}
body.work-plan-share-mode #workPlanView {
  min-height: calc(100vh - 16px);
  padding: 0;
}
body.work-plan-share-mode .work-plan-page {
  min-height: calc(100vh - 16px);
  padding: 8px;
}
body.work-plan-share-mode #workPlanBackButton,
body.work-plan-share-mode #workPlanFit,
body.work-plan-share-mode #workPlanShareButton,
body.work-plan-share-mode .work-plan-zoom,
body.work-plan-share-mode .work-plan-download,
body.work-plan-share-mode .work-plan-row-actions {
  display: none !important;
}
body.work-plan-share-mode .work-plan-toolbar {
  grid-template-columns: minmax(260px, 1fr) auto auto;
}
body.work-plan-share-mode .work-plan-name {
  pointer-events: none;
  background: #f8fafc;
  color: #102033;
}

.projects-actions { margin: 0 0 8px; }
.projects-panel { padding: 2px 0; }
.project-list-grid { display: block; }
.projects-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.projects-summary-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.projects-summary-card span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.projects-summary-card strong { font-size: 18px; color: var(--text); }
.meeting-table, .project-row-table { min-width: 720px; }
.meeting-table {
  table-layout: fixed;
}
.meeting-table th,
.meeting-table td {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meeting-table tbody tr[data-meeting-row-id] {
  cursor: text;
}
.meeting-board {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: none;
  margin: 0;
  align-content: start;
}
.meeting-quick-add {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) minmax(360px, 1.4fr) 112px 80px;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(16, 32, 51, .06);
}
.meeting-quick-add input,
.meeting-quick-add select {
  min-height: 36px;
  border-color: #d8e1ec;
  background: #ffffff;
  font-size: 12px;
}
.meeting-quick-add button[data-quick-meeting-add] {
  min-height: 36px;
  width: 100%;
}
.meeting-list {
  display: grid;
  gap: 5px;
}
.meeting-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto) minmax(74px, auto);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--project-color, var(--blue));
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(16, 32, 51, .045);
  cursor: text;
  transition: background-color 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .meeting-card:hover {
    border-color: #cbd6e2;
    background: #fbfcfd;
    box-shadow: 0 5px 14px rgba(16, 32, 51, .07);
  }
}
.meeting-card.is-editing {
  grid-template-columns: minmax(0, 1fr) auto;
  background: #f4f8ff;
}
.meeting-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.meeting-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.25;
}
.meeting-main small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}
.meeting-meta,
.meeting-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.meeting-meta {
  justify-content: flex-end;
}
.meeting-actions {
  justify-content: flex-end;
  min-width: 74px;
}
.meeting-actions .small-icon-button,
.meeting-actions .small-button {
  min-width: 32px;
  min-height: 32px;
}
.meeting-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.75);
}
.completed-meeting-details-row td {
  padding: 8px;
  background: #f7f8f9;
}
.completed-meeting-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(16, 32, 51, .04);
}
.completed-meeting-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  color: #415064;
  font-weight: 900;
  cursor: pointer;
}
.completed-meeting-details summary span {
  display: inline-grid;
  min-width: 26px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #e8ecef;
  font-size: 11px;
}
.completed-meeting-inner {
  display: grid;
  gap: 5px;
  padding: 8px;
  border-top: 1px solid var(--line);
}
.completed-meeting-row {
  opacity: .62;
  background: #f7f8f9 !important;
}
.completed-meeting-row .meeting-main strong {
  text-decoration: line-through;
}
.meeting-done-icon {
  color: #0c6b47;
  border-color: #bddccb;
  background: #e9f7ef;
}
.meeting-undo-icon {
  color: #174d9c;
  border-color: #c8d8f6;
  background: #eaf1ff;
}
.meeting-confirm {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.project-row-table {
  table-layout: fixed;
  border-spacing: 0;
}
.project-row-table th:nth-child(1), .project-row-table td:nth-child(1) { width: 52%; }
.project-row-table th:nth-child(2), .project-row-table td:nth-child(2) { width: 12%; text-align: center; }
.project-row-table th:nth-child(3), .project-row-table td:nth-child(3) { width: 12%; text-align: center; }
.project-row-table th:nth-child(4), .project-row-table td:nth-child(4) { width: 24%; }
.project-row-table th,
.project-row-table td {
  padding: 5px 7px;
}
.project-main-row {
  min-height: 48px;
  border-left: 4px solid var(--project-color, var(--blue));
  background: #edf4fb;
}
.project-main-row:hover td {
  background: #e7eff8;
}
.project-row-actions {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 4px;
  min-height: 30px;
}
.project-row-actions .small-icon-button,
.project-row-actions .small-button {
  min-width: 28px;
  min-height: 28px;
  padding: 0 8px;
}
.project-row-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 30px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
}
.project-edit-row td { background: #f4f8ff; }
.project-task-row td {
  padding: 6px 8px 9px;
  background: #ffffff;
}
.project-card, .report-panel, .project-detail-card { padding: 10px; }
.project-card, .project-detail-card { border-top: 6px solid var(--project-color, var(--blue)); }
.project-card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.project-card h3, .project-detail-card h3 { font-size: 15px; }
.project-title-row { display: flex; align-items: center; gap: 8px; }
.project-color-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.project-card-meta { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.project-card-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.project-progress { display: grid; gap: 5px; margin: 7px 0 8px; }
.project-progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e9eef4; }
.project-progress-fill { height: 100%; border-radius: inherit; background: var(--project-color, var(--blue)); }
.project-progress span { color: var(--muted); font-size: 11px; }
.project-task-frame {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid #d7e2ee;
  border-radius: 8px;
  background: #fbfdff;
  box-shadow: 0 8px 18px rgba(16, 32, 51, .06);
}
.project-task-frame-title {
  color: #415064;
  font-size: 11px;
  font-weight: 900;
}
.project-task-list { display: grid; gap: 4px; }
.project-task-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 82px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  font-size: 11px;
}
.project-task-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-task-line:hover { background: #f3f6fb; }
.project-task-line small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.project-task-line em {
  color: #415064;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}
.color-control { display: flex; align-items: center; gap: 8px; width: auto; color: var(--muted); font-size: 12px; }
.color-control input { width: 42px; min-height: 32px; padding: 2px; }
.row-color-control { justify-content: flex-start; }
.color-swatch {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.project-tasks button {
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafb;
  color: var(--text);
  text-align: left;
  font-size: 12px;
}

#notebookView {
  min-height: calc(100vh - 64px);
  background: var(--notebook-bg);
}
.notebook-shell {
  display: grid;
  grid-template-columns: 42px minmax(0, 980px) 42px;
  align-items: start;
  justify-content: center;
  gap: 10px;
  min-height: calc(100vh - 28px);
  padding-top: 0;
  background: var(--notebook-bg);
}
.notebook-shell.is-project-list {
  grid-template-columns: minmax(0, 1200px);
  width: 100%;
  justify-content: center;
}
.notebook-page {
  display: grid;
  align-content: start;
  grid-template-rows: auto auto auto auto auto;
  gap: 7px;
  width: 100%;
  min-height: calc(100vh - 92px);
  padding: 14px;
  border: 0;
  border-radius: 8px;
  background: var(--notebook-bg);
  box-shadow: none;
}
.notebook-page.is-project-list {
  grid-template-rows: auto auto;
  width: 100%;
  min-height: auto;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px;
  background: var(--notebook-bg);
  box-shadow: none;
}
.notebook-page.is-project-list .notebook-head {
  max-width: 1100px;
  width: 100%;
  justify-self: center;
  padding-bottom: 8px;
}
.notebook-page.is-project-list .notebook-head h3,
.notebook-page.is-project-list .notebook-head p {
  padding: 0;
  text-align: left;
}
.notebook-head {
  display: grid;
  gap: 3px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(151, 136, 72, .28);
}
.notebook-head h3 { font-size: 20px; }
.notebook-head p { margin: 0; color: var(--muted); font-size: 12px; }
.notebook-task-list {
  display: grid;
  align-content: start;
  gap: 3px;
  min-height: 0;
  padding: 2px 0 4px;
  background: var(--notebook-bg);
}
.notebook-task-list.is-project-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  justify-self: center;
  width: 100%;
  max-width: 1040px;
  gap: 8px;
  padding-bottom: 2px;
}
.notebook-project-card {
  display: grid;
  align-content: center;
  width: 100%;
  min-width: 0;
  gap: 2px;
  min-height: 54px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--project-color, var(--blue));
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  color: var(--text);
  text-align: left;
  box-shadow: 0 5px 14px rgba(80, 75, 35, .08);
}
.notebook-project-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.notebook-project-card span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}
.notebook-task {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 2px 5px;
  border: 1px solid rgba(126, 118, 91, .18);
  border-radius: 7px;
  background: rgba(255,255,255,.78);
  cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.notebook-task-number {
  color: #8d8268;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .notebook-task:hover {
    background: #f8f3e9;
    box-shadow: 0 1px 5px rgba(80, 75, 35, .08);
  }
}
.notebook-task-text {
  display: grid;
  gap: 1px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.notebook-task-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}
.notebook-task-text small { color: var(--muted); font-size: 11px; }
.notebook-task.is-complete .notebook-task-text span {
  color: var(--muted);
  text-decoration: line-through;
}
.notebook-task.is-deleted {
  opacity: .62;
}
.notebook-task-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.notebook-confirm {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.notebook-icon {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  font-size: 15px;
}
.notebook-check {
  color: #0c6b47;
  border-color: #bddccb;
  background: #e9f7ef;
}
.notebook-yes { min-height: 26px; padding: 0 7px; }
.notebook-inline-input {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 800;
}
.notebook-add {
  position: static;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(126, 118, 91, .18);
  background: var(--notebook-bg);
}
.notebook-add[hidden],
.notebook-arrow[hidden] {
  display: none;
}
.notebook-date-tools {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
}
.notebook-date-tools button,
.notebook-pager button {
  display: grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(151, 136, 72, .3);
  border-radius: 7px;
  background: rgba(255,255,255,.78);
  color: var(--text);
  font-size: 12px;
}
.notebook-date-tools button.active {
  border-color: var(--blue);
  background: #eaf1ff;
  color: #174d9c;
}
.notebook-date-input {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: auto;
  z-index: 2;
}
.notebook-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.notebook-pager button:disabled {
  opacity: .35;
}
.notebook-add input {
  min-height: 32px;
  border-color: rgba(151, 136, 72, .35);
  background: rgba(255,255,255,.82);
}
.notebook-arrow {
  display: grid;
  width: 42px;
  height: 56px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--blue);
  font-size: 34px;
  font-weight: 900;
  box-shadow: var(--shadow);
}
.notebook-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
}
.notebook-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #c5ccd6;
}
.notebook-dot.active {
  width: 22px;
  background: var(--blue);
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(280px, 1.05fr) minmax(280px, 1.05fr);
  gap: 10px;
  align-items: start;
  width: 100%;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: min(100%, 960px);
  margin: 0 auto;
  align-items: start;
}
.report-summary-panel {
  padding: 14px;
  margin-bottom: 10px;
}
.report-summary-grid {
  margin-top: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.report-summary-grid .metric {
  min-height: 68px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: none;
}
.report-summary-grid .metric span {
  font-size: 11px;
  font-weight: 800;
}
.report-summary-grid .metric strong {
  font-size: 22px;
  line-height: 1.1;
}
.bar-row { display: grid; grid-template-columns: 115px 1fr 38px; align-items: center; gap: 10px; font-size: 13px; }
.bar-track { height: 12px; overflow: hidden; border-radius: 999px; background: #e7ecef; }
.bar-fill { height: 100%; background: var(--blue); }
.compact-item { padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #ffffff; }
.compact-item strong, .compact-item span { display: block; }
.compact-item span, .helper-text { margin-top: 4px; color: var(--muted); font-size: 12px; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.backup-panel {
  padding: 14px;
}
.backup-actions {
  align-items: center;
  margin-top: 12px;
}
.backup-upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.backup-upload-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.mail-panel {
  padding: 14px;
}
.mail-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.mail-panel-head h3 {
  margin-bottom: 4px;
}
.mail-schedule-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.mail-schedule-row {
  display: grid;
  grid-template-columns: 106px minmax(220px, 1fr) 120px minmax(270px, auto);
  gap: 8px;
  align-items: end;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}
.mail-schedule-row label {
  min-width: 0;
}
.mail-row-actions,
.backup-schedule-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}
.mail-row-actions .small-button {
  min-height: 34px;
  white-space: nowrap;
}
.mail-row-status {
  grid-column: 1 / -1;
  margin-top: 0;
}
.mail-delete-confirm {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #f0d8a8;
  border-radius: 8px;
  background: #fff8e8;
  color: #704600;
  font-size: 12px;
  font-weight: 800;
}
.mail-delete-confirm .small-button {
  min-height: 30px;
}
.backup-schedule-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.backup-schedule-row {
  display: grid;
  grid-template-columns: 96px minmax(190px, 1fr) 116px minmax(96px, 112px) minmax(96px, 112px) 204px;
  gap: 8px;
  align-items: end;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  max-width: 100%;
  overflow: hidden;
}
.backup-schedule-row label {
  min-width: 0;
}
.backup-schedule-row input {
  width: 100%;
}
.backup-schedule-row .mail-switch,
.backup-schedule-row label,
.backup-schedule-actions {
  align-self: end;
}
.backup-schedule-actions {
  min-width: 0;
  width: 100%;
  justify-content: flex-end;
}
.backup-schedule-actions .ghost-button,
.backup-schedule-actions .primary-button {
  min-height: 36px;
  padding: 0 8px;
  white-space: nowrap;
}
.backup-schedule-actions .ghost-button {
  flex: 0 1 78px;
  min-width: 48px;
  max-width: 82px;
  white-space: normal;
  line-height: 1.05;
}
.backup-schedule-actions .primary-button {
  flex: 0 0 70px;
  min-width: 70px;
}
@media (min-width: 761px) and (max-width: 1280px) {
  .backup-schedule-row {
    grid-template-columns: 96px minmax(210px, 1fr) 116px minmax(105px, 120px) minmax(105px, 120px);
  }
  .backup-schedule-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .backup-schedule-actions .ghost-button {
    min-width: 108px;
    max-width: 118px;
  }
  .backup-schedule-actions .primary-button {
    min-width: 82px;
  }
}
.mail-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 800;
}
.mail-switch input {
  width: 18px;
  min-height: 18px;
}
.mail-settings-grid {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.4fr) 130px;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}
.mail-toggle-row {
  min-height: 38px;
  padding-top: 0;
}
.mail-toggle-row input {
  width: 18px;
  min-height: 18px;
}
.settings-status {
  min-height: 34px;
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  color: var(--muted);
  font-size: 12px;
}
.settings-status:empty { display: none; }
.settings-status[data-type="success"] { border-color: #b8e4ce; background: #ecf8f1; color: #0f6345; }
.settings-status[data-type="warning"] { border-color: #f4d48d; background: #fff7d8; color: #794700; }
.settings-status[data-type="error"] { border-color: #f0b7bd; background: #fff0f1; color: #8c1f2b; }
.settings-row, .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#settingsView {
  padding-top: 4px;
}
#settingsView .report-panel {
  box-shadow: 0 8px 22px rgba(16, 32, 51, .06);
}
.security-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  animation: cardFadeIn 180ms ease-out;
}
.security-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.security-head h3 {
  font-size: 16px;
}
.security-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafb;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}
.security-badge[data-status="active"] {
  border-color: #b8e4ce;
  background: #ecf8f1;
  color: #0f6345;
}
.security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr);
  gap: 12px;
}
.security-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dce4ec;
  border-radius: 10px;
  background: #fcfdfe;
  box-shadow: none;
}
.security-card h4 {
  margin: 0;
  color: #1f2d3d;
  font-size: 13px;
}
.security-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.password-card {
  grid-row: span 2;
}
.security-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.security-form label {
  min-width: 0;
}
.security-form .password-field {
  grid-template-columns: minmax(0, 1fr) auto;
}
.security-form .password-field input {
  min-width: 0;
}
.security-form .password-toggle {
  min-width: 64px;
}
.password-feedback {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.password-feedback span {
  min-height: 24px;
  padding: 5px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}
.password-feedback [data-level="weak"],
.password-feedback [data-match="error"] {
  border-color: #f0b7bd;
  background: #fff0f1;
  color: #8c1f2b;
}
.password-feedback [data-level="medium"] {
  border-color: #f4d48d;
  background: #fff8df;
  color: #794700;
}
.password-feedback [data-level="strong"],
.password-feedback [data-match="ok"] {
  border-color: #b8e4ce;
  background: #ecf8f1;
  color: #0f6345;
}
.security-actions {
  margin-top: 0;
}
.security-actions button[hidden],
.logout-nav-button[hidden] {
  display: none;
}
.security-actions .ghost-button {
  color: #5b6675;
  border-color: #d8e1ec;
  background: #ffffff;
}
.security-checks {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: #37514a;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}
.small-modal {
  width: min(420px, calc(100vw - 28px));
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(24, 34, 48, .22);
}
.mail-preview-modal {
  width: min(920px, calc(100vw - 24px));
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(24, 34, 48, .24);
}
.mail-preview-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.mail-preview-meta {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr);
  gap: 10px;
}
.mail-preview-meta div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}
.mail-preview-meta span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.mail-preview-meta strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-preview-frame-wrap {
  height: min(62vh, 620px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eef1f5;
}
.mail-preview-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #eef1f5;
}
.security-modal-form {
  display: grid;
  gap: 12px;
  padding: 12px;
}
.security-modal-form .modal-head {
  position: static;
  margin: -12px -12px 0;
  padding: 12px;
  background: #f8fafb;
}
.security-modal-form .settings-status {
  margin-top: 0;
}
.security-modal-form .modal-actions {
  position: static;
  margin: 0;
  padding: 0;
  border-top: 0;
  background: transparent;
}
.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding-top: 24px;
}
.toggle-row input {
  width: 18px;
  min-height: 18px;
}
.date-choice { display: grid; gap: 8px; }
.simple-date-choice {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
}
.date-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.date-chip {
  display: grid;
  gap: 2px;
  min-height: 42px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  font-size: 12px;
}
.date-chip:hover,
.date-chip.active {
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(47, 101, 183, 0.12);
}
.date-chip.active {
  background: #eef5ff;
  color: #1f4f93;
}
.date-chip span,
.inline-date-input {
  color: var(--muted);
  font-size: 10px;
}
.inline-date-input {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}
.simple-date-choice .ghost-button {
  min-height: 32px;
  justify-self: start;
}
.project-picker { position: relative; }
.suggestion-list {
  position: absolute;
  z-index: 35;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 220px;
  overflow-y: auto;
  gap: 5px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(16, 32, 51, .16);
}
.suggestion-list:empty { display: none; }
.suggestion-list button {
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--project-color, var(--blue));
  border-radius: 7px;
  background: #f8fafb;
  text-align: left;
  font-size: 12px;
}
.suggestion-list button:hover,
.suggestion-list button.active {
  border-color: rgba(39, 110, 241, .35);
  background: #eef5ff;
}
.warning-box { display: none; padding: 9px; border-radius: 8px; background: #fff3cd; color: #6b4a00; font-size: 12px; }
.warning-box:not(:empty) { display: block; }

dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(92vh, 760px);
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #edf7fb, #ffffff 150px);
  box-shadow: 0 28px 70px rgba(20, 28, 36, 0.28);
}
dialog::backdrop { background: rgba(20, 28, 36, 0.42); }
.task-form {
  display: grid;
  gap: 7px;
  max-height: calc(min(92vh, 760px) - 4px);
  padding: 8px;
  overflow-y: auto;
  font-size: 11px;
}
.modal-head {
  position: sticky;
  top: -8px;
  z-index: 3;
  justify-content: space-between;
  gap: 8px;
  margin: -8px -8px 0;
  padding: 8px;
  border-bottom: 1px solid rgba(123, 148, 167, .28);
  background: linear-gradient(180deg, #f8fbff, #edf7fb);
}
.modal-head h3 {
  padding: 5px 9px;
  border-left: 4px solid var(--blue);
  border-radius: 7px;
  background: rgba(39, 110, 241, .08);
  color: #123b78;
  font-size: 15px;
}
.task-form textarea {
  min-height: 52px;
}
.task-form .form-grid {
  gap: 8px;
}
.task-form select,
.task-form input,
.task-form textarea {
  font-size: 12px;
}
.form-actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; }
.modal-actions .primary-button,
.modal-actions .ghost-button,
.modal-actions .danger-button {
  min-height: 36px;
}
.empty-state { padding: 10px; color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) {
  .report-layout { grid-template-columns: 1fr; }
  .sidebar-footer { display: none; }
  .project-list-grid { grid-template-columns: 1fr; }
  .projects-summary { grid-template-columns: 1fr; }
  .date-quick-grid { grid-template-columns: repeat(4, minmax(76px, 1fr)); }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .sidebar {
    z-index: 30;
    flex-direction: row;
    align-items: center;
    min-height: 0;
    padding: 6px 8px;
    background: linear-gradient(90deg, #102033, #173451);
  }
  .brand-logo {
    width: 32px;
    height: 32px;
  }
  .topbar {
    position: fixed;
    top: 6px;
    right: 78px;
    left: 48px;
    z-index: 40;
    display: block;
    height: 32px;
    min-height: 32px;
    margin: 0;
    padding: 0 8px;
    overflow: visible;
    pointer-events: none;
  }
  .topbar .visually-hidden {
    position: static;
    display: block;
    width: auto;
    height: auto;
    overflow: hidden;
    clip: auto;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    line-height: 32px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    margin-left: auto;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 7px;
    background: rgba(255,255,255,.12);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
  }
  .nav-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 8px;
    z-index: 50;
    display: none;
    width: min(72vw, 260px);
    max-height: calc(100vh - 70px);
    margin-left: 0;
    padding: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    flex-direction: column;
    gap: 5px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    background: #173451;
    box-shadow: 0 14px 34px rgba(16, 32, 51, .24);
  }
  .sidebar.menu-open .nav-list { display: flex; }
  .nav-item {
    min-height: 44px;
    padding: 0 10px;
    background: rgba(255,255,255,.05);
    font-size: 12px;
    text-align: left;
  }
  .logout-nav-button {
    display: block;
    margin-top: 4px;
    color: #ffdfe5;
    border-color: rgba(255,255,255,.22);
    background: rgba(196, 74, 92, .18);
  }
  .sidebar > .logout-button {
    display: none;
  }
  .workspace { padding: 4px 6px 8px; }
  .settings-layout {
    width: 100%;
    max-width: none;
    margin: 0;
    gap: 8px;
  }
  .topbar h2 { margin-top: 0; font-size: 16px; line-height: 1.05; }
  .eyebrow { font-size: 8px; }
  .topbar-actions { justify-content: space-between; flex-wrap: wrap; gap: 5px; }
  .topbar-actions .primary-button,
  .topbar-actions .ghost-button,
  .topbar-actions .icon-button {
    min-height: 28px;
    padding: 0 8px;
  }
  .sidebar { gap: 6px; }
  .settings-row, .form-grid, .date-choice, .security-grid, .security-form, .mail-settings-grid { grid-template-columns: 1fr; }
  .security-head {
    align-items: stretch;
    flex-direction: column;
  }
  .password-card { grid-row: auto; }
  .summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric { display: grid; justify-items: center; gap: 2px; padding: 5px 4px; }
  .metric span { font-size: 9px; text-align: center; }
  .metric strong { font-size: 13px; }
  .dashboard-search-row { display: none; }
  .day-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0 -6px 8px;
    padding: 0 6px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .day-tabs::-webkit-scrollbar {
    display: none;
  }
  .day-tab {
    flex: 0 0 auto;
    min-width: 78px;
    max-width: 88px;
    min-height: 46px;
    padding: 7px 9px;
    border-radius: 10px;
    gap: 1px;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(16, 32, 51, .06);
  }
  .day-tab span {
    font-size: 11px;
    line-height: 1.15;
  }
  .day-panel {
    padding: 7px;
    border-radius: 9px;
    box-shadow: 0 1px 5px rgba(16, 32, 51, .06);
  }
  .day-panel h3 {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.15;
  }
  .daily-list,
  .daily-table {
    gap: 5px;
    margin-top: 4px;
  }
  .daily-table-head { display: none; }
  .task-card.daily-task-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "project actions"
      "title actions";
    gap: 2px 6px;
    align-items: center;
    min-height: 48px;
    padding: 6px 7px 6px 28px;
    border-radius: 9px;
    border-left-width: 4px;
  }
  .task-card.daily-task-card::before {
    left: 9px;
    font-size: 10px;
  }
  .daily-project-name {
    grid-area: project;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    line-height: 1.15;
  }
  .daily-task-main {
    grid-area: title;
    min-width: 0;
    width: 100%;
    padding: 0;
  }
  .daily-task-main span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    font-size: 12px;
  }
  .daily-actions {
    grid-area: actions;
    justify-self: end;
    align-self: center;
    justify-content: flex-end;
    width: max-content;
    min-width: 70px;
    gap: 4px;
  }
  .daily-task-card .small-button,
  .daily-task-card .small-icon-button {
    min-width: 32px;
    width: 32px;
    min-height: 32px;
    padding: 0;
  }
  .task-table-wrap { display: none; }
  .defer-actions { display: none; }
  .meetings-table-wrap,
  .projects-table-wrap { display: block; }
  .meeting-table,
  .project-row-table { min-width: 620px; }
  .meeting-board {
    max-width: 100%;
    width: 100%;
  }
  .meeting-quick-add {
    grid-template-columns: minmax(0, 1fr) 130px 84px;
    padding: 10px;
  }
  .meeting-quick-add > input:first-child,
  .meeting-quick-add .quick-date-control {
    grid-column: 1 / -1;
  }
  .meeting-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 8px;
  }
  .meeting-meta {
    grid-column: 1;
    justify-content: flex-start;
  }
  .meeting-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .date-quick-grid,
  .inline-date-input { grid-template-columns: 1fr; }
  .quick-date-control { grid-template-columns: repeat(3, 1fr); }
  .quick-date-control input { grid-column: 1 / -1; }
  .quick-add-mobile { display: grid; margin-bottom: 10px; }
  .mobile-task-list { display: grid; gap: 10px; margin-top: 10px; }
  .task-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px;
  }
  .task-card strong,
  .task-card p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .task-card p { margin-top: 2px; }
  .task-card p + p { display: none; }
  .task-card-meta {
    width: auto;
    min-width: 0;
    justify-content: flex-end;
    gap: 4px;
  }
  .task-card-meta .pill { min-height: 22px; padding: 2px 5px; font-size: 10px; }
  .mobile-task-list .task-card-meta .pill {
    min-height: 19px;
    padding: 1px 4px;
    font-size: 9px;
    line-height: 1.05;
  }
  .task-card-meta .small-button { min-height: 26px; }
  .calendar-grid { grid-template-columns: repeat(7, 170px); }
  .form-actions { grid-template-columns: 1fr; }
  dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 12px 12px 0 0;
  }
  .task-form {
    max-height: 90vh;
    overflow-y: auto;
    gap: 7px;
    padding: 7px;
    padding-bottom: 8px;
  }
  .form-section {
    padding: 7px;
  }
  .form-section-main input {
    font-size: 14px;
  }
  .modal-head {
    position: sticky;
    top: -7px;
    z-index: 3;
    margin: -7px -7px 0;
    padding: 7px;
  }
  .modal-head h3 { font-size: 15px; }
  .date-quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .date-chip { min-height: 38px; padding: 5px 6px; }
  .compact-date-section .simple-date-choice {
    grid-template-columns: 1fr 1fr;
  }
  .compact-date-section .date-quick-grid {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .compact-date-section .ghost-button {
    width: 100%;
  }
  textarea { min-height: 62px; }
  .notebook-shell {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0;
    min-height: calc(100vh - 58px);
    background: var(--notebook-bg);
  }
  .notebook-shell.is-project-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .notebook-page {
    grid-column: 1;
    grid-row: 1;
    min-height: calc(100vh - 76px);
    padding: 12px;
    background: var(--notebook-bg);
  }
  .notebook-page.is-project-list {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    padding: 10px;
  }
  .notebook-page.is-project-list .notebook-head {
    max-width: 620px;
  }
  .notebook-head h3 {
    padding: 0 44px;
    text-align: center;
  }
  .notebook-head p {
    text-align: center;
  }
  .notebook-head h3 { font-size: 16px; }
  .notebook-task-list {
    min-height: 0;
    padding-bottom: 4px;
  }
  .notebook-task-list.is-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 620px;
    gap: 6px;
    padding-bottom: 2px;
  }
  .notebook-project-card {
    min-height: 52px;
    padding: 6px 7px;
    border-left-width: 4px;
  }
  .notebook-task {
    grid-template-columns: minmax(0, 1fr);
  }
  .notebook-task-number {
    display: none;
  }
  .notebook-task-actions {
    justify-content: flex-end;
  }
  .notebook-add {
    grid-template-columns: minmax(0, 1fr);
  }
  .notebook-arrow {
    position: absolute;
    top: 18px;
    z-index: 4;
    width: 34px;
    height: 34px;
    min-height: 34px;
    border-radius: 8px;
    background: rgba(255,255,255,.9);
    font-size: 22px;
    box-shadow: 0 6px 14px rgba(16,32,51,.08);
  }
  #prevNotebookProject { left: 18px; }
  #nextNotebookProject { right: 18px; }
}

@media (max-width: 430px) {
  * { box-sizing: border-box; }
  body { font-size: 10px; }
  body { overflow-x: hidden; }
  .lock-card {
    width: min(94vw, 340px);
    padding: 22px;
    border-radius: 14px;
  }
  .lock-logo {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }
  .lock-title h1 { font-size: 22px; }
  .lock-title p { font-size: 12px; }
  .security-panel,
  .security-card {
    padding: 10px;
  }
  #settingsView {
    padding-top: 2px;
  }
  .backup-panel {
    padding: 10px;
  }
  .backup-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .backup-actions .primary-button,
  .backup-upload-label {
    width: 100%;
  }
  .mail-preview-form {
    padding: 10px;
  }
  .mail-panel-head {
    display: grid;
  }
  .mail-panel-head .primary-button {
    width: 100%;
  }
  .mail-schedule-row {
    grid-template-columns: 1fr;
  }
  .mail-row-actions,
  .backup-schedule-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .mail-delete-confirm {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .backup-schedule-row {
    grid-template-columns: 1fr;
  }
  .report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mail-preview-meta {
    grid-template-columns: 1fr;
  }
  .mail-preview-frame-wrap {
    height: 58vh;
  }
  .work-plan-page {
    min-height: calc(100vh - 92px);
  }
  .work-plan-list-head,
  .work-plan-card {
    grid-template-columns: 1fr;
  }
  .work-plan-list-head {
    display: grid;
  }
  .work-plan-card-actions {
    justify-content: flex-start;
  }
  .work-plan-toolbar,
  .work-plan-row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .work-plan-name {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
  }
  .work-plan-toolbar label,
  .work-plan-toolbar input,
  .work-plan-zoom,
  .work-plan-download,
  .work-plan-download .primary-button {
    width: 100%;
  }
  .work-plan-task-col {
    width: 260px;
    min-width: 260px;
  }
  .work-plan-days-col {
    left: 260px;
  }
  .security-head {
    gap: 8px;
  }
  .password-feedback span {
    width: 100%;
  }
  .app-shell,
  .workspace,
  .view,
  .day-panel,
  .completed-section,
  .report-panel,
  .project-card,
  .task-card {
    max-width: 100%;
    overflow-x: hidden;
  }
  .workspace { padding: 2px 5px 10px; }
  input,
  textarea,
  select,
  button {
    max-width: 100%;
  }
  .task-table-wrap {
    overflow-x: visible;
    border-radius: 7px;
  }
  .meeting-table,
  .project-row-table {
    min-width: 0;
    font-size: 9px;
  }
  .meeting-quick-add {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 9px;
  }
  .meeting-quick-add > input:first-child,
  .meeting-quick-add .quick-date-control,
  .meeting-quick-add input[type="time"],
  .meeting-quick-add button[data-quick-meeting-add] {
    grid-column: 1 / -1;
  }
  .meeting-quick-add input {
    min-width: 0;
  }
  .meeting-quick-add .quick-date-control {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .meeting-quick-add .quick-date-control input {
    grid-column: 1 / -1;
  }
  .meeting-quick-add button[data-quick-meeting-add] {
    width: 100%;
    min-height: 38px;
  }
  .meeting-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 6px;
    min-height: 40px;
    padding: 7px;
  }
  .meeting-main strong {
    font-size: 11px;
  }
  .meeting-meta {
    gap: 3px;
  }
  .meeting-meta .pill {
    min-height: 20px;
    padding: 1px 5px;
    font-size: 9px;
  }
  .meeting-actions {
    min-width: 66px;
    gap: 2px;
  }
  .completed-meeting-details summary {
    min-height: 38px;
    padding: 0 9px;
  }
  .quick-add-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 5px;
  }
  .quick-add-row td {
    display: block;
    width: 100%;
    padding: 0;
  }
  .quick-add-row .action-cell {
    display: flex;
  }
  .quick-add-row .action-cell button,
  .quick-add-card button {
    width: 100%;
    min-height: 34px;
  }
  .backup-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .backup-actions .primary-button,
  .backup-upload-label {
    width: 100%;
    min-height: 38px;
  }
  .completed-meeting-inner {
    width: 100%;
  }
  .completed-meeting-details-row td {
    padding: 4px;
  }
  .meeting-confirm {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .meeting-table th,
  .meeting-table td,
  .project-row-table th,
  .project-row-table td {
    padding: 4px;
  }
  .meeting-table th:nth-child(2),
  .meeting-table td:nth-child(2),
  .meeting-table th:nth-child(4),
  .meeting-table td:nth-child(4) {
    display: none;
  }
  .project-row-table th:nth-child(2),
  .project-row-table td:nth-child(2),
  .project-row-table th:nth-child(3),
  .project-row-table td:nth-child(3) {
    width: 42px;
    text-align: center;
  }
  .project-row-actions {
    gap: 3px;
    justify-content: flex-end;
  }
  .project-row-actions .ghost-button {
    min-width: 42px;
    padding: 0 6px;
    font-size: 9px;
  }
  .project-task-frame {
    padding: 6px;
  }
  .project-task-line {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    min-height: 0;
    padding: 5px 6px;
  }
  .project-task-line small,
  .project-task-line em {
    text-align: left;
  }
  .small-icon-button {
    width: 32px;
    min-width: 32px;
    min-height: 32px;
  }
  .inline-row-input {
    min-height: 30px;
    font-size: 11px;
  }
  dialog {
    width: calc(100vw - 12px);
    max-height: 94vh;
  }
  .task-form {
    max-height: 92vh;
    padding: 6px;
    gap: 6px;
  }
  .form-section {
    gap: 6px;
    padding: 6px;
  }
  .modal-head {
    top: -6px;
    margin: -6px -6px 0;
    padding: 6px;
  }
  .modal-head h3 {
    font-size: 14px;
  }
  .task-form label,
  .task-form select,
  .task-form input,
  .task-form textarea {
    font-size: 11px;
  }
  .task-form textarea {
    min-height: 52px;
  }
  .date-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .inline-date-input {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .simple-date-choice {
    padding: 6px;
    gap: 6px;
  }
  .compact-date-section .simple-date-choice {
    grid-template-columns: 1fr;
  }
  .compact-date-section .date-quick-grid {
    grid-column: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .compact-date-section .date-chip {
    min-height: 30px;
  }
  .compact-date-section .ghost-button {
    width: 100%;
    justify-self: stretch;
  }
  .modal-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .modal-actions span { display: none; }
  .modal-actions .danger-button {
    grid-column: 1 / -1;
  }
  .notebook-shell {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    min-height: calc(100vh - 58px);
    background: var(--notebook-bg);
  }
  .notebook-shell.is-project-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .notebook-page {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: calc(100vh - 70px);
    padding: 8px;
    background: var(--notebook-bg);
  }
  .notebook-page.is-project-list {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    padding: 8px;
  }
  .notebook-page.is-project-list .notebook-head {
    max-width: 100%;
  }
  .notebook-head h3 {
    padding: 0 38px;
    text-align: center;
  }
  .notebook-head p {
    text-align: center;
  }
  .notebook-task-list {
    gap: 2px;
    min-height: 0;
    max-height: none;
    overflow-y: visible;
    padding-bottom: 4px;
  }
  .notebook-task-list.is-project-grid {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-bottom: 2px;
  }
  .notebook-project-card {
    min-height: 50px;
    padding: 6px 7px;
    border-left-width: 4px;
  }
  .notebook-task {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px;
    min-height: 32px;
    padding: 1px 3px;
  }
  .notebook-task-number {
    display: none;
  }
  .notebook-task-text span {
    font-size: 11px;
  }
  .notebook-task-actions {
    gap: 2px;
  }
  .notebook-confirm {
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .notebook-icon {
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 13px;
  }
  .notebook-yes,
  .notebook-task-actions .small-button {
    min-height: 24px;
    padding: 0 5px;
    font-size: 10px;
  }
  .notebook-add {
    bottom: 8px;
    grid-template-columns: minmax(0, 1fr) auto 52px;
    margin-top: 3px;
    padding-top: 4px;
    padding-bottom: 6px;
  }
  .notebook-add input {
    min-height: 34px;
    padding: 5px 7px;
    font-size: 10px;
  }
  .notebook-page { padding-bottom: 8px; }
  .notebook-date-tools {
    gap: 2px;
  }
  .notebook-date-tools button {
    min-width: 25px;
    min-height: 30px;
    font-size: 11px;
  }
  .notebook-date-input {
    width: 25px;
    height: 30px;
    min-height: 30px;
  }
  .notebook-pager {
    min-height: 24px;
    font-size: 10px;
  }
  .day-tabs {
    margin: 0 -4px 8px;
    padding: 0 4px 4px;
  }
  .day-tab {
    min-width: 74px;
    max-width: 82px;
    min-height: 44px;
    padding: 6px 8px;
    font-size: 11px;
  }
  .day-tab span {
    font-size: 10px;
  }
  .day-panel {
    padding: 6px;
  }
  .daily-task-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "project actions"
      "title actions";
    min-height: 46px;
    padding: 6px;
    gap: 2px 5px;
  }
  .daily-project-name {
    grid-area: project;
  }
  .daily-task-main {
    grid-area: title;
  }
  .daily-actions {
    grid-area: actions;
    justify-content: flex-end;
    width: auto;
    min-width: 68px;
  }
  .notebook-arrow {
    position: absolute;
    top: 15px;
    z-index: 4;
    width: 32px;
    height: 32px;
    min-height: 32px;
    font-size: 22px;
  }
  #prevNotebookProject { left: 12px; }
  #nextNotebookProject { right: 12px; }
  .notebook-dots {
    gap: 4px;
    max-height: 28px;
    overflow: hidden;
  }
  .notebook-dot.active {
    width: 18px;
  }
}

input,
textarea,
select {
  font-size: 16px !important;
}

@media (max-width: 768px) {
  input,
  textarea,
  select {
    font-size: 16px !important;
  }
}
