:root {
  color-scheme: light;
  --ink: #102a43;
  --muted: #6b7c8f;
  --line: #dfe7ee;
  --paper: #ffffff;
  --surface: #f3f7f9;
  --accent: #ee6c4d;
  --accent-dark: #d95335;
  --teal: #2a9d8f;
  --shadow: 0 18px 50px rgba(16, 42, 67, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(42, 157, 143, 0.12), transparent 28rem),
    linear-gradient(180deg, #fbfdfd 0%, var(--surface) 100%);
}

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

.page-shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-meta { display: flex; align-items: center; gap: 14px; }
.today-card {
  min-width: 155px;
  padding: 10px 15px;
  color: white;
  background: var(--ink);
  border-radius: 14px;
}
.today-card span, .today-card strong { display: block; }
.today-card span { opacity: .7; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.today-card strong { margin-top: 3px; font-size: 15px; text-transform: capitalize; }

.app-navigation {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.navigation-tab {
  min-height: 48px;
  padding: 0;
  position: relative;
  flex: 0 0 auto;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 700;
}

.navigation-tab.is-active { color: var(--ink); }
.navigation-tab.is-active::after {
  content: "";
  height: 3px;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--teal);
  border-radius: 3px 3px 0 0;
}
.navigation-tab:disabled { cursor: default; opacity: .56; }

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  width: 158px;
  height: 58px;
  display: block;
  object-fit: contain;
  mix-blend-mode: multiply;
}

main { flex: 1; }

.login-layout {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: clamp(40px, 8vw, 110px);
  padding: 50px 4vw 90px;
}
.password-change-layout { min-height: calc(100vh - 150px); display: grid; place-items: center; padding: 45px 0 80px; }
.password-change-card { width: min(460px, 100%); }
.password-change-card small { color: var(--muted); font-size: 10px; font-weight: 500; }

.intro-panel h1, .workspace-heading h1 {
  margin: 12px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.intro-panel h1 { font-size: clamp(48px, 7vw, 86px); }
.intro-panel > p { max-width: 570px; color: var(--muted); font-size: 18px; line-height: 1.65; }

.eyebrow {
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.intro-badge {
  width: fit-content;
  margin-top: 34px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #3f566b;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(42,157,143,.12); }

.login-card {
  padding: 34px;
  display: grid;
  gap: 22px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(223,231,238,.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.login-card h2 { margin: 8px 0 5px; font-size: 28px; }
.login-card p { margin: 0; color: var(--muted); }

label { display: grid; gap: 8px; color: #40566b; font-size: 13px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid #d7e1e8;
  border-radius: 12px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 76px; padding-top: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(42,157,143,.1); }

.password-field { position: relative; }
.password-field input { padding-right: 90px; }
.password-field button {
  position: absolute;
  right: 8px;
  top: 8px;
  height: 32px;
  color: var(--teal);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 800;
}

.primary-button {
  min-height: 52px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: var(--accent);
  border: 0;
  border-radius: 13px;
  font-weight: 800;
  transition: transform .2s, background .2s;
}
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .65; transform: none; }

.message { padding: 12px 14px; border-radius: 11px; font-size: 13px; line-height: 1.45; }
.message-error { color: #8b2e1a; background: #fff0ec; border: 1px solid #ffd4c8; }
.message-success { color: #267268; background: #edf9f6; border: 1px solid #bce4dd; }
.is-hidden { display: none !important; }

.user-menu { display: flex; align-items: center; gap: 13px; }
.user-copy { text-align: right; }
.user-copy strong, .user-copy small { display: block; }
.user-copy strong { font-size: 14px; }
.user-copy small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.icon-button { width: 40px; height: 40px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 12px; font-size: 19px; }

.workspace { padding: 34px 0 80px; }
.workspace-heading { margin-bottom: 14px; }
.workspace-heading h1 { margin: 7px 0 4px; font-family: inherit; font-size: 25px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.workspace-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.workday-worker-name { color: #40566b; font-size: 13px; font-weight: 800; }

.filters-card {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 360px;
  gap: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 34px rgba(16,42,67,.06);
}
.date-field { display: grid; gap: 8px; color: #40566b; font-size: 13px; font-weight: 700; }
.date-stepper { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 6px; }
.date-stepper input { min-width: 0; text-align: center; }
.date-stepper button { min-height: 48px; padding: 0; color: var(--teal); background: #f4faf9; border: 1px solid #cce5e1; border-radius: 11px; font-size: 18px; font-weight: 900; cursor: pointer; }
.date-stepper button:hover { color: white; background: var(--teal); border-color: var(--teal); }
.date-stepper button:active { transform: translateY(1px); }

.day-entries-section, .catalog-section { margin-top: 24px; }
.section-heading {
  margin-bottom: 11px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.section-heading h1 { margin: 0; font-size: 19px; line-height: 1.3; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.day-total { flex: 0 0 auto; text-align: right; }
.day-total span, .day-total strong { display: block; }
.day-total span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.day-total strong { margin-top: 3px; font-size: 18px; }
.day-summary { display: flex; align-items: center; gap: 18px; }
.deleted-toggle { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; cursor: pointer; }
.deleted-toggle input { width: 16px; height: 16px; accent-color: var(--teal); }

.entries-table-wrap {
  overflow-x: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(16,42,67,.04);
}
.entries-table { width: 100%; min-width: 690px; border-collapse: collapse; }
.entries-table th, .entries-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.entries-table tr:last-child td { border-bottom: 0; }
.entries-table th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.entries-table td { font-size: 13px; }
.entry-work strong, .entry-work span { display: block; }
.entry-work strong { font-size: 13px; line-height: 1.35; }
.entry-work span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.entry-notes-input {
  display: block;
  width: min(100%, 360px);
  min-height: 34px;
  margin-top: 9px;
  padding: 7px 9px;
  resize: vertical;
  color: var(--ink);
  background: rgba(248,251,252,.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  line-height: 1.35;
}
.entry-notes-input:focus { outline: 2px solid rgba(42,157,143,.18); border-color: var(--teal); }
.numeric-column { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.entry-amount { font-weight: 800; }
.quantity-input { width: 76px; min-height: 38px; padding: 0 9px; text-align: center; font-variant-numeric: tabular-nums; }
.quantity-unit { margin-left: 6px; color: var(--muted); font-size: 11px; }
.entry-actions { width: 1%; white-space: nowrap; text-align: right !important; }
.entry-action-button { min-height: 36px; padding: 0 11px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; font-weight: 800; }
.entry-action-button:disabled { cursor: default; opacity: .42; }
.primary-entry-action { color: white; background: var(--teal); border-color: var(--teal); }
.secondary-entry-action { margin-left: 6px; color: var(--muted); }
.danger-entry-action { margin-left: 6px; color: #a63d32; border-color: #efc8c2; }
.restore-entry-action { color: #28766e; border-color: #a7d7d1; }
.draft-entry-row { background: rgba(42,157,143,.07); }
.deleted-entry-row { color: #89949c; background: #f4f6f7; }
.deleted-entry-row .entry-work strong { text-decoration: line-through; }
.deleted-entry-row .entry-amount { color: #89949c; text-decoration: line-through; }
.deleted-entry-note { margin-top: 7px !important; font-style: italic; }
.entries-empty { padding: 24px; color: var(--muted); background: rgba(255,255,255,.66); border: 1px dashed #cbd8df; border-radius: 15px; text-align: center; font-size: 13px; }

.catalog-heading { margin-bottom: 10px; }
.catalog-search-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .45fr) 120px; align-items: end; gap: 12px; }
.search-field { display: block; }
.available-count {
  min-height: 48px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  color: var(--ink);
  background: rgba(42,157,143,.11);
  border-radius: 12px;
}
.available-count strong { font-size: 18px; }
.available-count span { color: var(--muted); font-size: 11px; }

.work-groups { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }

.workforce-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.workforce-heading-actions { display: flex; align-items: center; gap: 10px; }
.workforce-count { min-width: 128px; padding: 0 14px; }
.compact-button { min-height: 48px; width: auto; gap: 14px; white-space: nowrap; }
.workers-toolbar { margin: 20px 0 12px; }
.projects-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 10px; }
.workers-list { display: grid; gap: 9px; }
.worker-card {
  min-height: 82px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(130px, .7fr) minmax(130px, .7fr) minmax(220px, 1fr);
  align-items: center;
  gap: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(16,42,67,.04);
}
.worker-card.is-inactive { opacity: .66; background: #f6f7f8; }
.project-card { grid-template-columns: minmax(240px, 1.2fr) minmax(180px, 1fr) minmax(180px, .8fr) minmax(190px, .8fr); }
.project-avatar { border-radius: 12px; font-size: 10px; letter-spacing: .03em; }
.worker-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.worker-avatar { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; color: white; background: var(--teal); border-radius: 50%; font-size: 12px; font-weight: 900; }
.worker-identity strong, .worker-identity span, .worker-detail strong, .worker-detail span { display: block; }
.worker-identity strong { font-size: 14px; }
.worker-identity div > span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.worker-detail > span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.worker-detail strong { margin-top: 4px; font-size: 12px; }
.worker-statuses { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.status-pill { padding: 6px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-pill.is-active { color: #267268; background: rgba(42,157,143,.12); }
.status-pill.is-off { color: #6f7981; background: #e9edf0; }
.status-pill.is-warning { color: #8a5b19; background: #fff1d6; }
.worker-edit-button { min-height: 29px; margin-left: 2px; }

.worker-dialog {
  width: min(720px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  color: var(--ink);
  background: white;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 26px 90px rgba(16,42,67,.28);
  overflow: auto;
}
.worker-dialog::backdrop { background: rgba(16,42,67,.48); backdrop-filter: blur(3px); }
.worker-form { padding: 26px; display: grid; gap: 20px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.dialog-heading h2 { margin: 6px 0 0; font-size: 23px; }
.worker-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.switch-row { min-height: 34px; display: flex; grid-template-columns: none; align-items: center; gap: 9px; cursor: pointer; }
.switch-row input { width: 17px; min-height: 17px; height: 17px; accent-color: var(--teal); }
.account-fieldset { padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.account-fieldset legend { padding: 0 6px; color: var(--ink); font-size: 13px; font-weight: 800; }
.account-fieldset .worker-form-grid { margin-top: 13px; }
.account-fieldset small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.4; }
.account-active-row { align-self: end; margin-bottom: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.dialog-actions .entry-action-button { min-height: 48px; padding: 0 18px; }

.profile-layout { margin-top: 20px; display: grid; grid-template-columns: .9fr 1.1fr; align-items: start; gap: 15px; }
.profile-card { padding: 22px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 34px rgba(16,42,67,.055); }
.profile-card-heading { margin-bottom: 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.profile-card-heading h2 { margin: 0; font-size: 17px; }
.profile-card-heading span { color: var(--muted); font-size: 11px; }
.profile-details { margin: 0; display: grid; }
.profile-details div { padding: 12px 0; display: grid; grid-template-columns: 140px 1fr; gap: 15px; border-bottom: 1px solid var(--line); }
.profile-details div:last-child { border-bottom: 0; }
.profile-details dt { color: var(--muted); font-size: 11px; }
.profile-details dd { margin: 0; font-size: 13px; font-weight: 750; }
.profile-account-column { display: grid; gap: 15px; }
.profile-form { display: grid; gap: 14px; }
.profile-form .profile-card-heading { margin-bottom: 2px; }
.profile-form small { color: var(--muted); font-size: 10px; font-weight: 500; }
.profile-form .compact-button { justify-content: center; }
.profile-name-fields { margin-bottom: 0; }
.profile-report-panel { margin-top: 20px; }
.monthly-report-toolbar {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(300px, 420px) auto 70px;
  align-items: end;
  gap: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(16,42,67,.04);
}
.report-label { display: block; margin-bottom: 8px; color: #40566b; font-size: 12px; font-weight: 700; }
.month-stepper { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 6px; }
.month-stepper button { min-height: 48px; padding: 0; color: var(--teal); background: #f4faf9; border: 1px solid #cce5e1; border-radius: 11px; font-size: 18px; font-weight: 900; cursor: pointer; }
.month-stepper button:hover { color: white; background: var(--teal); border-color: var(--teal); }
.report-view-switch { min-height: 48px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; background: #edf3f5; border-radius: 12px; }
.report-view-switch button { min-width: 94px; padding: 0 14px; color: var(--muted); background: transparent; border: 0; border-radius: 9px; font-size: 11px; font-weight: 800; cursor: pointer; }
.report-view-switch button.is-active { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(16,42,67,.1); }
.report-pdf-button { min-height: 48px; }
.monthly-report-summary { margin: 14px 0; display: grid; grid-template-columns: 1.4fr .6fr .6fr 1fr; background: white; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.monthly-report-summary > div { padding: 16px 18px; border-right: 1px solid var(--line); }
.monthly-report-summary > div:last-child { border-right: 0; }
.monthly-report-summary span, .monthly-report-summary strong { display: block; }
.monthly-report-summary span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.monthly-report-summary strong { margin-top: 6px; font-size: 15px; }
.monthly-report-summary .report-total { text-align: right; background: rgba(42,157,143,.08); }
.monthly-report-summary .report-total strong { font-size: 18px; }
.monthly-report-list { display: grid; gap: 10px; }
.report-compact-row { min-height: 68px; padding: 13px 16px; display: grid; grid-template-columns: minmax(190px, .8fr) minmax(240px, 1.4fr) 100px 140px; align-items: center; gap: 16px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 7px 22px rgba(16,42,67,.035); }
.report-date { font-size: 13px; text-transform: capitalize; }
.report-projects { color: var(--muted); font-size: 12px; }
.report-entry-count { color: var(--muted); font-size: 11px; text-align: right; }
.report-day-total { font-size: 14px; text-align: right; white-space: nowrap; }
.report-day-card { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 25px rgba(16,42,67,.04); overflow: hidden; }
.report-day-heading { padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(42,157,143,.08); }
.report-day-heading h2 { margin: 0; font-size: 15px; text-transform: capitalize; }
.report-day-heading strong { font-size: 15px; white-space: nowrap; }
.report-project-group + .report-project-group { border-top: 1px solid var(--line); }
.report-project-heading { padding: 11px 18px; display: flex; justify-content: space-between; gap: 16px; color: #40566b; background: #f8fafb; font-size: 12px; }
.report-work-row { padding: 12px 18px; display: grid; grid-template-columns: minmax(260px, 1fr) 110px 150px 130px; align-items: center; gap: 14px; border-top: 1px solid var(--line); font-size: 12px; }
.report-work-copy strong, .report-work-copy span { display: block; }
.report-work-copy strong { font-size: 12px; }
.report-work-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.report-work-copy .report-work-note { color: #52706d; font-style: italic; }
.report-work-quantity, .report-work-rate, .report-work-amount { text-align: right; white-space: nowrap; }
.report-work-rate { color: var(--muted); }
.rates-heading-button { min-height: 48px; padding: 0 15px; }
.section-tabs { margin-top: 20px; display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.section-tab { min-height: 42px; padding: 0 16px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.section-tab.is-active { color: var(--ink); border-bottom-color: var(--teal); }
.rates-toolbar { margin: 20px 0 14px; display: grid; grid-template-columns: minmax(220px, .8fr) minmax(220px, .8fr) minmax(260px, 1.2fr); gap: 12px; }
#rates-view.is-groups-mode .rates-toolbar { grid-template-columns: minmax(220px, 420px); }
.rates-list { display: grid; gap: 9px; }
.group-tree-toolbar { margin-bottom: 14px; display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 12px; }
.rate-groups-tree { display: grid; gap: 7px; }
.rate-group-tree-row { min-height: 62px; padding: 10px 12px 10px calc(12px + var(--tree-depth) * 24px); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 6px 20px rgba(16,42,67,.035); }
.rate-group-tree-copy { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; column-gap: 7px; }
.rate-group-tree-marker { grid-row: 1 / 3; color: var(--teal); font-weight: 900; }
.rate-group-tree-copy strong { font-size: 13px; }
.rate-group-tree-copy small { grid-column: 2; margin-top: 3px; color: var(--muted); font-size: 10px; }
.rate-group-tree-copy .rate-note { margin-top: 5px; }
.rate-group-tree-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.rate-management-card { padding: 15px 17px; display: grid; grid-template-columns: minmax(300px, 1.5fr) minmax(210px, .8fr) minmax(180px, .6fr); align-items: center; gap: 18px; background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 8px 25px rgba(16,42,67,.04); }
.rate-management-copy strong, .rate-management-copy span, .rate-management-prices strong, .rate-management-prices span { display: block; }
.rate-management-copy strong { margin-top: 5px; font-size: 14px; }
.rate-group-label { color: var(--teal); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.rate-translation { margin-top: 4px; color: var(--muted); font-size: 11px; }
.rate-note { margin-top: 6px; color: #697985; font-size: 10px; font-style: italic; }
.rate-specific-note::before { content: "Расценка: "; font-weight: 700; }
.rate-management-prices strong { font-size: 14px; }
.rate-management-prices span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.rate-management-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 7px; }
.rate-dialog { width: min(790px, calc(100% - 28px)); }
.rate-relations-fields { display: grid; gap: 14px; }
.nested-form { padding: 15px; display: grid; gap: 13px; background: #f7fafb; border: 1px solid var(--line); border-radius: 14px; }
.nested-form > strong { font-size: 13px; }
.catalog-work-form { border: 1px solid #8dcfc8; background: linear-gradient(135deg, #f1fbf9 0%, #f8fcfc 100%); box-shadow: inset 4px 0 0 var(--teal); }
.catalog-work-form-heading { display: grid; gap: 6px; }
.catalog-work-form-heading strong { color: var(--ink); font-size: 15px; }
.catalog-work-form-heading p { margin: 0; max-width: 680px; color: #5f7382; font-size: 11px; line-height: 1.5; }
.scope-badge { width: fit-content; padding: 4px 7px; color: #087d73; background: #d9f3ef; border-radius: 6px; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.rate-scope-heading { padding-top: 2px; display: grid; gap: 5px; }
.rate-scope-heading strong { font-size: 14px; }
.rate-scope-heading p { margin: 0; color: var(--muted); font-size: 10px; }
details { color: #40566b; font-size: 12px; }
details summary { width: fit-content; cursor: pointer; color: var(--teal); font-weight: 800; }
details[open] summary { margin-bottom: 9px; }
.form-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.copy-rates-dialog { width: min(820px, calc(100% - 28px)); }
.copy-selection-heading { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.copy-selection-heading > input[type="search"] { min-height: 38px; padding: 8px 12px; font-size: 12px; }
.copy-rates-loading { min-height: 90px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 12px; }
.copy-rates-loading .spinner { width: 22px; height: 22px; }
.copy-rates-selection { max-height: 360px; overflow-y: auto; overflow-x: hidden; display: block; padding-right: 4px; }
.copy-rate-group + .copy-rate-group { margin-top: 8px; }
.copy-rate-group { background: #f8fafb; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.copy-rate-group-heading { min-height: 44px; padding: 9px 12px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 9px; color: var(--ink); background: #f1f6f7; cursor: pointer; }
.copy-rate-group-heading input, .copy-rate-row input { width: 16px; min-height: 16px; height: 16px; accent-color: var(--teal); }
.copy-rate-group-heading strong { font-size: 12px; }
.copy-rate-group-heading span { color: var(--muted); font-size: 10px; }
.copy-rate-row { padding: 9px 12px 9px 38px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 9px; border-top: 1px solid var(--line); cursor: pointer; }
.copy-rate-row strong, .copy-rate-row small { display: block; }
.copy-rate-row strong { color: var(--ink); font-size: 11px; }
.copy-rate-row small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.work-card {
  padding: 17px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(16,42,67,.045);
}
.work-card:hover { border-color: #b8c8d3; }
.work-card h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.35; }
.work-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.work-card-actions { display: flex; align-items: center; gap: 10px; }
.rate-column { min-width: 88px; text-align: right; }
.rate-column strong { display: block; font-size: 17px; }
.rate-column span { color: var(--muted); font-size: 11px; }
.add-work-button { min-height: 38px; padding: 0 12px; color: white; background: var(--accent); border: 0; border-radius: 9px; font-size: 12px; font-weight: 800; }
.add-work-button:disabled { cursor: not-allowed; opacity: .48; }

.state-card { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; }
.state-card p { margin: 0; }
.spinner { width: 30px; height: 30px; border: 3px solid #dce7eb; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

footer { min-height: 64px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
footer a { color: var(--teal); font-weight: 800; text-decoration: none; }

@media (max-width: 800px) {
  .page-shell { padding: 0 16px; }
  .topbar { height: 72px; }
  .today-card { min-width: 136px; padding: 9px 12px; }
  .today-card strong { font-size: 13px; }
  .app-navigation { gap: 20px; }
  .login-layout { min-height: auto; grid-template-columns: 1fr; gap: 34px; padding: 50px 0 70px; }
  .intro-panel h1 { font-size: 52px; }
  .intro-panel > p { font-size: 16px; }
  .login-card { padding: 24px; }
  .workspace { padding-top: 32px; }
  .filters-card { grid-template-columns: minmax(240px, 1fr) 270px; }
  .work-groups { grid-template-columns: 1fr; }
  .worker-card { grid-template-columns: 1fr 1fr; }
  .project-card { grid-template-columns: 1fr 1fr; }
  .worker-identity { grid-column: 1 / -1; }
  .worker-statuses { justify-content: flex-start; grid-column: 1 / -1; }
  .workforce-heading-actions { align-items: stretch; flex-direction: column; }
  .profile-layout { grid-template-columns: 1fr; }
  .monthly-report-toolbar { grid-template-columns: minmax(260px, 1fr) auto 64px; }
  .monthly-report-summary { grid-template-columns: 1fr 1fr; }
  .monthly-report-summary > div { border-bottom: 1px solid var(--line); }
  .report-compact-row { grid-template-columns: minmax(170px, .8fr) minmax(220px, 1.2fr) 120px; }
  .report-entry-count { display: none; }
  .report-work-row { grid-template-columns: minmax(220px, 1fr) 100px 130px; }
  .report-work-rate { display: none; }
  .rates-toolbar { grid-template-columns: 1fr 1fr; }
  .rates-toolbar label:last-child { grid-column: 1 / -1; }
  .rate-management-card { grid-template-columns: 1fr 1fr; }
  .rate-management-copy { grid-column: 1 / -1; }
  .rate-group-tree-row { grid-template-columns: 1fr; }
  .rate-group-tree-actions { justify-content: flex-start; padding-left: 25px; }
}

@media (max-width: 520px) {
  .intro-panel h1 { font-size: 44px; }
  .intro-badge { font-size: 11px; }
  .user-copy { display: none; }
  .topbar-meta { gap: 8px; }
  .today-card { min-width: 0; }
  .today-card span { display: none; }
  .today-card strong { margin: 0; font-size: 12px; }
  .brand-logo { width: 126px; height: 48px; }
  .filters-card { grid-template-columns: 1fr; }
  .projects-toolbar { grid-template-columns: 1fr; }
  .section-heading { align-items: start; }
  .catalog-search-row { grid-template-columns: minmax(0, 1fr) 96px; }
  .catalog-search-row > select { grid-column: 1 / -1; grid-row: 2; }
  .work-card { grid-template-columns: 1fr; }
  .workforce-heading { align-items: start; }
  .workforce-count { min-width: 104px; }
  .worker-card { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr; }
  .worker-identity, .worker-statuses { grid-column: auto; }
  .worker-form { padding: 20px; }
  .worker-form-grid { grid-template-columns: 1fr; }
  .profile-details div { grid-template-columns: 1fr; gap: 4px; }
  .workforce-heading { align-items: start; }
  .workday-worker-name { margin-top: 2px; text-align: right; }
  .monthly-report-toolbar { grid-template-columns: 1fr; }
  .report-view-switch { width: 100%; }
  .report-pdf-button { width: 100%; }
  .monthly-report-summary { grid-template-columns: 1fr 1fr; }
  .monthly-report-summary > div { padding: 13px; }
  .monthly-report-summary .report-total { grid-column: 1 / -1; text-align: left; }
  .report-compact-row { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .report-projects { grid-column: 1 / -1; }
  .report-day-total { grid-column: 2; grid-row: 1; }
  .report-work-row { grid-template-columns: 1fr auto; }
  .report-work-quantity { grid-column: 1; color: var(--muted); text-align: left; }
  .report-work-amount { grid-column: 2; grid-row: 1 / 3; }
  .rates-toolbar { grid-template-columns: 1fr; }
  .rates-toolbar label:last-child { grid-column: auto; }
  .rate-management-card { grid-template-columns: 1fr; }
  .rate-management-copy { grid-column: auto; }
  .rate-management-actions { justify-content: flex-start; }
  .group-tree-toolbar { grid-template-columns: 1fr; }
  .copy-selection-heading { grid-template-columns: 1fr auto; }
  .copy-selection-heading > input[type="search"] { grid-column: 1 / -1; grid-row: 1; }
  .work-card-actions { padding-top: 10px; justify-content: space-between; border-top: 1px solid var(--line); }
  .rate-column { text-align: left; }
}
