:root {
  --ink: #233554;
  --muted: #718198;
  --line: #dce5ee;
  --soft: #f3f8fc;
  --white: #ffffff;
  --teal: #263957;
  --teal-dark: #192b49;
  --teal-soft: #eaf1f7;
  --blue-soft: #e7f1f8;
  --amber: #a76e21;
  --amber-soft: #fff3df;
  --red: #b94242;
  --shadow: 0 12px 34px rgba(28, 57, 55, 0.09);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  gap: 10px;
  letter-spacing: .08em;
  text-decoration: none;
}

.logo-link {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 9px;
  font-weight: 800;
  gap: 10px;
  letter-spacing: .15em;
  text-decoration: none;
}

.logo-link img {
  border-radius: 11px;
  display: block;
  height: 46px;
  object-fit: cover;
  width: 51px;
}

.logo-link-light { color: white; }
.logo-link-light img { border: 1px solid rgba(255,255,255,.22); height: 62px; width: 69px; }

.brand strong { color: var(--teal); }
.brand-light { color: white; }
.brand-light strong { color: #9de8d9; }

.brand-mark {
  align-items: center;
  background: var(--teal);
  border-radius: 9px;
  color: white;
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  letter-spacing: -.08em;
  transform: skew(-4deg);
  width: 36px;
}

.brand-light .brand-mark { background: white; color: var(--teal-dark); }

.eyebrow {
  color: var(--teal);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  margin-bottom: 10px;
}

.eyebrow.light { color: #9de8d9; }
.muted { color: var(--muted); }

.login-screen {
  background: var(--white);
  display: grid;
  grid-template-columns: minmax(420px, .92fr) 1.08fr;
  min-height: 100vh;
}

.login-brand-panel {
  background:
    radial-gradient(circle at 8% 85%, rgba(178, 211, 232, .16), transparent 30%),
    radial-gradient(circle at 85% 12%, rgba(178, 211, 232, .10), transparent 24%),
    linear-gradient(145deg, #1c2d4b 0%, #263957 54%, #1b2c49 100%);
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  padding: 42px clamp(42px, 6vw, 90px);
  position: relative;
}

.login-brand-panel::after {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  content: "";
  height: 460px;
  position: absolute;
  right: -270px;
  top: 28%;
  width: 460px;
}

.login-brand-copy { margin: auto 0; max-width: 520px; position: relative; z-index: 1; }
.login-brand-copy h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 4.2vw, 62px); font-weight: 500; letter-spacing: -.04em; line-height: 1.03; margin: 0 0 24px; }
.login-brand-copy > p { color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.65; max-width: 480px; }

.benefits { display: grid; gap: 20px; margin-top: 42px; }
.benefits > div { align-items: center; display: flex; gap: 15px; }
.benefits span:last-child { display: grid; gap: 4px; }
.benefits strong { font-size: 14px; }
.benefits small { color: rgba(255,255,255,.58); font-size: 13px; }
.benefit-icon {
  align-items: center; background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.11);
  border-radius: 10px; color: #d6ebf6; display: flex; font-weight: 800; height: 40px; justify-content: center; width: 40px;
}
.brand-footer { color: rgba(255,255,255,.45); font-size: 12px; margin: 0; }

