/* FolhaLink company layout: measurements/colors transcribed from the reference components. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/brand/inter-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/brand/inter-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --canvas: #f9fafb;
  --surface: #fff;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --radius: 12px;
  --shadow: 0 1px 3px #0000000d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px/20px Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #f9fafb;
  color: #111827;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: #2563eb;
  text-decoration: none;
}
a:hover {
  color: #1e40af;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 256px;
  min-width: 256px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: white;
  border-right: 1px solid #e5e7eb;
}
.brand {
  padding: 24px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand-mark {
  width: 36px;
  height: 36px;
  background: #2563eb;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
}
.brand strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}
.role-label {
  display: inline-block;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 500;
}
.icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.brand-mark .icon {
  width: 20px;
  height: 20px;
}
.sidebar nav {
  flex: 1;
  padding: 16px;
}
.sidebar nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  font-weight: 500;
  color: #4b5563;
}
.sidebar nav a:hover {
  background: #f9fafb;
  color: #111827;
}
.sidebar nav a.active {
  background: #eff6ff;
  color: #1d4ed8;
}
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid #f3f4f6;
}
.sidebar-footer strong {
  display: block;
  font-weight: 500;
}
.sidebar-footer small {
  display: block;
  font-size: 12px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-footer form {
  padding: 0;
  margin: 12px 0 0;
  border: 0;
  box-shadow: none;
}
.sidebar-footer button {
  display: flex;
  gap: 8px;
  background: none;
  border: 0;
  color: #6b7280;
  padding: 0;
}
.sidebar-footer a {
  display: block;
  font-size: 12px;
  margin-top: 12px;
  color: #6b7280;
}
.workspace {
  flex: 1;
  min-width: 0;
  overflow: auto;
}
.content {
  padding: 32px;
  max-width: none;
  margin: 0;
}
.topbar {
  display: none;
}
h1 {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  margin: 0;
  color: #111827;
}
h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
h3 {
  font-size: 14px;
  margin: 0;
}
p {
  margin: 4px 0 0;
}
.muted,
.lead {
  color: #6b7280;
}
.lead {
  font-size: 14px;
  margin-top: 4px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}
.actions,
.toolbar-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.button-link,
.btn {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 16px;
  background: #fff;
  color: #374151;
  font-weight: 500;
  line-height: 20px;
  min-height: 36px;
  white-space: nowrap;
}
.btn:hover,
.button-link:hover {
  background: #f9fafb;
  color: #111827;
}
.btn.primary {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}
.btn.primary:hover {
  background: #1d4ed8;
}
.btn.green {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}
.btn.soft-blue {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.btn.soft-green {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.btn.soft-indigo {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}
.btn.soft-red {
  background: #fff;
  color: #dc2626;
  border-color: #fecaca;
}
.btn.dark {
  background: #111827;
  color: white;
}
.btn.small {
  font-size: 12px;
  padding: 6px 12px;
  min-height: 30px;
}
.btn.link {
  border: 0;
  background: none;
  color: #2563eb;
  padding: 0;
}
.status,
.pill {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: #f3f4f6;
  color: #4b5563;
}
.status.IN_PROGRESS,
.status.PENDING,
.status.PENDENTE {
  background: #fef9c3;
  color: #a16207;
}
.status.VALIDATED_COMPANY,
.status.CONFIRMED,
.status.active {
  background: #dcfce7;
  color: #15803d;
}
.status.AMBIGUOUS,
.status.BLOCKED {
  background: #fee2e2;
  color: #b91c1c;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.chip {
  padding: 6px 12px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #374151;
}
.chip.green {
  background: #f0fdf4;
  color: #15803d;
}
.chip.red {
  background: #fef2f2;
  color: #b91c1c;
}
.chip.blue {
  background: #eff6ff;
  color: #1d4ed8;
}
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: none;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.metric {
  font-size: 24px;
  font-weight: 600;
  margin-top: 8px;
}
.table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: white;
}
th {
  text-align: left;
  background: #f9fafb;
  color: #6b7280;
  font-weight: 500;
  padding: 12px 20px;
  font-size: 12px;
}
td {
  padding: 12px 20px;
  border-top: 1px solid #f3f4f6;
}
tr:hover td {
  background: #f9fafb;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.employee-table {
  min-width: 1100px;
}
.employee-table th {
  text-transform: uppercase;
  font-weight: 600;
}
.employee-table td:nth-child(2) {
  min-width: 300px;
  font-weight: 500;
}
.empty {
  padding: 40px 24px;
  text-align: center;
  color: #9ca3af;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}
.warning,
.gate,
.message {
  padding: 16px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  margin: 16px 0;
}
.gate {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}
.message.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.message.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}
.section {
  margin-top: 24px;
}
.stack {
  display: grid;
  gap: 16px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
form {
  margin: 0;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #4b5563;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  margin-top: 4px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  padding: 8px 12px;
  color: #111827;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px #dbeafe;
}
input:disabled,
select:disabled {
  background: #f9fafb;
}
input[type="checkbox"] {
  width: auto;
}
.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}
.filter-box {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  margin-bottom: 20px;
}
.filter-box label {
  text-transform: uppercase;
  font-weight: 600;
  color: #6b7280;
}
.search-field {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 448px;
}
.search-field input {
  height: 40px;
}
.upload-zone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 144px;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-top: 12px;
}
.upload-zone .icon {
  width: 32px;
  height: 32px;
  color: #9ca3af;
}
.upload-zone input {
  font-size: 12px;
}
.drop-note {
  font-size: 12px;
  color: #9ca3af;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.stats .card {
  padding: 16px;
}
.stats small {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9ca3af;
  font-size: 12px;
}
.tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.tech-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.tech-links a {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.filters {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filters label {
  flex: 1;
  min-width: 140px;
}
.dashboard-panel {
  border: 1px solid #1e293b;
  border-radius: 28px;
  background: linear-gradient(135deg, #020617, #0f172a, #1e293b);
  padding: 28px 24px;
  color: white;
  box-shadow: 0 30px 90px -42px #0f172ad9;
  margin-bottom: 32px;
}
.dashboard-panel-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}
.dashboard-panel .eyebrow {
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 600;
}
.dashboard-panel h2 {
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-top: 12px;
}
.dashboard-panel p {
  font-size: 14px;
  color: #cbd5e1;
  line-height: 24px;
  margin-top: 12px;
}
.dashboard-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.dashboard-group {
  border: 1px solid #ffffff1a;
  background: #ffffff0d;
  border-radius: 24px;
  padding: 20px;
}
.dashboard-group > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.dashboard-stat {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
}
.dashboard-stat strong {
  font-size: 30px;
  line-height: 1;
}
.dashboard-stat span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-top: 12px;
}
.dashboard-stat.blue {
  background: #3b82f626;
  color: #bfdbfe;
}
.dashboard-stat.yellow {
  background: #fde04726;
  color: #fef08a;
}
.dashboard-stat.red {
  background: #fda4af26;
  color: #fecdd3;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.month-card {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid #1e293b;
  background: #020617;
  color: inherit;
  box-shadow: 0 18px 38px -24px #0f172ab3;
  transition: transform 0.15s;
}
.month-card:hover {
  transform: translateY(-2px);
}
.month-card-inner {
  display: grid;
  grid-template-columns: 0.72fr 0.92fr 1fr;
  min-height: 88px;
}
.month-name {
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9, #f4f4f5);
  color: #1e40af;
  padding: 14px;
}
.month-name small {
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 600;
}
.month-name strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  margin-top: 8px;
}
.month-stage {
  padding: 12px 14px;
  border-left: 1px solid #ffffff1a;
}
.month-stage small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
}
.month-stage strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
  margin-top: 6px;
}
.stage-pending {
  background: #f43f5e;
  color: #fff;
}
.stage-progress {
  background: #facc15;
  color: #020617;
}
.stage-complete {
  background: #1e3a8a;
  color: #fff;
}
.month-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.month-section-title h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #64748b;
}
.month-section-title small {
  color: #94a3b8;
}
.period-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.period-card {
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  color: #111827;
}
.period-card:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}
.period-card strong {
  font-size: 18px;
}
.period-card > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.period-card p {
  margin-top: 8px;
  color: #6b7280;
}
.period-card small {
  color: #9ca3af;
}
.grade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.grade-header h1 {
  font-size: 20px;
  line-height: 28px;
}
.grade-meta {
  line-height: 16px;
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
.grade-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.grade-actions .btn {
  font-size: 12px;
  line-height: 16px;
  padding: 6px 12px;
  min-height: 30px;
}
.grade-legend {
  line-height: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  margin-bottom: 12px;
  color: #6b7280;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  padding: 4px 12px;
  color: #1d4ed8;
}
.legend-item.green {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}
.legend-item.red {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #60a5fa;
}
.green .legend-dot {
  background: #34d399;
}
.red .legend-dot {
  background: #f87171;
}
.grade-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  margin-left: auto;
  font-size: 12px;
  color: #6b7280;
}
.grade-filter input {
  width: 240px;
  max-width: 100%;
  margin: 0;
  font-size: 12px;
  padding: 6px 12px;
}
.matrix-container {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  min-width: 0;
}
.scroll-control {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
}
.scroll-control small {
  line-height: 16px;
  display: block;
  color: #9ca3af;
  letter-spacing: 0.12em;
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.scroll-control > div {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 720px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 12px;
}
.scroll-control button {
  min-height: 32px;
  height: 32px;
  width: 32px;
  min-width: 32px;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  background: white;
  border: 1px solid #e5e7eb;
  color: #4b5563;
}
.scroll-control input {
  min-height: 32px;
  margin: 0;
  padding: 0;
  height: 32px;
  accent-color: #3b82f6;
  border: 0;
  background: none;
  box-shadow: none;
}
.payroll-matrix-wrap {
  overflow: auto;
  max-height: 70vh;
  scrollbar-color: #93c5fd #e5e7eb;
  scrollbar-gutter: stable;
}
.payroll-matrix {
  line-height: 16px;
  border-collapse: separate;
  border-spacing: 0;
  min-width: max-content;
  width: max-content;
  font-size: 12px;
}
.payroll-matrix th,
.payroll-matrix td {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  border-right: 1px solid #e5e7eb;
  border-bottom: 0;
  border-top: 0;
  padding: 4px;
  text-align: center;
  background: #fff;
}
.payroll-matrix th {
  position: sticky;
  top: 29px;
  z-index: 20;
  font-size: 10px;
  color: #6b7280;
  font-weight: 500;
  padding: 12px 4px;
  vertical-align: top;
}
.payroll-matrix .group-head {
  top: 0;
  height: 29px;
  padding: 4px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #1d4ed8;
}
.payroll-matrix .sticky-code {
  position: sticky;
  left: 0;
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  z-index: 40;
}
.payroll-matrix .sticky-name {
  position: sticky;
  left: 64px;
  width: 196px;
  min-width: 196px;
  max-width: 196px;
  z-index: 40;
  text-align: left;
  padding: 4px 12px;
  box-shadow: 2px 0 #0000000f;
}
.payroll-matrix thead .sticky-code,
.payroll-matrix thead .sticky-name {
  z-index: 70;
}
.payroll-matrix .import-col {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  color: #1d4ed8;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.payroll-matrix .rubric-code {
  font:
    9px/1 ui-monospace,
    monospace;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
}
.payroll-matrix .rubric-label {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.payroll-matrix input {
  width: 100%;
  height: 28px;
  min-height: 28px;
  margin: 0;
  padding: 2px 3px;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  border: 1px solid transparent;
  background: transparent;
}
.payroll-matrix input:focus {
  background: #fff;
  border-color: #60a5fa;
}
.payroll-matrix td:has(.manual),
input.manual {
  background: #ecfdf5;
  color: #047857;
}
.payroll-matrix td:has(.imported),
input.imported {
  background: #eff6ff;
  color: #1d4ed8;
}
.payroll-matrix td:has(.divergent),
input.divergent {
  background: #fef2f2;
  color: #b91c1c;
}
.payroll-matrix .dirty {
  outline: 1px solid #60a5fa;
}
.grid-footnote {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 8px;
}
.payroll-matrix .employee-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500;color:#1f2937}
.payroll-matrix .import-status{display:block;font-size:10px;color:#d97706;line-height:15px;font-weight:400}
.payroll-matrix tbody .sticky-name{padding-top:6px;padding-bottom:6px}
.payroll-matrix tbody .import-col{background:#eff6ff4d;border-right-color:#dbeafe;font-size:12px;padding:4px 8px;color:#1e3a8a}
.payroll-matrix tbody .no-import{color:#bfdbfe}
.payroll-matrix input::placeholder{color:#d1d5db}
.import-review {
  margin-top: 24px;
}
.import-review .file-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12px;
  color: #6b7280;
}
.import-review summary {
  cursor: pointer;
  padding: 12px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}
.manual-card {
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}
.manual-head {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.8fr 0.8fr;
  gap: 12px;
  background: #f9fafb;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
}
.manual-head small {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  color: #6b7280;
}
.manual-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.manual-fields label {
  display: grid;
  grid-template-columns: minmax(80px, 150px) minmax(50px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 16px;
  border-right: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  text-transform: uppercase;
  font-size: 12px;
}
.manual-fields input {
  height: 32px;
  margin: 0;
  padding: 4px 8px;
  text-transform: none;
}
.voucher-form {
  display: grid;
  grid-template-columns: 90px 140px minmax(180px, 1.2fr) minmax(
      160px,
      1fr
    ) 80px auto;
  gap: 16px;
  align-items: end;
}
.voucher-date {
  max-width: 320px;
  margin-top: 16px;
}
.voucher-tools {
  margin: 16px 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: min(640px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 25px -5px #0000001a;
}
.dialog::backdrop {
  background: #0006;
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid #f3f4f6;
}
.dialog-body {
  padding: 20px 24px;
}
.dialog-close {
  border: 0;
  background: none;
  color: #9ca3af;
  padding: 0;
}
.dialog .choice {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}
.dialog .choice p {
  color: #6b7280;
  margin: 6px 0 12px;
}
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #58a6ea;
  padding: 32px 16px;
}
.login-card {
  width: 540px;
  max-width: 100%;
  border-radius: 28px;
  background: #fff;
  padding: 36px 40px;
  box-shadow: 0 30px 70px #0a387a38;
}
.login-brand {
  text-align: center;
}
.login-logo {
  display: block;
  width: 96px;
  height: auto;
  margin: 0 auto 16px;
}
.login-brand h1 {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #1e293b;
}
.login-brand p {
  line-height: 28px;
  font-size: 20px;
  color: #64748b;
  margin-top: 8px;
}
.login-card form {
  margin: 32px auto 0;
  max-width: 430px;
}
.login-card label {
  line-height: 1.5;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 20px;
}
.login-input {
  position: relative;
  margin-top: 8px;
}
.login-input .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #94a3b8;
}
.login-input input {
  margin: 0;
  border-radius: 16px;
  padding: 14px 16px 14px 48px;
  font-size: 16px;
  background: #eef4ff;
  border-color: #cbd5e1;
}
.login-card .btn {
  border: 0;
  width: 100%;
  border-radius: 16px;
  background: #2e7bd7;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  padding: 14px;
}
.login-foot {
  margin-top: 32px;
  border-top: 1px solid #e2e8f0;
  padding-top: 24px;
  text-align: center;
  font-size: 14px;
  color: #94a3b8;
}
.mobile-menu {
  display: none;
}
@media (max-width: 1279px) {
  .dashboard-panel-layout {
    grid-template-columns: 1fr;
  }
  .month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .period-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .manual-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .voucher-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
  .period-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-counts {
    grid-template-columns: 1fr;
  }
  .page-head {
    flex-wrap: wrap;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    display: none;
    min-height: auto;
    width: 100%;
    min-width: 0;
  }
  .sidebar.open {
    display: flex;
  }
  .sidebar nav {
    flex: none;
  }
  .sidebar-footer {
    display: block;
  }
  .brand {
    padding: 16px;
  }
  .mobile-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 16px;
  }
  .content {
    padding: 24px 16px;
  }
  .month-grid {
    grid-template-columns: 1fr;
  }
  .period-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .manual-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .manual-fields {
    grid-template-columns: 1fr;
  }
  .voucher-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .login-card {
    padding: 32px 24px;
  }
  .login-logo {
    width: 72px;
  }
  .login-brand h1 {
    font-size: 34px;
  }
  .login-brand p {
    font-size: 18px;
  }
  .login-card label {
    font-size: 17px;
  }
  .month-section-title small {
    display: none;
  }
  .grade-actions {
    gap: 6px;
  }
  .dashboard-stat {
    padding: 12px 8px;
  }
  .dashboard-group {
    padding: 16px;
  }
  .dashboard-panel {
    padding: 24px 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
}
.login-input input {
  font-weight: 400;
  line-height: 24px;
}
.login-card .btn {
  line-height: 28px;
}
.login-brand {
  max-width: 430px;
  margin: auto;
}
.login-foot {
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
}
@media print {
  .sidebar,
  .mobile-menu,
  .no-print {
    display: none !important;
  }
  .content {
    padding: 0;
  }
  .voucher-print {
    break-inside: avoid;
    border: 1px solid #222;
    margin: 20px;
    padding: 24px;
  }
  .voucher-print .signature {
    border-top: 1px solid #222;
    margin: 60px 0 10px;
    text-align: center;
  }
}
