:root {
  --navy: #14213d;
  --navy-2: #1c2d50;
  --blue: #2f66d5;
  --blue-soft: #eaf1ff;
  --green: #188664;
  --green-soft: #e7f7f1;
  --amber: #b76b06;
  --amber-soft: #fff4dc;
  --red: #c94d5d;
  --red-soft: #ffedf0;
  --ink: #202b3c;
  --muted: #708097;
  --line: #e4e9f1;
  --surface: #ffffff;
  --background: #f5f7fb;
  --shadow: 0 18px 50px rgba(24, 39, 75, .12);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--background);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--background); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 270px;
  flex-direction: column;
  padding: 28px 20px 22px;
  color: #d9e2f4;
  background: linear-gradient(165deg, var(--navy) 0%, #101a30 100%);
  transition: transform .24s ease;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(145deg, #4d82ea, #2855ae);
  box-shadow: 0 8px 22px rgba(48, 102, 213, .35);
  font-family: Manrope, sans-serif;
  font-size: 22px;
  font-weight: 800;
}
.brand strong, .brand small, .sidebar-footer strong, .sidebar-footer small { display: block; }
.brand strong { color: white; font-family: Manrope, sans-serif; font-size: 19px; }
.brand small { margin-top: 1px; color: #93a4c3; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.main-nav { flex: 1; overflow: auto; }
.nav-label { margin: 25px 12px 8px; color: #70809f; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.main-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 3px 0; padding: 10px 12px; border-radius: 10px; color: #bfcae0; font-size: 14px; font-weight: 500; }
.main-nav a:hover { color: white; background: rgba(255,255,255,.07); }
.main-nav a.active { color: white; background: rgba(65, 117, 224, .25); box-shadow: inset 3px 0 #5b8df0; }
.main-nav a span { width: 20px; color: #92a9d5; font-size: 20px; text-align: center; }
.main-nav a em { margin-left: auto; color: #8190aa; font-size: 9px; font-style: normal; text-transform: uppercase; }
.main-nav a.disabled { cursor: default; opacity: .55; }
.sidebar-footer { display: flex; align-items: center; gap: 11px; padding: 18px 10px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-footer .avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: white; background: #365b9f; font-size: 12px; font-weight: 700; }
.sidebar-footer strong { color: #edf2fc; font-size: 12px; }
.sidebar-footer small { margin-top: 3px; color: #7f91b0; font-size: 10px; }
.sidebar-footer > span:nth-child(2) { min-width: 0; flex: 1; }
.sidebar-footer strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-form { margin-left: auto; }
.logout-form button { width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; color: #aebbd2; background: rgba(255,255,255,.05); cursor: pointer; }
.logout-form button:hover { color: white; background: rgba(255,255,255,.1); }

.content { min-height: 100vh; margin-left: 270px; }
.topbar { display: flex; min-height: 76px; align-items: center; gap: 14px; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(12px); }
.topbar > div:first-of-type { display: grid; }
.topbar small { color: var(--muted); font-size: 11px; }
.topbar strong { font-family: Manrope, sans-serif; font-size: 15px; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.date-chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fafbfe; font-size: 12px; }
.icon-button, .menu-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: white; cursor: pointer; }
.menu-button { display: none; }
.demo-banner { display: flex; align-items: center; gap: 14px; padding: 11px 34px; color: #6f4b00; background: #fff8e7; border-bottom: 1px solid #f2dfaa; font-size: 12px; }
.demo-banner strong { flex: none; }
.page-content { max-width: 1500px; margin: 0 auto; padding: 36px 34px 56px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading h1 { margin: 5px 0 6px; font: 800 clamp(26px, 3vw, 36px)/1.15 Manrope, sans-serif; letter-spacing: -.035em; }
.page-heading p { max-width: 660px; margin: 0; color: var(--muted); font-size: 14px; }
.heading-actions { display: flex; flex: none; gap: 10px; }
.eyebrow { color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 17px; border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; }
.button.primary { color: white; background: var(--blue); box-shadow: 0 8px 20px rgba(47,102,213,.2); }
.button.primary:hover { background: #285abb; }
.button.ghost { color: var(--ink); background: white; border: 1px solid var(--line); }
.button:disabled { cursor: not-allowed; box-shadow: none; opacity: .5; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric-card { position: relative; overflow: hidden; min-height: 145px; padding: 21px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 5px 18px rgba(26,42,75,.04); }
.metric-card::after { content: ""; position: absolute; top: -26px; right: -24px; width: 92px; height: 92px; border-radius: 50%; opacity: .55; }
.metric-card span, .metric-card small { display: block; color: var(--muted); font-size: 12px; }
.metric-card strong { display: block; margin: 13px 0 7px; font: 800 27px Manrope, sans-serif; letter-spacing: -.04em; }
.metric-card.blue { border-top: 3px solid var(--blue); } .metric-card.blue::after { background: var(--blue-soft); }
.metric-card.green { border-top: 3px solid var(--green); } .metric-card.green::after { background: var(--green-soft); }
.metric-card.amber { border-top: 3px solid var(--amber); } .metric-card.amber::after { background: var(--amber-soft); }
.metric-card.red { border-top: 3px solid var(--red); } .metric-card.red::after { background: var(--red-soft); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 20px; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 5px 18px rgba(26,42,75,.04); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-header h2, .modal-header h2 { margin: 5px 0 0; font: 700 20px Manrope, sans-serif; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.step { position: relative; display: flex; gap: 10px; min-width: 0; padding: 14px 10px; border-radius: 11px; background: #f7f9fc; }
.step b { display: grid; width: 28px; height: 28px; flex: none; place-items: center; border-radius: 50%; color: #8490a3; background: #e8edf4; font-size: 11px; }
.step span, .step strong, .step small { display: block; min-width: 0; }
.step strong { font-size: 12px; }
.step small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.step.done b { color: white; background: var(--green); }
.step.current { background: var(--blue-soft); } .step.current b { color: white; background: var(--blue); }
.deadline-list { margin: 0; padding: 0; list-style: none; }
.deadline-list li { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-top: 1px solid var(--line); }
.deadline-list li:first-child { border-top: 0; }
.day { display: grid; width: 46px; height: 48px; flex: none; place-items: center; align-content: center; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font: 800 17px Manrope, sans-serif; }
.day small { display: block; font: 700 8px "DM Sans", sans-serif; letter-spacing: .08em; }
.deadline-list strong, .deadline-list small { display: block; }
.deadline-list strong { font-size: 12px; } .deadline-list div small { margin-top: 4px; color: var(--muted); font-size: 10px; }

.status { display: inline-flex; min-height: 25px; align-items: center; padding: 0 9px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status.success { color: var(--green); background: var(--green-soft); }
.status.warning { color: var(--amber); background: var(--amber-soft); }
.status.danger { color: #9f3040; background: var(--red-soft); }
.table-panel { padding: 0; overflow: hidden; }
.table-panel > .panel-header { padding: 22px 22px 0; }
.table-tools { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.table-tools > span { color: var(--muted); font-size: 11px; }
.search-box { display: flex; width: min(430px, 100%); align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: #91a0b4; background: #f9fafc; }
.search-box input { width: 100%; min-height: 38px; padding: 0; border: 0; outline: 0; background: transparent; }
select, input { min-height: 42px; padding: 0 12px; border: 1px solid #dce2eb; border-radius: 9px; color: var(--ink); background: white; outline: none; }
input:focus, select:focus { border-color: #7ea4f1; box-shadow: 0 0 0 3px rgba(47,102,213,.11); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 12px 15px; color: #8794a7; background: #fafbfc; font-size: 9px; font-weight: 700; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 15px; border-top: 1px solid var(--line); color: #455269; vertical-align: middle; }
td strong { display: block; color: var(--ink); font-size: 12px; }
td small { display: block; margin-top: 4px; color: #9aa5b5; font-size: 9px; }
tbody tr:hover { background: #fbfcfe; }
.table-action { border: 0; color: var(--blue); background: transparent; font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.table-action:disabled { color: #9ea9b9; cursor: not-allowed; }
.toast { margin: -10px 0 20px; padding: 12px 15px; border-radius: 10px; font-size: 12px; }
.toast.success { color: var(--green); background: var(--green-soft); border: 1px solid #c3ecdd; }
.toast.error { color: #9f3040; background: var(--red-soft); border: 1px solid #f4cbd1; }
.empty-state { display: grid; place-items: center; gap: 5px; min-height: 120px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); }
.safety-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; padding: 18px 20px; border: 1px solid #c9dfd6; border-radius: 14px; background: linear-gradient(100deg, #f1fbf7, #fff); }
.safety-card strong { color: #14634d; }
.safety-card p { margin: 5px 0 0; color: #5d776e; font-size: 12px; }
.catalog-filter { margin-bottom: 20px; }
.catalog-filter .filter-form { justify-content: flex-end; }
.catalog-filter .filter-form select { width: min(420px, 70vw); }
.catalog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.catalog-grid table { min-width: 610px; }
.catalog-actions { display: flex; align-items: center; gap: 8px; }
.catalog-actions form { margin: 0; }

.occurrence-panel { margin-bottom: 20px; padding-bottom: 0; overflow: hidden; }
.occurrence-panel > .panel-header { align-items: flex-end; }
.filter-form { display: flex; align-items: flex-end; gap: 10px; }
.filter-form label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.filter-form select { width: min(280px, 30vw); }
.absence-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; margin: 0 -1px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.absence-summary > div { padding: 16px 18px; background: #fafbfe; }
.absence-summary span, .absence-summary small { display: block; color: var(--muted); font-size: 10px; }
.absence-summary strong { display: block; margin: 5px 0 3px; font: 800 23px Manrope, sans-serif; }
.absence-summary .summary-total { background: var(--blue-soft); }
.absence-summary .summary-total strong { color: var(--blue); }
.calculation-note { margin: 0 0 18px; padding: 11px 13px; border-radius: 9px; color: #6f5a20; background: #fff8e7; font-size: 11px; line-height: 1.5; }
.inline-alert { margin-bottom: 18px; padding: 12px 14px; border: 1px solid #f4cbd1; border-radius: 9px; color: #9f3040; background: var(--red-soft); font-size: 11px; }
.occurrence-panel .table-wrap { margin: 0 -22px; }
.payroll-history { margin-top: 20px; }
.workflow-panel { margin-top: 20px; padding-bottom: 0; overflow: hidden; }
.workflow-summary { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 18px; margin-bottom: 18px; }
.workflow-summary span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.workflow-summary strong { display: block; margin-top: 5px; font-size: 12px; }
.workflow-actions { display: flex; justify-self: end; gap: 9px; }
.audit-table { margin: 0 -22px; }
.evolution-panel { margin-bottom: 20px; padding-bottom: 0; overflow: hidden; }
.history-caption { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.preview-form { display: flex; align-items: flex-end; gap: 10px; }
.preview-form label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.preview-form select { min-width: 190px; }
.evolution-panel > .panel-header { flex-wrap: wrap; }
.evolution-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: -5px 0 17px; color: var(--muted); font-size: 10px; }
.evolution-legend span { display: inline-flex; align-items: center; gap: 6px; }
.evolution-legend i { width: 9px; height: 9px; border-radius: 3px; }
.evolution-legend .started { background: #bcebd9; }
.evolution-legend .ended { background: #f7cbd1; }
.evolution-legend .changed { background: #ffe0a5; }
.evolution-legend .zero { background: #edf0f5; }
.evolution-table { margin: 0 -22px; }
.evolution-table table { min-width: 720px; }
.evolution-table th:first-child, .evolution-table td:first-child { position: sticky; left: 0; z-index: 2; width: 245px; min-width: 245px; border-right: 1px solid var(--line); background: white; }
.evolution-table th:first-child { z-index: 3; background: #fafbfc; }
.evolution-table th:not(:first-child), .evolution-table td:not(:first-child) { min-width: 130px; text-align: right; }
.evolution-table th strong, .evolution-table th small { display: block; }
.evolution-table th strong { color: #5a6679; font-size: 10px; }
.evolution-table th small { margin-top: 3px; color: #a0a9b7; font-size: 8px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.evolution-table td.variation { border-left: 3px solid transparent; font-variant-numeric: tabular-nums; }
.evolution-table td.started { border-left-color: #61c49f; background: #f1fbf7; }
.evolution-table td.ended { border-left-color: var(--red); background: #fff5f6; }
.evolution-table td.changed { border-left-color: #e8a735; background: #fff9ed; }
.evolution-table td.zero { color: #a5afbd; background: #fafbfc; }
.evolution-table .rubric-informativa td { border-top-width: 2px; font-weight: 700; }
.evolution-table .rubric-desconto td:not(:first-child) { color: #9f4653; }

.payslip-body { min-height: 100vh; padding: 28px; background: #eef2f7; }
.payslip-toolbar { display: flex; width: min(900px, 100%); justify-content: space-between; gap: 12px; margin: 0 auto 16px; }
.payslip-sheet { width: min(900px, 100%); margin: 0 auto; padding: 38px; border: 1px solid #d9dee8; border-radius: 12px; background: white; box-shadow: 0 12px 40px rgba(26,42,75,.1); }
.payslip-header { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.payslip-header h1 { margin: 5px 0; font: 800 25px Manrope, sans-serif; }
.payslip-header p, .payslip-header small { display: block; margin: 2px 0; color: var(--muted); font-size: 11px; }
.payslip-period { min-width: 170px; text-align: right; }
.payslip-period strong { display: block; margin: 7px 0; font: 800 21px Manrope, sans-serif; }
.payslip-employee { display: grid; grid-template-columns: 1.4fr .6fr 1fr; gap: 15px; margin: 22px 0; padding: 16px; border-radius: 10px; background: #f6f8fb; }
.payslip-employee span, .payslip-bases span, .payslip-totals span { display: block; color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.payslip-employee strong { display: block; margin-top: 5px; font-size: 12px; }
.payslip-table th:nth-child(n+2), .payslip-table td:nth-child(n+2) { text-align: right; }
.payslip-table tbody tr:hover { background: transparent; }
.payslip-bases, .payslip-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.payslip-bases > div, .payslip-totals > div { padding: 13px; background: #fafbfc; }
.payslip-bases strong, .payslip-totals strong { display: block; margin-top: 5px; font-size: 13px; }
.payslip-totals { grid-template-columns: repeat(3, 1fr); }
.payslip-totals .net { color: white; background: var(--blue); }
.payslip-totals .net span { color: #dce8ff; }
.payslip-signature { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-top: 60px; }
.payslip-signature div { padding-top: 8px; border-top: 1px solid #788396; color: var(--muted); font-size: 10px; text-align: center; }
.payslip-note { margin: 22px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; text-align: center; }

@media print {
  @page { size: A4; margin: 12mm; }
  .payslip-body { padding: 0; background: white; }
  .payslip-toolbar { display: none; }
  .payslip-sheet { width: 100%; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
}

.modal-backdrop { position: fixed; inset: 0; z-index: 50; visibility: hidden; background: rgba(12,23,43,.55); opacity: 0; transition: .2s; }
.modal-backdrop.open { visibility: visible; opacity: 1; }
.modal { position: fixed; top: 50%; left: 50%; z-index: 60; display: none; width: min(590px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; padding: 24px; border-radius: 16px; background: white; box-shadow: var(--shadow); transform: translate(-50%, -50%); }
.modal.wide { width: min(740px, calc(100vw - 32px)); }
.modal.open { display: block; animation: modal-in .2s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.modal-header > button { border: 0; color: var(--muted); background: transparent; font-size: 28px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid label { display: grid; gap: 7px; color: #4b586c; font-size: 11px; font-weight: 700; }
.form-grid .full { grid-column: 1 / -1; }
.form-note { margin: 0; padding: 11px 13px; border-radius: 9px; color: #6f5a20; background: #fff8e7; font-size: 11px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }

.login-body { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(circle at 12% 15%, #274879 0, #14213d 34%, #0e172a 100%); }
.login-shell { display: grid; width: min(1060px, 100%); min-height: 610px; grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr); overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 24px; background: white; box-shadow: 0 32px 90px rgba(5,14,31,.42); }
.login-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 52px; color: white; background: linear-gradient(150deg, #1d3561, #101c34); }
.login-brand-panel::after { content: ""; position: absolute; right: -150px; bottom: -170px; width: 420px; height: 420px; border: 1px solid rgba(114,157,240,.23); border-radius: 50%; box-shadow: 0 0 0 55px rgba(65,111,201,.08), 0 0 0 115px rgba(65,111,201,.05); }
.login-brand-panel .brand { position: relative; z-index: 1; padding: 0; }
.login-copy { position: relative; z-index: 1; max-width: 360px; }
.login-copy .eyebrow { color: #8fb2f4; }
.login-copy h1 { margin: 14px 0 16px; font: 800 clamp(32px, 4vw, 48px)/1.08 Manrope, sans-serif; letter-spacing: -.045em; }
.login-copy p { margin: 0; color: #aebbd2; font-size: 14px; line-height: 1.7; }
.login-trust { position: relative; z-index: 1; display: flex; gap: 9px; align-items: center; color: #8fa2c3; font-size: 11px; }
.login-trust::before { content: "✓"; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #8fe0c3; background: rgba(43,153,115,.16); }
.login-card-wrap { display: grid; place-items: center; padding: 52px; background: #fbfcff; }
.login-card { width: min(390px, 100%); }
.login-card .eyebrow { display: block; margin-bottom: 10px; }
.login-card h2 { margin: 0; font: 800 30px Manrope, sans-serif; letter-spacing: -.035em; }
.login-card > p { margin: 9px 0 28px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.login-form { display: grid; gap: 17px; }
.login-form label { display: grid; gap: 7px; color: #4b586c; font-size: 11px; font-weight: 700; }
.login-form input { width: 100%; min-height: 48px; }
.login-form .button { width: 100%; min-height: 48px; margin-top: 3px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 78px; }
.password-toggle { position: absolute; top: 50%; right: 8px; min-height: 32px; padding: 0 8px; transform: translateY(-50%); border: 0; border-radius: 7px; color: var(--blue); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.password-toggle:hover, .password-toggle:focus-visible { background: var(--blue-soft); outline: none; }
.login-link { justify-self: center; color: var(--blue); font-size: 12px; font-weight: 700; text-decoration: none; }
.login-link:hover { text-decoration: underline; }
.login-help { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.55; }

@media (max-width: 1100px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .workflow-summary { grid-template-columns: 1fr; }
  .workflow-actions { justify-self: stretch; }
  .workflow-actions .button, .workflow-actions form { width: 100%; }
  .sidebar { transform: translateX(-100%); box-shadow: 18px 0 50px rgba(5,13,28,.3); }
  .sidebar.open { transform: translateX(0); }
  .content { margin-left: 0; }
  .menu-button { display: grid; }
  .topbar { min-height: 67px; padding: 0 17px; }
  .date-chip { display: none; }
  .demo-banner { display: block; padding: 10px 17px; }
  .demo-banner span { display: block; margin-top: 3px; }
  .page-content { padding: 26px 17px 42px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .page-heading .button { align-self: flex-start; }
  .heading-actions { flex-wrap: wrap; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .table-tools { align-items: stretch; flex-direction: column; }
  .table-tools form, .table-tools select { width: 100%; }
  .safety-card { align-items: flex-start; flex-direction: column; }
  .occurrence-panel > .panel-header, .filter-form { align-items: stretch; flex-direction: column; }
  .filter-form, .filter-form label, .filter-form select { width: 100%; }
  .evolution-panel > .panel-header, .preview-form { align-items: stretch; flex-direction: column; }
  .preview-form, .preview-form label, .preview-form select, .preview-form .button { width: 100%; }
  .absence-summary { grid-template-columns: repeat(2, 1fr); }
  .login-body { padding: 0; background: #fbfcff; }
  .login-shell { min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .login-brand-panel { min-height: 260px; padding: 32px 28px; }
  .login-copy h1 { font-size: 30px; }
  .login-copy p, .login-trust { display: none; }
  .login-card-wrap { padding: 38px 24px 50px; }
}

@media (max-width: 520px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 125px; }
  .steps, .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: 1; }
  .modal { padding: 19px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
  .absence-summary { grid-template-columns: 1fr; }
}