.login-form-panel { align-items: center; display: flex; justify-content: center; padding: 48px; }
.login-card { max-width: 410px; width: 100%; }
.login-card h2 { font-size: 32px; letter-spacing: -.035em; margin: 0 0 8px; }
.login-card > p { font-size: 14px; margin: 0 0 36px; }
.login-card form { display: grid; }
.login-card label { font-size: 13px; font-weight: 700; margin: 0 0 8px; }
.login-card label:not(:first-child) { margin-top: 20px; }
.input-wrap { position: relative; }
.input-wrap input {
  background: white; border: 1px solid #cfdbd9; border-radius: 10px; color: var(--ink); height: 50px;
  outline: none; padding: 0 50px 0 42px; transition: .2s; width: 100%;
}
.input-wrap input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(12,122,112,.10); }
.input-icon { color: #8a999b; font-size: 13px; left: 15px; position: absolute; top: 17px; }
.password-toggle { background: none; border: 0; color: var(--teal); font-size: 11px; font-weight: 700; padding: 10px; position: absolute; right: 5px; top: 5px; }
.form-error { color: var(--red); font-size: 12px; line-height: 1.4; margin: 12px 0 0 !important; min-height: 17px; }

.primary-button {
  align-items: center; background: var(--teal); border: 0; border-radius: 10px; color: white; display: inline-flex;
  font-size: 13px; font-weight: 750; gap: 10px; justify-content: center; min-height: 44px; padding: 0 18px; transition: .18s;
}
.primary-button:hover { background: var(--teal-dark); transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.primary-button.full { justify-content: space-between; margin-top: 22px; width: 100%; }
.login-help { color: var(--muted); font-size: 12px !important; margin-top: 26px !important; text-align: center; }
.login-help a, .sidebar-note a { color: var(--teal); font-weight: 750; text-decoration: none; }
.mobile-logo { display: none; }
.mobile-logo img { border-radius: 10px; height: 48px; object-fit: cover; width: 53px; }

.app-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: white; border-right: 1px solid var(--line); display: flex; flex-direction: column; height: 100vh;
  padding: 28px 20px 20px; position: sticky; top: 0;
}
.sidebar .brand, .sidebar .logo-link { margin: 0 8px 42px; }
.sidebar nav { flex: 1; }
.nav-item {
  align-items: center; background: none; border: 0; border-radius: 9px; color: #536365; display: flex;
  font-size: 13px; font-weight: 650; gap: 12px; padding: 12px; text-align: left; width: 100%;
}
.nav-item.active { background: var(--teal-soft); color: var(--teal-dark); }
.nav-icon { font-size: 18px; }
.sidebar-note { background: var(--soft); border-radius: 12px; margin: 16px 0; padding: 16px; }
.sidebar-note-icon { align-items: center; background: var(--teal-soft); border-radius: 50%; color: var(--teal); display: flex; font-weight: 800; height: 28px; justify-content: center; margin-bottom: 12px; width: 28px; }
.sidebar-note strong { font-size: 12px; }
.sidebar-note p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 7px 0 10px; }
.sidebar-note a { font-size: 11px; }
.user-card { align-items: center; border-top: 1px solid var(--line); display: grid; gap: 10px; grid-template-columns: auto minmax(0,1fr) auto; padding-top: 18px; }
.avatar { align-items: center; background: var(--teal); border-radius: 9px; color: white; display: flex; font-size: 11px; font-weight: 750; height: 36px; justify-content: center; width: 36px; }
.user-meta { display: grid; min-width: 0; }
.user-meta strong, .user-meta small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta strong { font-size: 11px; }
.user-meta small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.icon-button { background: none; border: 0; color: #718083; font-size: 18px; padding: 6px; }

.main-content { margin: 0 auto; max-width: 1440px; padding: 42px clamp(28px, 4vw, 62px) 64px; width: 100%; }
.dashboard-header { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 30px; }
.dashboard-header h1 { font-size: 28px; letter-spacing: -.035em; margin: 0 0 8px; }
.dashboard-header p { font-size: 13px; margin: 0; }
.stats-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; }
.stat-card { align-items: center; background: white; border: 1px solid var(--line); border-radius: var(--radius); display: flex; gap: 16px; min-height: 108px; padding: 20px; }
.stat-card.accent { border-color: #b9ddd7; box-shadow: 0 6px 20px rgba(12,122,112,.06); }
.stat-card > span:last-child { display: grid; grid-template-columns: auto 1fr; }
.stat-card small { color: #7d8b8d; font-size: 9px; font-weight: 800; grid-column: 1/-1; letter-spacing: .1em; margin-bottom: 6px; }
.stat-card strong { font-size: 28px; letter-spacing: -.04em; line-height: 1; }
.stat-card em { align-self: end; color: #8a989a; font-size: 10px; font-style: normal; margin: 0 0 2px 8px; }
.stat-icon { align-items: center; background: var(--teal-soft); border-radius: 11px; color: var(--teal); display: flex; font-size: 18px; font-weight: 800; height: 46px; justify-content: center; width: 46px; }
.stat-icon.blue { background: var(--blue-soft); color: #3677aa; }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber); }

.content-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 18px; padding: 24px; }
.section-heading { align-items: flex-start; display: flex; justify-content: space-between; }
.section-heading h2 { font-size: 16px; letter-spacing: -.015em; margin: 0 0 5px; }
.section-heading p { color: var(--muted); font-size: 11px; margin: 0; }
.legend { align-items: center; color: var(--muted); display: flex; font-size: 10px; gap: 16px; }
.legend span { align-items: center; display: flex; gap: 6px; }
.dot { border-radius: 50%; display: inline-block; height: 7px; width: 7px; }
.dot.complete { background: var(--teal); }
.dot.missing { background: #d49a49; }
.dot.upcoming { background: #b9c5d1; }
.year-tabs { border-bottom: 1px solid var(--line); display: flex; gap: 26px; margin: 22px 0 18px; overflow-x: auto; }
.year-tab { background: none; border: 0; color: #849294; font-size: 12px; font-weight: 750; padding: 0 1px 12px; position: relative; }
.year-tab.active { color: var(--teal); }
.year-tab.active::after { background: var(--teal); bottom: -1px; content: ""; height: 2px; left: 0; position: absolute; right: 0; }
.year-tab small { background: #eef3f2; border-radius: 8px; font-size: 8px; margin-left: 4px; padding: 2px 5px; }
.year-tab.active small { background: var(--teal-soft); }
.month-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); }
.month-card { align-items: center; background: #fbfcfc; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 10px; grid-template-columns: auto minmax(0,1fr) auto; min-height: 72px; padding: 12px; text-align: left; transition: .18s; }
.month-card:hover { border-color: #a8cbc6; box-shadow: 0 6px 16px rgba(31,70,66,.07); transform: translateY(-1px); }
.month-card.complete { background: #f8fcfb; border-color: #c3ded9; }
.month-card.missing { background: #fffaf2; border-color: #ead5b4; }
.month-card.upcoming, .month-card.inactive { background: #f7f9fb; border-color: #e4eaf0; }
.month-card.inactive { opacity: .72; }
.month-number { align-items: center; background: #eef2f1; border-radius: 8px; color: #6e7b7d; display: flex; font-size: 11px; font-weight: 800; height: 36px; justify-content: center; width: 36px; }
.month-card.complete .month-number { background: var(--teal-soft); color: var(--teal); }
.month-card.missing .month-number { background: var(--amber-soft); color: var(--amber); }
.month-card.upcoming .month-number, .month-card.inactive .month-number { background: #eef2f5; color: #95a2b1; }
.month-copy { display: grid; gap: 4px; min-width: 0; }
.month-copy strong { font-size: 11px; }
.month-copy small { color: #96a1a3; font-size: 9px; }
.month-card.complete .month-copy small { color: var(--teal); }
.month-card.missing .month-copy small { color: var(--amber); }
.month-card.upcoming .month-copy small, .month-card.inactive .month-copy small { color: #9aa7b4; }
.month-arrow { color: #a7b1b2; font-size: 15px; }

.compact-overview { padding-bottom: 18px; }
.overview-table-wrap { margin-top: 18px; overflow-x: auto; }
.overview-table { border-collapse: separate; border-spacing: 5px; min-width: 720px; width: 100%; }
.overview-table th { color: #889597; font-size: 8px; font-weight: 800; padding: 2px; text-align: center; text-transform: uppercase; }
.overview-table th:first-child, .overview-table td:first-child { min-width: 50px; text-align: left; }
.overview-table td:first-child { color: var(--ink); font-size: 11px; font-weight: 800; }
.period-cell { background: #edf2f1; border: 0; border-radius: 6px; color: #a9b3b2; font-size: 9px; height: 27px; width: 100%; }
.period-cell.complete { background: var(--teal-soft); color: var(--teal); font-weight: 900; }
.period-cell.missing { background: var(--amber-soft); color: var(--amber); font-weight: 900; }
.period-cell.upcoming, .period-cell.inactive { background: #eef2f6; color: #a6b1bd; }
.period-cell.inactive { opacity: .7; }
.period-cell:hover { outline: 1px solid var(--teal); }

.drawer-backdrop { background: rgba(11,31,29,.38); inset: 0; position: fixed; z-index: 20; }
.drawer { background: white; bottom: 0; box-shadow: -18px 0 60px rgba(10,31,29,.16); max-width: 500px; overflow-y: auto; position: fixed; right: 0; top: 0; transform: translateX(105%); transition: transform .25s ease; width: min(500px, 100%); z-index: 21; }
.drawer.open { transform: translateX(0); }
.drawer-header { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 26px 28px 20px; }
.drawer-header h2 { font-size: 22px; margin: 0; }
.close-button { background: var(--soft); border: 0; border-radius: 50%; color: #657477; font-size: 22px; height: 34px; line-height: 1; width: 34px; }
.drawer-body { padding: 24px 28px 40px; }
.dropzone { align-items: center; background: #f8fbfa; border: 1.5px dashed #a7c9c4; border-radius: 12px; cursor: pointer; display: flex; flex-direction: column; padding: 30px 20px; text-align: center; transition: .2s; }
.dropzone.dragover { background: var(--teal-soft); border-color: var(--teal); }
.upload-icon { align-items: center; background: var(--teal-soft); border-radius: 10px; color: var(--teal); display: flex; font-size: 22px; font-weight: 700; height: 46px; justify-content: center; margin-bottom: 12px; width: 46px; }
.dropzone strong { font-size: 13px; margin-bottom: 5px; }
.dropzone span:not(.upload-icon) { color: var(--muted); font-size: 11px; }
.dropzone u { color: var(--teal); font-weight: 700; }
.dropzone small { color: #99a5a6; font-size: 9px; margin-top: 12px; }
.selected-files { display: grid; gap: 7px; margin-top: 12px; }
.selected-file { align-items: center; background: var(--soft); border-radius: 8px; display: grid; gap: 9px; grid-template-columns: auto minmax(0,1fr) auto; padding: 9px 11px; }
.selected-file > span:first-child { align-items: center; background: white; border-radius: 5px; color: var(--teal); display: flex; font-size: 9px; font-weight: 800; height: 28px; justify-content: center; width: 28px; }
.selected-file-name { display: grid; min-width: 0; }
.selected-file-name strong { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file-name small { color: var(--muted); font-size: 8px; margin-top: 2px; }
.remove-selected { background: none; border: 0; color: #869496; font-size: 15px; }
.file-section-heading { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 8px; margin-top: 28px; padding-top: 22px; }
.file-section-heading h3 { font-size: 13px; margin: 0; }
.count-badge { background: var(--teal-soft); border-radius: 9px; color: var(--teal); font-size: 9px; font-weight: 750; padding: 3px 7px; }
.invoice-list { display: grid; gap: 8px; margin-top: 12px; }
.invoice-row { align-items: center; border: 1px solid var(--line); border-radius: 9px; display: grid; gap: 10px; grid-template-columns: auto minmax(0,1fr) auto; padding: 11px; }
.file-type { align-items: center; background: #edf3f2; border-radius: 7px; color: var(--teal); display: flex; font-size: 8px; font-weight: 850; height: 36px; justify-content: center; width: 36px; }
.file-meta { display: grid; min-width: 0; }
.file-meta a { color: var(--ink); font-size: 10px; font-weight: 750; overflow: hidden; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.file-meta a:hover { color: var(--teal); }
.file-meta small { color: var(--muted); font-size: 8px; margin-top: 4px; }
.delete-file { background: none; border: 0; color: #9aa5a6; font-size: 15px; padding: 7px; }
.delete-file:hover { color: var(--red); }
.empty-list { color: var(--muted); font-size: 11px; padding: 22px 0; text-align: center; }

.toast { background: #183e39; border-radius: 9px; bottom: 24px; color: white; font-size: 12px; left: 50%; opacity: 0; padding: 12px 18px; pointer-events: none; position: fixed; transform: translate(-50%, 20px); transition: .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #8f3434; }

.modal-backdrop { background: rgba(22,39,65,.42); inset: 0; position: fixed; z-index: 30; }
.settings-modal {
  background: white; border-radius: 16px; box-shadow: 0 26px 80px rgba(24,43,73,.22); left: 50%;
  max-width: 500px; overflow: hidden; position: fixed; top: 50%; transform: translate(-50%, -50%); width: calc(100% - 36px); z-index: 31;
}
.settings-header { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 26px 28px 20px; }
.settings-header h2 { font-size: 22px; margin: 0; }
.settings-body { padding: 24px 28px 28px; }
.settings-body > p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0 0 22px; }
.settings-body > label { display: block; font-size: 12px; font-weight: 750; margin-bottom: 8px; }
.settings-body select {
  appearance: none; background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23263957' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 16px center;
  border: 1px solid #cad6e2; border-radius: 10px; color: var(--ink); font-size: 14px; font-weight: 700; height: 50px; outline: none; padding: 0 42px 0 15px; width: 100%;
}
.settings-body select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(38,57,87,.1); }
.settings-note { align-items: flex-start; background: var(--soft); border-radius: 10px; display: flex; gap: 11px; margin-top: 16px; padding: 13px; }
.settings-note > span { align-items: center; background: var(--teal); border-radius: 50%; color: white; display: flex; flex: 0 0 auto; font-family: Georgia, serif; font-size: 11px; font-weight: 700; height: 20px; justify-content: center; width: 20px; }
.settings-note p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 1px 0 0; }
.settings-note strong { color: var(--ink); }

@media (max-width: 1050px) {
  .month-grid { grid-template-columns: repeat(3, 1fr); }
  .login-screen { grid-template-columns: 1fr 1fr; }
  .login-brand-panel { padding: 38px; }
}

@media (max-width: 820px) {
  .login-screen { display: block; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; padding: 28px; }
  .mobile-logo { align-items: center; display: flex; font-size: 10px; font-weight: 800; gap: 10px; letter-spacing: .12em; margin-bottom: 54px; }
  .app-shell { display: block; }
  .sidebar { align-items: center; border-bottom: 1px solid var(--line); border-right: 0; flex-direction: row; height: auto; padding: 14px 20px; position: static; }
  .sidebar .brand, .sidebar .logo-link { margin: 0; }
  .sidebar .logo-link img { height: 40px; width: 44px; }
  .sidebar .logo-link span { display: none; }
  .sidebar nav, .sidebar-note, .user-meta { display: none; }
  .user-card { border: 0; margin-left: auto; padding: 0; }
  .main-content { padding: 30px 22px 50px; }
  .month-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .dashboard-header { gap: 20px; }
  .dashboard-header .primary-button { font-size: 0; min-width: 44px; padding: 0; }
  .dashboard-header .primary-button span { font-size: 18px; }
  .dashboard-header h1 { font-size: 23px; }
  .content-card { padding: 18px; }
  .legend { display: none; }
  .month-grid { grid-template-columns: 1fr; }
  .drawer-body, .drawer-header { padding-left: 20px; padding-right: 20px; }
  .year-tabs { gap: 22px; }
}

/* v3.1 administration, documents and company management */
.nav-link { text-decoration: none; }
.secondary-button {
  align-items: center; background: white; border: 1px solid var(--line); border-radius: 9px; color: var(--teal-dark);
  display: inline-flex; font-size: 11px; font-weight: 750; justify-content: center; min-height: 38px; padding: 0 14px; text-decoration: none;
}
.secondary-button:hover { background: var(--soft); border-color: #aebfce; }
.full-secondary { margin-top: 10px; width: 100%; }
.four-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wide-modal { max-width: 760px; }
.admin-client-modal { max-height: calc(100vh - 40px); max-width: 900px; overflow-y: auto; }
.settings-modal:not([hidden]) { max-height: calc(100vh - 36px); overflow-y: auto; }
.modal-subtitle { color: var(--muted); font-size: 11px; margin: 6px 0 0; }
.company-id-line { background: #edf3f8; border-radius: 7px; color: #3f5872; display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; font-weight: 800; margin: 9px 0 0; padding: 4px 7px; }

.profile-summary { background: var(--soft); border-radius: 12px; display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); margin-bottom: 26px; padding: 16px; }
.profile-summary > div { display: grid; gap: 5px; min-width: 0; }
.profile-summary small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.profile-summary strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-section-heading { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 22px; }
.modal-section-heading h3, .detail-panel h3, .danger-zone h3 { font-size: 13px; margin: 0 0 5px; }
.modal-section-heading p, .detail-panel > p, .danger-zone p { color: var(--muted); font-size: 10px; line-height: 1.55; margin: 0; }
.compact-dropzone { padding: 22px 18px; }
.compact-dropzone .upload-icon { height: 38px; width: 38px; }
.profile-password-button { margin-top: 26px; width: 100%; }

.client-table-wrap { margin-top: 20px; overflow-x: auto; }
.client-table { border-collapse: collapse; min-width: 900px; width: 100%; }
.client-table th { border-bottom: 1px solid var(--line); color: #85939f; font-size: 9px; font-weight: 800; letter-spacing: .06em; padding: 10px 12px; text-align: left; text-transform: uppercase; }
.client-table td { border-bottom: 1px solid #edf1f5; color: var(--ink); font-size: 11px; padding: 14px 12px; vertical-align: middle; }
.company-cell { display: grid; gap: 4px; min-width: 190px; }
.company-cell strong { font-size: 12px; }
.company-cell small { color: var(--muted); font-size: 9px; }
.company-folder-id { align-items: center; background: #edf3f8; border-radius: 6px; color: #3f5872 !important; display: inline-flex; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9px !important; font-weight: 800; justify-self: start; padding: 3px 6px; }
.table-action { background: none; border: 0; color: var(--teal); font-size: 10px; font-weight: 800; padding: 6px; }
.empty-table { color: var(--muted) !important; padding: 28px !important; text-align: center; }
.missing-count-badge { background: #edf2f6; border-radius: 10px; color: #718198; display: inline-flex; font-size: 10px; font-weight: 800; justify-content: center; min-width: 26px; padding: 4px 7px; }
.missing-count-badge.active { background: var(--amber-soft); color: var(--amber); }
.mobile-client-list { display: none; }

.admin-detail-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.detail-panel { border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-top: 16px; }
.field-row label, .admin-form > label, .admin-form .field-row label { color: var(--ink); display: grid; font-size: 11px; font-weight: 750; gap: 7px; }
.admin-form { display: grid; gap: 14px; }
.admin-form .field-row { margin-top: 0; }
.admin-form input, .admin-form select, .detail-panel select, .admin-period-controls select {
  background: white; border: 1px solid #cad6e2; border-radius: 9px; color: var(--ink); font-size: 12px; height: 44px; outline: none; padding: 0 12px; width: 100%;
}
.admin-form input:focus, .admin-form select:focus, .detail-panel select:focus, .admin-period-controls select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(38,57,87,.1); }
.mini-stats { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
.mini-stats > div { background: var(--soft); border-radius: 9px; display: grid; gap: 5px; padding: 13px; text-align: center; }
.mini-stats strong { font-size: 20px; }
.mini-stats small { color: var(--muted); font-size: 8px; }
.security-note { background: #f3f7fa; border-radius: 9px; color: var(--muted); font-size: 10px !important; line-height: 1.55; margin: 14px 0 0 !important; padding: 11px; }
.admin-period-controls { display: grid; gap: 8px; grid-template-columns: 1fr 1fr auto; margin-top: 12px; }

.credentials-box { background: #f4f7fa; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 6px; padding: 16px; }
.credentials-box small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; margin-top: 7px; }
.credentials-box strong { font-size: 13px; }
.credentials-box code { background: white; border: 1px solid var(--line); border-radius: 7px; color: var(--teal-dark); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; overflow-wrap: anywhere; padding: 10px; }

.danger-zone { align-items: center; background: #fff8f8; border: 1px solid #efd0d0; border-radius: 12px; display: flex; gap: 20px; justify-content: space-between; margin-top: 30px; padding: 18px; }
.danger-zone > div { max-width: 620px; }
.danger-zone strong { color: #7f3030; }
.danger-button { background: #a93d3d; border: 0; border-radius: 9px; color: white; flex: 0 0 auto; font-size: 11px; font-weight: 800; min-height: 40px; padding: 0 15px; }
.danger-button:hover { background: #8f3030; }
.danger-button:disabled { cursor: not-allowed; opacity: .5; }
.full-danger { min-height: 46px; width: 100%; }
.danger-eyebrow { color: #a93d3d; }
#deleteClientBackdrop { z-index: 40; }
#deleteClientModal { z-index: 41; }

@media (max-width: 1150px) {
  .four-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .sidebar nav { display: flex; flex: 0 0 auto; gap: 3px; margin-left: auto; }
  .sidebar-note, .user-meta { display: none; }
  .sidebar .nav-item { font-size: 0; padding: 10px; width: auto; }
  .sidebar .nav-icon { font-size: 17px; }
  .user-card { margin-left: 7px; }
  .client-table-wrap { display: none; }
  .mobile-client-list { display: grid; gap: 9px; margin-top: 18px; }
  .mobile-client-card { background: #fbfcfd; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); display: grid; gap: 5px; padding: 14px; text-align: left; }
  .mobile-client-card strong { font-size: 12px; }
  .mobile-client-card span { color: var(--teal); font-size: 9px; font-weight: 700; }
  .mobile-client-card small { color: var(--muted); font-size: 9px; }
  .admin-detail-grid { grid-template-columns: 1fr; }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .danger-button { width: 100%; }
}

@media (max-width: 540px) {
  .profile-summary, .field-row { grid-template-columns: 1fr; }
  .admin-period-controls { grid-template-columns: 1fr 1fr; }
  .admin-period-controls .secondary-button { grid-column: 1 / -1; }
  .mini-stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .settings-modal { width: calc(100% - 20px); }
  .settings-header { padding: 20px 18px 16px; }
  .settings-body { padding: 18px; }
  .admin-heading .secondary-button { display: none; }
  .four-stats { grid-template-columns: 1fr; }
}

.noscript-warning { margin: 0; padding: 18px 22px; background: #fff4e5; color: #7a4a10; border-bottom: 1px solid #f0d9b5; font: 600 15px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif; }

.field-hint { font-weight: 400; color: #8795a4; font-size: 12px; margin-left: 4px; }
.group-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.group-chip { display: inline-block; padding: 1px 8px; border-radius: 10px; background: #eef2f6; color: #45586b; font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.overview-panel { margin-top: 18px; }
.overview-grid { display: flex; flex-direction: column; gap: 10px; }
.overview-year { display: flex; align-items: center; gap: 12px; }
.overview-year-label { width: 48px; font-weight: 700; color: #45586b; font-size: 13px; }
.overview-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; flex: 1; }
.overview-cell { text-align: center; padding: 7px 2px; border-radius: 6px; font-size: 11px; font-weight: 600; color: #fff; user-select: none; }
.overview-cell.submitted { background: #2e9d5b; }
.overview-cell.missing { background: #d1483f; }
.overview-cell.upcoming { background: #cdd6df; color: #6a7987; }
@media (max-width: 620px) {
  .overview-year { flex-direction: column; align-items: flex-start; gap: 4px; }
  .overview-months { width: 100%; grid-template-columns: repeat(6, 1fr); }
}

.staff-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-action.danger { color: var(--red, #d1483f); }
.group-input { width: 100%; min-width: 140px; padding: 6px 9px; border: 1px solid #dde4ea; border-radius: 6px; font-size: 13px; font-family: inherit; }
.group-input:disabled { background: #f4f7f9; color: #8795a4; }
.file-name-static { color: #45586b; font-weight: 600; }

.locale-select { width: 100%; padding: 9px 11px; border: 1px solid #dde4ea; border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; color: #29323b; }
.profile-locale { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.profile-locale label { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #8795a4; }
.profile-locale small { color: #8795a4; font-size: 12px; }

.locale-picker { position: relative; }
.flag { width: 21px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.locale-trigger { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px; border: 1px solid #dde4ea; border-radius: 8px; background: #fff; font: inherit; font-size: 14px; color: #29323b; cursor: pointer; text-align: left; }
.locale-trigger:hover { border-color: #c3cfda; }
.locale-label { flex: 1; }
.locale-caret { color: #8795a4; font-size: 11px; }
.locale-options { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid #dde4ea; border-radius: 8px; box-shadow: 0 12px 28px rgba(20,32,45,.16); padding: 4px; }
.locale-option { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 14px; color: #29323b; cursor: pointer; text-align: left; }
.locale-option:hover, .locale-option:focus { background: #eef2f6; outline: none; }
.locale-option[aria-selected="true"] { font-weight: 600; }
.staff-locale { padding: 0 4px 12px; display: flex; flex-direction: column; gap: 6px; }
.staff-locale label { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #8795a4; }
.staff-locale .locale-options { bottom: calc(100% + 4px); top: auto; }
