:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --sidebar: #ffffff;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-soft: #f7f8fb;
  --text: #151927;
  --muted: #697386;
  --line: rgba(36, 48, 75, 0.12);
  --line-strong: rgba(36, 48, 75, 0.2);
  --primary: #635bff;
  --primary-hover: #5148e8;
  --cyan: #00a7bd;
  --success: #16875b;
  --warning: #b96b13;
  --danger: #c63f5b;
  --focus: rgba(99, 91, 255, 0.18);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 22px 64px rgba(15, 23, 42, 0.13);
  --radius: 8px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080b12;
  --sidebar: #0b0f18;
  --surface: rgba(17, 23, 36, 0.84);
  --surface-solid: #111724;
  --surface-soft: #151c2a;
  --text: #f5f7fb;
  --muted: #909bb0;
  --line: rgba(161, 177, 210, 0.12);
  --line-strong: rgba(161, 177, 210, 0.22);
  --primary: #817bff;
  --primary-hover: #9893ff;
  --cyan: #35cfe0;
  --success: #49d49a;
  --warning: #f2b45f;
  --danger: #ff7892;
  --focus: rgba(129, 123, 255, 0.24);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18), 0 12px 32px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.44);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

button[hidden],
.view,
.detail-tab-panel {
  display: none;
}

.view.active,
.detail-tab-panel.active {
  display: block;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2,
strong {
  letter-spacing: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 232px;
  height: 100vh;
  padding: 18px 14px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--sidebar) 94%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 50px;
  padding: 4px 5px;
}

.brand-logo-wrap {
  display: grid;
  place-items: center;
  width: 42px;
  max-width: 42px;
  height: 42px;
  max-height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: 40px;
  max-height: 42px;
  object-fit: contain;
}

.brand > div {
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.nav-tabs {
  display: grid;
  gap: 4px;
}

.nav-tab,
.primary-button,
.ghost-button,
.row-action,
.icon-button,
.detail-tab {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}

.nav-icon,
.nav-tab svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  stroke-width: 1.8;
}

.nav-tab:hover {
  border-color: var(--line);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface-soft));
  color: var(--text);
}

.nav-tab.active {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  background: color-mix(in srgb, var(--primary) 13%, transparent);
  color: var(--primary-hover);
  box-shadow: inset 2px 0 0 var(--cyan);
}

.storage-note {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  margin-top: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
}

.storage-note span {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 12%, transparent);
}

.main-content {
  width: 100%;
  max-width: 1680px;
  min-width: 0;
  margin: 0 auto;
  padding: 24px 30px 48px;
}

.topbar,
.section-toolbar,
.panel-header,
.modal-header,
.modal-actions,
.topbar-actions,
.detail-actions,
.actions,
.card-footer,
.kanban-title {
  display: flex;
  align-items: center;
}

.topbar,
.section-toolbar,
.panel-header,
.modal-header,
.kanban-title {
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  min-height: 72px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 0;
  font-size: 29px;
  font-weight: 760;
  line-height: 1.2;
}

h2 {
  margin-bottom: 3px;
  font-size: 17px;
  font-weight: 730;
  line-height: 1.3;
}

.topbar-actions,
.detail-actions,
.modal-actions,
.actions {
  gap: 8px;
}

#modalPdfButton {
  margin-right: auto;
}

.topbar-actions,
.detail-actions {
  justify-content: flex-end;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.primary-button {
  border-color: color-mix(in srgb, var(--primary) 75%, #ffffff);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 22%, transparent);
}

.primary-button:hover {
  background: var(--primary-hover);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--primary) 28%, transparent);
  transform: translateY(-1px);
}

.ghost-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
  backdrop-filter: blur(14px);
}

.ghost-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-solid);
  transform: translateY(-1px);
}

.user-pill {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.metric-card,
.panel,
.table-shell,
.task-item,
.kanban-column,
.detail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.metric-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 142px;
  padding: 20px;
  overflow: hidden;
  flex-direction: column;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.metric-card::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--cyan);
  content: "";
  opacity: 0.75;
}

