@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --navy: #102b50;
  --yellow: #f5c400;
  --paper: #ffffff;
  --bg: #e9edf2;
  --ink: var(--navy);
  --muted: #4e6076;
  --line: #d2dae5;
  --blue: #244d7e;
  --heading-font: 'Barlow Semi Condensed', 'Arial Narrow', Arial, sans-serif;
}

.app-page, .login-page, .setup-page, .error-page, body.modal-project-page {
  background: var(--bg);
}

:is(h1, h2, h3), .topbar-page-title {
  color: var(--navy);
}

.brand-copy h1, .login-card h2, .welcome-row h1, .board-heading h2,
.clients-heading h1, .crud-heading h1, .company-heading h1,
.setup-card h1, .error-card h1, .project-dialog-heading h2,
.company-section-heading h2, .company-logo-card h2 {
  font-family: var(--heading-font);
  font-weight: 700;
  letter-spacing: 0;
}

.eyebrow { font-size: .75rem; letter-spacing: .11em; }
.accent { color: var(--blue); }

.button-primary {
  background: var(--yellow);
  color: var(--navy);
  border-radius: 7px;
}
.button-primary:hover { background: #ffda42; color: var(--navy); }
.button-primary:disabled { color: var(--navy); }
.filter-button, .crud-filters button { background: var(--navy); color: var(--paper); }
.filter-button:hover, .crud-filters button:hover { background: var(--blue); }

.login-shell {
  grid-template-columns: 1.15fr 1fr;
  min-height: 565px;
  border-radius: 15px;
}
.login-brand {
  background: var(--navy);
  border-top: 6px solid var(--yellow);
  padding: clamp(28px, 5vw, 62px);
}
.login-brand::after {
  inset: auto -45px -100px auto;
  width: 270px;
  height: 235px;
  transform: rotate(-32deg);
  border-radius: 0;
  border: 0;
  background: repeating-linear-gradient(90deg, transparent 0 22px, #ffffff12 22px 24px);
  box-shadow: none;
}
.login-company-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  font: 700 1.65rem/1.1 var(--heading-font);
  overflow-wrap: anywhere;
}
.login-company-brand img {
  flex: none;
  padding: 4px;
  object-fit: contain;
  background: var(--paper);
  border-radius: 7px;
}
.brand-copy { max-width: 430px; }
.brand-copy .eyebrow { color: var(--yellow); }
.brand-copy h1 { color: var(--paper); font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1; }
.brand-copy p { color: var(--bg); }
.login-card h2 { font-size: 2rem; }
.login-card form label, .setup-card label { font-size: .875rem; }
.panel-footer { color: var(--muted); }

.topbar { border-top: 4px solid var(--yellow); }
.topbar-page-title { font-family: var(--heading-font); font-size: 1.2rem; }
.avatar { background: var(--bg); color: var(--navy); }
.sidebar { background: var(--navy); border-color: transparent; }
.sidebar-link { color: var(--bg); font-size: .875rem; border-radius: 7px; }
.sidebar-link:hover { background: #ffffff18; color: var(--paper); }
.sidebar-link.is-active,
.sidebar-link.is-active:hover,
.sidebar-link.sidebar-submenu-toggle[aria-expanded="true"],
.sidebar-link.sidebar-submenu-toggle[aria-expanded="true"]:hover {
  background: var(--yellow);
  color: var(--navy);
}
.sidebar-nav:has(> .sidebar-group > .sidebar-submenu-toggle[aria-expanded="true"]) > a.sidebar-link.is-active {
  background: transparent;
  color: var(--bg);
}
.sidebar-nav:has(> .sidebar-group > .sidebar-submenu-toggle[aria-expanded="true"]) > a.sidebar-link.is-active:hover {
  background: #ffffff18;
  color: var(--paper);
}
.sidebar-link:focus-visible { outline-color: var(--yellow); }

.welcome-row {
  position: relative;
  align-items: center;
  padding: clamp(18px, 3vw, 32px);
  background: var(--navy);
  border-radius: 10px;
  border-left: 5px solid var(--yellow);
}
.welcome-row h1 { color: var(--paper); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; }
.welcome-row .eyebrow { color: var(--yellow); }
.welcome-row .muted, .welcome-row .today, .welcome-row .today strong { color: var(--bg); }
.summary-grid { margin: 18px 0 28px; }
.summary-card { border-radius: 9px; }
.summary-card strong { font: 700 1.65rem/1 var(--heading-font); }
.summary-label { color: var(--muted); font-size: .875rem; }
.summary-icon.amber { background: #fff4c2; color: var(--navy); }
.board-heading h2 { font-size: 1.65rem; }
.board-column {
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-top: 3px solid var(--column-color, var(--line));
  border-radius: 9px;
}
.column-heading h3, .project-card h4 { font-size: .875rem; }
.column-dot { border: 1px solid #102b5040; }
.column-count, .board-count { background: var(--bg); color: var(--navy); }
.project-card {
  background: var(--paper);
  border-left: 4px solid var(--card-color, var(--line));
}
.card-client, .card-description, .card-meta, .wip-limit, .empty-column, .board-scroll-hint {
  color: var(--muted);
  font-size: .8125rem;
}

.clients-heading, .crud-heading, .company-heading {
  padding-left: 16px;
  border-left: 4px solid var(--yellow);
}
.clients-heading h1, .crud-heading h1, .company-heading h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1;
}
.client-form-card, .client-list-card, .crud-form-card, .crud-list-card, .company-card {
  border-radius: 10px;
  box-shadow: none;
}
.client-form-heading h2, .client-list-heading h2, .crud-section-heading h2, .crud-list-heading h2 {
  font-family: var(--heading-font);
  font-size: 1.25rem;
}
.clients-total, .crud-total { border-top: 3px solid var(--yellow); }
.client-table th, .crud-table th { background: #f2f5f8; color: var(--navy); }
.company-mark { display: none; }
.company-card .company-section-heading { gap: 0; }
.company-section-heading h2 { font-size: 1.25rem; }
.company-section-heading p, .company-actions p { color: var(--muted); }
.company-logo-card { border-top: 3px solid var(--yellow); }
.company-logo-card label { display: block; margin-bottom: 6px; font-weight: 600; }

:is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.sidebar-toggle:focus-visible { outline: 2px solid var(--blue); }
.sidebar .sidebar-link:focus-visible { outline-color: var(--yellow); }

@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; min-height: 0; }
  .login-brand { padding: 24px 25px; }
  .brand-copy { margin: 24px 0 0; }
  .brand-copy h1 { font-size: 2.15rem; }
  .topbar-page-title { font-size: 1rem; }
  .sidebar { z-index: 9; overflow-y: auto; }
  .board-column { flex-basis: min(77vw, 290px); }
  .summary-label { font-size: .8125rem; }
}

@media (max-width: 420px) {
  .topbar { padding-inline: 12px; }
  .topbar-left { gap: 7px; }
  .topbar-brand .company-name { display: none; }
  .topbar-right { gap: 7px; }
  .summary-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .button-primary { transition: none; }
  .button-primary:hover { transform: none; }
}