.metric-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-card strong {
  margin: auto 0 7px;
  overflow: hidden;
  color: var(--text);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  font-weight: 780;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card:hover,
.detail-card:hover {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  min-width: 0;
  padding: 20px;
}

.panel-header {
  margin-bottom: 15px;
}

.panel p,
.section-toolbar p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
}

.section-toolbar {
  min-height: 56px;
  margin-bottom: 16px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
}

.filter-check input {
  width: 15px;
  min-height: 15px;
  accent-color: var(--primary);
}

.table-shell {
  max-width: 100%;
  overflow: auto;
  scrollbar-color: var(--line-strong) transparent;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 12px;
}

.payment-plan-table {
  min-width: 920px;
}

#extraJobsView table {
  min-width: 1160px;
}

#extraJobsView td:first-child {
  min-width: 210px;
  max-width: 300px;
}

th,
td {
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-solid);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr {
  transition: background 150ms ease;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}

tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 11%, transparent);
  color: var(--primary-hover);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.badge.success {
  border-color: color-mix(in srgb, var(--success) 28%, transparent);
  background: color-mix(in srgb, var(--success) 11%, transparent);
  color: var(--success);
}

.badge.warning {
  border-color: color-mix(in srgb, var(--warning) 28%, transparent);
  background: color-mix(in srgb, var(--warning) 11%, transparent);
  color: var(--warning);
}

.badge.danger {
  border-color: color-mix(in srgb, var(--danger) 28%, transparent);
  background: color-mix(in srgb, var(--danger) 11%, transparent);
  color: var(--danger);
}

.actions {
  justify-content: flex-end;
}

.row-action,
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

.row-action:hover,
.icon-button:hover {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
  background: color-mix(in srgb, var(--primary) 9%, var(--surface-soft));
  color: var(--primary-hover);
  transform: translateY(-1px);
}

.row-action.delete {
  color: var(--danger);
}

.row-action.detail {
  width: auto;
  min-width: 56px;
  padding: 0 10px;
  color: var(--primary-hover);
  font-size: 11px;
  font-weight: 700;
}

.row-action svg,
.icon-button svg {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

.row-action svg + .icon-fallback {
  display: none;
}

.icon-fallback {
  font-size: 15px;
  line-height: 1;
}

.compact-list,
.task-list {
  display: grid;
  gap: 9px;
}

.compact-item,
.content-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.compact-item {
  display: grid;
  gap: 4px;
}

.meta-line {
  color: var(--muted);
  font-size: 11px;
}

.kanban-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.kanban-column {
  min-height: 350px;
  padding: 13px;
}

.kanban-title {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 750;
}

.content-card {
  display: grid;
  gap: 6px;
  margin-bottom: 9px;
}

.card-footer {
  justify-content: space-between;
  gap: 8px;
}

.task-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  box-shadow: none;
}

.task-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.task-item.completed {
  opacity: 0.62;
}

.task-item.completed strong {
  text-decoration: line-through;
}

.client-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 16px;
}

.client-detail-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.detail-card {
  min-width: 0;
  min-height: 84px;
  padding: 14px;
  box-shadow: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.detail-card small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.detail-tabs {
  display: flex;
  gap: 4px;
  margin: 8px 0 16px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.detail-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.detail-tab:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.detail-tab.active {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.summary-card {
  min-height: 116px;
}

.summary-card.paid strong,
.remaining-cell.is-paid,
.is-paid {
  color: var(--success);
}

.summary-card.remaining strong,
.remaining-cell.is-due {
  color: var(--danger);
}

.payment-input,
.payment-note {
  min-width: 116px;
}

.payment-note {
  min-width: 210px;
}

.remaining-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.note-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin: 14px 0;
}

.note-form textarea {
  min-height: 72px;
}

.note-item .actions {
  justify-content: flex-start;
}

.empty-state {
  display: grid;
  gap: 5px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-soft) 70%, transparent);
  color: var(--text);
  text-align: center;
}

.empty-state span {
  color: var(--muted);
  font-size: 11px;
}

.modal {
  width: 680px;
  max-width: min(680px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(3, 5, 10, 0.76);
  backdrop-filter: blur(9px);
}

.modal-card {
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 17px 0;
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line-strong));
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  background: var(--surface-solid);
  box-shadow: 0 0 0 3px var(--focus);
}

input[readonly] {
  color: var(--muted);
  cursor: not-allowed;
}

.modal-actions {
  justify-content: flex-end;
}

.alert {
  margin: 15px 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 650;
}

.alert.success {
  border-color: color-mix(in srgb, var(--success) 30%, transparent);
  background: color-mix(in srgb, var(--success) 10%, transparent);
  color: var(--success);
}

.alert.warning {
  border-color: color-mix(in srgb, var(--warning) 30%, transparent);
  background: color-mix(in srgb, var(--warning) 10%, transparent);
  color: var(--warning);
}

.alert.error {
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
}

.auth-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 22px;
  background: #080b12;
}

.auth-shell {
  width: min(440px, 100%);
}

.auth-card {
  padding: 30px;
  border: 1px solid rgba(161, 177, 210, 0.15);
  border-radius: var(--radius);
  background: rgba(17, 23, 36, 0.94);
  color: #f5f7fb;
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(24px);
}

.auth-brand {
  grid-template-columns: minmax(0, 150px) minmax(0, 1fr);
  min-height: 58px;
  padding: 0 0 20px;
  border-bottom: 1px solid rgba(161, 177, 210, 0.13);
}

.auth-logo-wrap {
  width: 150px;
  max-width: 150px;
  height: 42px;
  max-height: 42px;
  padding: 2px 8px;
}

.auth-brand strong {
  color: #f5f7fb;
}

.auth-brand small,
.auth-card p,
.auth-card label {
  color: #909bb0;
}

.auth-card h1 {
  margin: 23px 0 7px;
  font-size: 27px;
  font-weight: 760;
}

.auth-form {
  display: grid;
  gap: 13px;
  margin-top: 17px;
}

.auth-form .primary-button {
  width: 100%;
}

.auth-card input,
.auth-card select,
.auth-card textarea {
  border-color: rgba(161, 177, 210, 0.17);
  background: #151c2a;
  color: #f5f7fb;
}

.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
  border-color: #817bff;
  background: #171f2f;
  box-shadow: 0 0 0 3px rgba(129, 123, 255, 0.22);
}

.auth-link {
  display: inline-flex;
  margin-top: 16px;
  color: #9893ff;
  font-size: 12px;
  font-weight: 700;
}

.auth-card input:-webkit-autofill,
.auth-card input:-webkit-autofill:hover,
.auth-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f5f7fb;
  box-shadow: 0 0 0 1000px #151c2a inset;
  caret-color: #f5f7fb;
}

.pdf-stage {
  position: fixed;
  top: 0;
  left: -99999px;
  width: 794px;
  pointer-events: none;
}

.pdf-report {
  width: 794px;
  min-height: 1123px;
  padding: 42px;
  background: #ffffff;
  color: #182033;
  font-family: Arial, Helvetica, sans-serif;
}

.pdf-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 3px solid #635bff;
}

.pdf-header h1 {
  margin: 0 0 7px;
  color: #12182a;
  font-size: 31px;
  line-height: 1.1;
}

.pdf-header p {
  margin: 0;
  color: #697386;
  font-size: 15px;
  font-weight: 700;
}

.pdf-brand {
  width: 132px;
  min-height: 60px;
  padding: 7px 10px;
  border: 1px solid #dfe4ee;
  border-radius: 8px;
  background: #ffffff;
  color: #5148e8;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.pdf-brand img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 32px;
  margin: 0 auto 4px;
  object-fit: contain;
}

.pdf-brand span {
  display: block;
}

.pdf-info-grid,
.pdf-total-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pdf-info-grid {
  margin: 21px 0;
}

.pdf-total-grid {
  margin: 21px 0;
}

.pdf-info-box,
.pdf-total-box {
  padding: 10px;
  border: 1px solid #dfe4ee;
  border-radius: 8px;
  background: #f8f9fc;
}

.pdf-info-box small,
.pdf-total-box small {
  display: block;
  margin-bottom: 4px;
  color: #697386;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.pdf-info-box strong,
.pdf-total-box strong {
  color: #12182a;
  font-size: 12px;
}

.pdf-payment-table {
  width: 100%;
  min-width: 0;
  margin-top: 9px;
  border-collapse: collapse;
  font-size: 11px;
}

.pdf-payment-table th {
  position: static;
  padding: 8px;
  border: 1px solid #171d3d;
  background: #171d3d;
  color: #ffffff;
  letter-spacing: 0;
  text-transform: none;
}

.pdf-payment-table td {
  padding: 8px;
  border: 1px solid #dfe4ee;
  color: #182033;
}

.pdf-payment-table small {
  color: #697386;
  font-size: 8px;
  line-height: 1.35;
}

.pdf-extra-table {
  font-size: 9px;
}

.pdf-extra-table th,
.pdf-extra-table td {
  padding: 6px;
}

.pdf-payment-table tr.pdf-row-paid td {
  background: #f0fdf6;
}

.pdf-payment-table tr.pdf-row-due td {
  background: #fff2f4;
}

.pdf-money {
  text-align: right;
  white-space: nowrap;
}

.pdf-paid {
  color: #16875b !important;
  font-weight: 800;
}

.pdf-due {
  color: #c63f5b !important;
  font-weight: 800;
}

.pdf-note {
  min-height: 88px;
  padding: 12px;
  border: 1px solid #dfe4ee;
  border-radius: 8px;
  background: #f8f9fc;
}

.pdf-note strong {
  display: block;
  margin-bottom: 6px;
  color: #12182a;
}

.pdf-note p {
  margin: 0;
  color: #556075;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 1280px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    gap: 10px;
    padding: 11px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    width: fit-content;
    min-height: 46px;
  }

  .nav-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-tab {
    flex: 0 0 auto;
    width: auto;
  }

  .storage-note {
    display: none;
  }

  .main-content {
    padding: 22px 20px 38px;
  }

  .metric-grid,
  .client-detail-grid,
  .client-detail-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .sidebar {
    padding: 9px 10px;
  }

  .brand small {
    display: none;
  }

  .nav-tab {
    min-height: 38px;
    padding: 8px 9px;
  }

  .main-content {
    padding: 17px 12px 28px;
  }

  .topbar,
  .section-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    gap: 14px;
    margin-bottom: 20px;
  }

  h1 {
    font-size: 24px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .topbar-actions .user-pill {
    grid-column: 1 / -1;
    max-width: none;
  }

  .section-toolbar .primary-button,
  .detail-actions,
  .detail-actions .primary-button,
  .detail-actions .ghost-button {
    width: 100%;
  }

  .metric-grid,
  .client-detail-grid,
  .client-detail-grid.compact,
  .payment-summary-grid,
  .filter-bar,
  .form-grid,
  .note-form {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    gap: 12px;
  }

  .metric-card {
    min-height: 124px;
  }

  .task-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .task-item .actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .modal-card,
  .auth-card {
    padding: 20px;
  }

  .auth-brand {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .auth-logo-wrap {
    width: 112px;
  }
}

/* Dashboard experience */
[data-theme="dark"] body {
  background: linear-gradient(145deg, #070910 0%, #0b1020 48%, #090d17 100%);
}

.app-shell {
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  width: 260px;
  padding: 22px 17px 18px;
  background: rgba(8, 12, 22, 0.9);
  box-shadow: 16px 0 50px rgba(0, 0, 0, 0.2);
}

.sidebar .brand {
  display: flex;
  min-height: 104px;
  padding: 4px 8px 16px;
  align-items: flex-start;
  flex-direction: column;
  gap: 9px;
  border-bottom: 1px solid var(--line);
}

.sidebar .brand-logo-wrap {
  width: 150px;
  max-width: 150px;
  height: 54px;
  max-height: 64px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.sidebar .brand-logo {
  width: auto;
  max-width: 100%;
  height: 42px;
  object-fit: contain;
}

.sidebar .brand strong {
  font-size: 14px;
}

.nav-tabs {
  gap: 6px;
}

.nav-tab {
  min-height: 43px;
  padding: 10px 11px;
}

.nav-tab.active {
  border-color: rgba(129, 123, 255, 0.42);
  background: linear-gradient(100deg, rgba(99, 91, 255, 0.34), rgba(53, 207, 224, 0.11));
  color: #c7c4ff;
  box-shadow: 0 8px 24px rgba(99, 91, 255, 0.15), inset 2px 0 0 #35cfe0;
}

.nav-tab:hover {
  box-shadow: 0 7px 22px rgba(99, 91, 255, 0.09);
}

.sidebar-footer {
  display: grid;
  gap: 9px;
  margin-top: auto;
}

.sidebar-user {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 28, 42, 0.72);
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user strong {
  font-size: 11px;
}

.sidebar-user small {
  color: var(--muted);
  font-size: 9px;
}

.user-avatar {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(129, 123, 255, 0.38);
  border-radius: 50%;
  background: linear-gradient(145deg, #635bff, #21b9d1);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-overlay {
  display: none;
}

.main-content {
  max-width: 1780px;
  padding: 22px 30px 50px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(280px, 520px) auto;
  gap: 18px;
  align-items: center;
  min-height: 76px;
}

.topbar-title {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.menu-toggle {
  display: none;
}

.global-search {
  position: relative;
  display: block;
}

.global-search svg {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: translateY(-50%);
}

.global-search input {
  height: 42px;
  padding-left: 39px;
  border-color: rgba(161, 177, 210, 0.15);
  background: rgba(17, 23, 36, 0.72);
  backdrop-filter: blur(16px);
}

.topbar-actions {
  white-space: nowrap;
}

.topbar-actions .icon-button {
  background: rgba(17, 23, 36, 0.72);
  backdrop-filter: blur(16px);
}

.topbar-avatar {
  flex: 0 0 34px;
}

.topbar .primary-button {
  background: linear-gradient(110deg, #635bff, #7c5cff);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

.dashboard-welcome {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 22px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(105deg, rgba(99, 91, 255, 0.13), rgba(53, 207, 224, 0.05));
  box-shadow: var(--shadow-sm);
}

.dashboard-welcome h2 {
  margin-bottom: 4px;
  font-size: 23px;
}

.dashboard-welcome p {
  margin-bottom: 0;
  color: var(--muted);
}

.welcome-date {
  color: var(--muted);
  font-size: 11px;
  text-transform: capitalize;
  white-space: nowrap;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.metric-card {
  min-height: 158px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(22, 29, 45, 0.9), rgba(13, 18, 30, 0.82));
}

.metric-card::after {
  display: none;
}

.metric-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 50%;
  background: rgba(129, 123, 255, 0.14);
  color: #9893ff;
}

.metric-icon svg {
  width: 18px;
  height: 18px;
}

.metric-card strong {
  margin: 0 0 7px;
  font-size: 29px;
}

.accent-green .metric-icon { background: rgba(73, 212, 154, 0.14); color: #49d49a; }
.accent-red .metric-icon { background: rgba(255, 120, 146, 0.14); color: #ff7892; }
.accent-orange .metric-icon { background: rgba(242, 180, 95, 0.14); color: #f2b45f; }
.accent-blue .metric-icon { background: rgba(85, 146, 255, 0.14); color: #78a8ff; }
.accent-cyan .metric-icon { background: rgba(53, 207, 224, 0.14); color: #35cfe0; }

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.chart-panel {
  min-width: 0;
}

.chart-wrap {
  position: relative;
  height: 260px;
}

.panel-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--cyan);
}

.panel-icon svg {
  width: 16px;
}

.dashboard-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-link {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--primary-hover);
  font-size: 11px;
  font-weight: 700;
}

.preview-title {
  display: flex;
  gap: 7px;
  align-items: center;
}

.priority-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--success);
}

.priority-dot.high { background: var(--danger); }
.priority-dot.medium { background: var(--warning); }

.ai-status-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}

.ai-status-bar strong {
  color: var(--text);
}

.ai-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(73, 212, 154, 0.1);
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.insight-card {
  display: flex;
  min-width: 0;
  min-height: 250px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(21, 28, 44, 0.9), rgba(12, 17, 28, 0.86));
  box-shadow: var(--shadow-sm);
  flex-direction: column;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.insight-card:hover {
  border-color: rgba(129, 123, 255, 0.35);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.insight-card.is-done {
  opacity: 0.65;
}

.insight-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
}

.insight-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: rgba(129, 123, 255, 0.14);
  color: #9893ff;
}

.insight-icon svg {
  width: 17px;
}

.insight-badges {
  display: flex;
  gap: 5px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.insight-card h3 {
  margin: 0;
  font-size: 14px;
}

.insight-card > p {
  margin: 14px 0;
  color: var(--muted);
  font-size: 12px;
}

.insight-customer {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: auto;
  color: var(--cyan);
  font-size: 11px;
}

.insight-customer svg {
  width: 14px;
}

.insight-actions {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.insight-actions .ghost-button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 10px;
}

.ai-strategy-panel {
  overflow: hidden;
  position: relative;
}

.ai-strategy-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 160px;
  background:
    radial-gradient(circle at 18% 0%, rgba(77, 232, 255, 0.16), transparent 34%),
    radial-gradient(circle at 72% 0%, rgba(151, 111, 255, 0.18), transparent 36%);
  content: "";
  pointer-events: none;
}

.ai-strategy-panel > * {
  position: relative;
  z-index: 1;
}

.ai-strategy-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ai-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.ai-profile-card {
  min-height: 94px;
  background: linear-gradient(145deg, rgba(16, 23, 38, 0.72), rgba(9, 13, 24, 0.76));
}

.ai-profile-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.45;
}

.ai-status-bar.compact {
  margin: 0 0 16px;
  background: rgba(7, 12, 24, 0.48);
}

.ai-memory-panel {
  margin-bottom: 16px;
  background:
    linear-gradient(145deg, rgba(18, 27, 44, 0.9), rgba(7, 11, 22, 0.86)),
    radial-gradient(circle at 90% 0%, rgba(77, 232, 255, 0.14), transparent 34%);
}

.ai-daily-panel {
  margin-bottom: 16px;
}

.daily-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.daily-brief-card {
  display: flex;
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(145deg, rgba(18, 27, 44, 0.88), rgba(7, 11, 22, 0.84));
  box-shadow: var(--shadow-sm);
  flex-direction: column;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.daily-brief-card:hover {
  border-color: rgba(77, 232, 255, 0.28);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.daily-brief-card h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 17px;
}

.daily-brief-card > strong {
  margin: 10px 0 12px;
  color: var(--text);
  line-height: 1.5;
}

.daily-brief-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.daily-focus {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(77, 232, 255, 0.2);
  border-radius: 999px;
  background: rgba(77, 232, 255, 0.07);
  color: var(--cyan) !important;
  font-weight: 700;
}

.ai-memory-grid textarea {
  min-height: 94px;
}

.ai-memory-grid .field:nth-child(4) textarea,
.ai-memory-grid .field:nth-child(7) textarea {
  min-height: 118px;
}

.ai-strategy-output {
  min-height: 180px;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.strategy-grid.weekly {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.strategy-card,
.analysis-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(145deg, rgba(18, 27, 44, 0.82), rgba(7, 11, 22, 0.8));
  box-shadow: var(--shadow-sm);
}

.strategy-card {
  display: flex;
  min-height: 360px;
  padding: 18px;
  flex-direction: column;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.strategy-card:hover {
  border-color: rgba(77, 232, 255, 0.28);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.strategy-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.strategy-card h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
}

.strategy-card p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.strategy-card b {
  color: var(--text);
  font-weight: 700;
}

.strategy-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  flex-wrap: wrap;
}

.strategy-actions .ghost-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 11px;
}

.weekly-card {
  min-height: 280px;
}

.analysis-card {
  padding: 18px;
}

.analysis-hero {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.analysis-hero > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(77, 232, 255, 0.18), rgba(151, 111, 255, 0.18));
  color: var(--cyan);
}

.analysis-hero svg {
  width: 21px;
}

.analysis-hero h3,
.analysis-positioning strong,
.analysis-grid h4 {
  margin: 0;
  color: var(--text);
}

.analysis-hero p,
.analysis-positioning p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.analysis-positioning {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(77, 232, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(77, 232, 255, 0.06);
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.analysis-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.analysis-grid h4 {
  margin-bottom: 9px;
  font-size: 13px;
}

.analysis-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.loading-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed rgba(77, 232, 255, 0.24);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(77, 232, 255, 0.045);
  text-align: center;
}

.loading-state p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.danger-button {
  color: var(--danger);
}

.button-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

:root:not([data-theme="dark"]) .sidebar {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 16px 0 44px rgba(30, 42, 68, 0.07);
}

:root:not([data-theme="dark"]) .sidebar-user,
:root:not([data-theme="dark"]) .global-search input,
:root:not([data-theme="dark"]) .topbar-actions .icon-button {
  background: rgba(255, 255, 255, 0.82);
}

:root:not([data-theme="dark"]) .metric-card,
:root:not([data-theme="dark"]) .insight-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(245, 247, 252, 0.88));
}

.auth-shell {
  width: min(820px, 100%);
}

.auth-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 480px;
  padding: 0;
  overflow: hidden;
}

.auth-brand {
  display: flex;
  min-height: 100%;
  padding: 34px 28px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  border: 0;
  border-right: 1px solid rgba(161, 177, 210, 0.13);
  background: linear-gradient(145deg, rgba(99, 91, 255, 0.18), rgba(53, 207, 224, 0.06));
}

.auth-logo-wrap {
  width: 150px;
  height: 64px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.auth-content {
  align-self: center;
  padding: 34px;
}

@media (max-width: 1320px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
  .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-preview-panel { grid-column: 1 / -1; }
}

@media (max-width: 1024px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(280px, calc(100vw - 48px));
    height: 100vh;
    padding: 20px 16px;
    border-right: 1px solid var(--line);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }
  .sidebar .brand { width: 100%; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed;
    z-index: 15;
    inset: 0;
    border: 0;
    background: rgba(2, 4, 10, 0.68);
    backdrop-filter: blur(4px);
  }
  .sidebar-open .sidebar-overlay { display: block; }
  .menu-toggle { display: inline-grid; }
  .main-content { padding: 20px; }
  .topbar { grid-template-columns: 1fr auto; }
  .global-search { grid-column: 1 / -1; grid-row: 2; }
  .chart-grid { grid-template-columns: 1fr; }
  .ai-profile-grid,
  .strategy-grid.weekly { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .main-content { padding: 14px 12px 28px; }
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .topbar-title { grid-column: 1 / -1; }
  .topbar-title .eyebrow { display: none; }
  .global-search { grid-column: 1; grid-row: 2; min-width: 0; }
  .topbar-actions { grid-column: 2; grid-row: 2; justify-content: flex-end; flex-wrap: nowrap; }
  #notificationButton,
  .topbar-avatar { display: none; }
  #quickAddButton { width: 42px; min-width: 42px; padding: 0; }
  #quickAddButton span { display: none; }
  .dashboard-welcome { align-items: flex-start; flex-direction: column; }
  .metric-grid,
  .insight-grid,
  .dashboard-three,
  .daily-brief-grid,
  .ai-profile-grid,
  .strategy-grid,
  .strategy-grid.weekly,
  .analysis-grid { grid-template-columns: 1fr; }
  .ai-strategy-actions { justify-content: stretch; }
  .ai-strategy-actions .ghost-button,
  .ai-strategy-actions .primary-button { flex: 1 1 100%; }
  .metric-card { min-height: 146px; }
  .chart-wrap { height: 230px; }
  .ai-preview-panel { grid-column: auto; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-brand { min-height: 190px; padding: 26px; border-right: 0; border-bottom: 1px solid rgba(161, 177, 210, 0.13); }
  .auth-content { width: 100%; padding: 26px 22px; }
}
