:root {
  --ink: #171514;
  --ink-soft: #35322f;
  --muted: #72726a;
  --muted-light: #a7a9a6;
  --canvas: #f5f4ef;
  --surface: #ffffff;
  --surface-soft: #faf9f6;
  --line: #e7e5df;
  --line-strong: #d8d5cc;
  --accent: #e8b04f;
  --accent-dark: #9f6d18;
  --accent-soft: #fff3d7;
  --blue: #5f6de3;
  --blue-soft: #eef0ff;
  --green: #2f8c6b;
  --green-soft: #e9f7f1;
  --amber: #bd7512;
  --amber-soft: #fff2dc;
  --red: #c64a55;
  --red-soft: #fdebed;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow: 0 12px 34px rgba(23, 21, 20, .055);
  --shadow-hover: 0 18px 42px rgba(23, 21, 20, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.45; }
body.menu-open { overflow: hidden; }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(95, 109, 227, .24); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 9px; font-size: clamp(2rem, 3vw, 2.7rem); line-height: 1.08; letter-spacing: -.045em; }
h2 { margin-bottom: 5px; font-size: 1.15rem; line-height: 1.25; letter-spacing: -.018em; }
h3 { font-size: .92rem; }
.muted { color: var(--muted); }
.eyebrow { margin-bottom: 8px; color: var(--accent-dark); font-size: .72rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: 264px; display: flex; flex-direction: column; padding: 28px 18px 20px; border-right: 1px solid var(--line); background: rgba(250, 249, 246, .96); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px; color: var(--ink); }
.brand-mark { display: grid; flex: 0 0 auto; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--ink); color: #fff; box-shadow: 0 8px 18px rgba(23,21,20,.15); font-size: 1.2rem; font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.05rem; letter-spacing: .1em; }
.brand small { margin-top: 1px; color: var(--muted); font-size: .73rem; }
.main-nav { display: grid; gap: 5px; margin-top: 38px; }
.nav-label { margin: 0 13px 7px; color: var(--muted-light); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-label-spaced { margin-top: 24px; }
.main-nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border-radius: 12px; color: #625f59; font-size: .88rem; font-weight: 700; transition: background .18s ease, color .18s ease, transform .18s ease; }
.main-nav a svg { width: 19px; height: 19px; fill: currentColor; color: #96938c; }
.main-nav a:hover { background: #f0eee8; color: var(--ink); transform: translateX(2px); }
.main-nav a.active { background: var(--ink); color: white; box-shadow: 0 9px 22px rgba(23,21,20,.15); }
.main-nav a.active svg { color: var(--accent); }
.sidebar-footer { margin-top: auto; padding: 18px 8px 0; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip > span, .avatar, .topbar-avatar { display: grid; flex: 0 0 auto; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: .82rem; font-weight: 850; }
.user-chip strong, .user-chip small { display: block; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip strong { font-size: .78rem; }
.user-chip small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.link-button { display: inline-flex; align-items: center; gap: 7px; padding: 13px 0 0; border: 0; background: transparent; color: var(--muted); font-size: .73rem; font-weight: 700; }
.link-button:hover { color: var(--red); }
.link-button svg { width: 15px; height: 15px; fill: currentColor; }
.sidebar-backdrop { display: none; }
.main-content { width: calc(100% - 264px); margin-left: 264px; }
.topbar { position: sticky; top: 0; z-index: 35; height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 34px; border-bottom: 1px solid rgba(231,229,223,.88); background: rgba(245,244,239,.86); backdrop-filter: blur(18px); }
.topbar-context { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .76rem; }
.topbar-context strong { color: var(--ink); font-weight: 750; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.quick-search { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.7); color: var(--muted); font-size: .76rem; font-weight: 700; }
.quick-search:hover { border-color: var(--line-strong); background: #fff; color: var(--ink); }
.quick-search svg { width: 16px; height: 16px; fill: currentColor; }
.topbar-avatar { width: 40px; height: 40px; margin-left: 2px; }
.menu-button { display: none; width: 42px; height: 42px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.menu-button span { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--ink); }
.page-content { max-width: 1530px; margin: 0 auto; padding: 38px 34px 70px; }

.page-heading { margin-bottom: 28px; }
.page-heading p:last-child { margin-bottom: 0; color: var(--muted); font-size: .89rem; }
.page-heading-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; }
.heading-line { display: flex; align-items: center; gap: 10px; }
.heading-line .eyebrow { margin: 0; }
.date-chip { min-width: 154px; padding: 11px 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.65); }
.date-chip span, .date-chip strong { display: block; }
.date-chip span { margin-bottom: 2px; color: var(--muted); font-size: .67rem; }
.date-chip strong { font-size: .78rem; }
.button { position: relative; display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid transparent; border-radius: 11px; font-size: .8rem; font-weight: 800; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--ink); color: #fff; box-shadow: 0 8px 18px rgba(23,21,20,.14); }
.button-primary:hover { background: #292624; box-shadow: 0 11px 24px rgba(23,21,20,.18); }
.button-secondary { border-color: var(--line-strong); background: #fff; color: var(--ink); }
.button-secondary:hover { background: var(--surface-soft); }
.button-ghost { background: transparent; color: var(--muted); }
.button-small { min-height: 40px; padding: 0 14px; font-size: .76rem; }
.button-block { width: 100%; }
.button-group { display: flex; gap: 8px; }
.button.is-loading { color: transparent !important; pointer-events: none; }
.button.is-loading::after { position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.42); border-top-color: #fff; border-radius: 50%; content: ""; animation: spin .65s linear infinite; }
.button-secondary.is-loading::after { border-color: rgba(23,21,20,.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 22px; }
.metric-grid.compact .metric-card { min-height: 132px; }
.metric-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.metric-card { position: relative; min-height: 146px; display: flex; align-items: flex-start; gap: 14px; overflow: hidden; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--ink); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.metric-link:hover { border-color: #d7d4cc; box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.metric-card div { min-width: 0; }
.metric-card small, .metric-card span, .metric-card strong { display: block; }
.metric-card small { color: var(--muted); font-size: .73rem; font-weight: 720; }
.metric-card strong { margin: 7px 0 4px; font-size: clamp(1.48rem, 2.3vw, 2rem); letter-spacing: -.045em; white-space: nowrap; }
.metric-card div > span { color: var(--muted); font-size: .68rem; }
.metric-card div > a { display: inline-block; margin-top: 10px; font-size: .72rem; font-weight: 800; }
.metric-icon { display: grid !important; flex: 0 0 auto; width: 40px; height: 40px; place-items: center; border-radius: 12px; }
.metric-icon svg { width: 19px; height: 19px; fill: currentColor; }
.metric-icon.blue { background: var(--blue-soft); color: var(--blue); }
.metric-icon.green { background: var(--green-soft); color: var(--green); }
.metric-icon.amber { background: var(--accent-soft); color: var(--accent-dark); }
.metric-icon.red { background: var(--red-soft); color: var(--red); }
.metric-arrow { position: absolute; right: 18px; top: 18px; color: var(--muted-light); font-size: 1.35rem; font-weight: 400; }
.metric-card.featured { background: linear-gradient(145deg, #282521, #161412); color: #fff; }
.metric-card.featured small, .metric-card.featured div > span { color: #b8b2a8; }
.metric-card.featured .metric-icon { background: rgba(232,176,79,.16); color: var(--accent); }
.metric-ring { position: absolute; right: 18px; bottom: 18px; width: 47px; height: 47px; display: grid !important; place-items: center; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--progress) * 1%), rgba(255,255,255,.12) 0); }
.metric-ring::before { position: absolute; inset: 5px; border-radius: inherit; background: #1b1917; content: ""; }
.metric-ring i { position: relative; z-index: 1; color: #fff; font-size: .58rem; font-style: normal; font-weight: 800; }

.content-grid { display: grid; gap: 20px; margin-bottom: 20px; }
.content-grid.two-one { grid-template-columns: minmax(0, 2fr) minmax(310px, 1fr); }
.panel { margin-bottom: 20px; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-priority { border-top: 3px solid var(--accent); }
.panel-heading { min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: .76rem; }
.panel-heading > a { flex: 0 0 auto; color: var(--ink); font-size: .75rem; font-weight: 800; }
.panel-heading > a:hover, .row-action:hover { color: var(--accent-dark); }
.table-wrap { overflow-x: auto; margin: 0 -23px -23px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 18px; background: #faf9f6; color: #8b8982; font-size: .66rem; text-align: left; text-transform: uppercase; letter-spacing: .075em; white-space: nowrap; }
td { padding: 15px 18px; border-top: 1px solid #efede8; color: #45423e; font-size: .79rem; vertical-align: middle; }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #fcfbf8; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-link { color: var(--ink); font-weight: 800; }
.table-subtext { display: block; margin-top: 3px; color: var(--muted); font-size: .67rem; }
.row-action { color: var(--ink); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.amount-due { color: var(--red); font-weight: 850; }
.amount-ok { color: var(--green); font-weight: 800; }
.empty-state { padding: 34px !important; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); }
tr[hidden] { display: none !important; }
.data-table-toolbar { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 13px; }
.data-table-search { min-width: 230px; max-width: 360px; display: flex; flex: 1 1 260px; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
.data-table-search svg { flex: 0 0 auto; width: 16px; height: 16px; fill: var(--muted); }
.data-table-search input { min-width: 0; padding-inline: 0; border: 0; box-shadow: none !important; }
.data-table-select { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .68rem; white-space: nowrap; }
.data-table-select select { min-width: 138px; }
.data-table-size { margin-left: auto; }
.data-table-size select { min-width: 74px; }
.data-table-wrap { margin-bottom: 0; }
.data-table-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 49px; margin: 0 -23px -23px; padding: 10px 18px; border-top: 1px solid var(--line); background: #fcfbf8; color: var(--muted); font-size: .69rem; }
.split-tables .data-table-footer { margin: 10px 0 0; border: 1px solid var(--line); border-radius: 10px; }
.pagination { display: flex; align-items: center; gap: 4px; }
.pagination button { min-width: 31px; height: 31px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 800; }
.pagination button:hover:not(:disabled) { border-color: var(--line-strong); background: #fff; color: var(--ink); }
.pagination button.active { background: var(--ink); color: #fff; }
.pagination button:disabled { cursor: default; opacity: .35; }
.progress-list { display: grid; gap: 19px; }
.progress-list a { display: grid; grid-template-columns: minmax(0,1fr) 88px 35px; align-items: center; gap: 10px; color: var(--ink); }
.progress-list strong, .progress-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-list strong { font-size: .75rem; }
.progress-list small { margin-top: 3px; color: var(--muted); font-size: .66rem; }
.progress-list b { color: var(--muted); font-size: .69rem; text-align: right; }
.progress { height: 7px; overflow: hidden; border-radius: 99px; background: #eceae4; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #f2ca82); }
.progress.large { height: 8px; margin: 18px 0; }

.alert { margin-bottom: 18px; padding: 14px 16px; border-radius: 12px; font-size: .78rem; }
.alert ul { margin-bottom: 0; }
.alert-success { border: 1px solid #bfe4d4; background: var(--green-soft); color: #256e56; }
.alert-error { border: 1px solid #f2c2c7; background: var(--red-soft); color: #9a3540; }
.swal2-container { font-family: inherit !important; backdrop-filter: blur(5px); }
.swal2-popup.atyc-swal { width: min(440px, calc(100vw - 32px)) !important; padding: 28px !important; border: 1px solid var(--line) !important; border-radius: 22px !important; background: #fff !important; box-shadow: 0 28px 80px rgba(23,21,20,.22) !important; }
.atyc-swal-title { padding: 0 !important; color: var(--ink) !important; font-size: 1.45rem !important; line-height: 1.15 !important; letter-spacing: -.03em !important; }
.atyc-swal-copy { margin: 10px 0 0 !important; padding: 0 !important; color: var(--muted) !important; font-size: .86rem !important; line-height: 1.55 !important; }
.atyc-swal-icon { margin: 0 auto 18px !important; transform: scale(.85); }
.atyc-swal-actions { width: 100% !important; gap: 9px !important; margin: 25px 0 0 !important; }
.swal-button { min-height: 43px; flex: 1 1 0; padding: 0 17px; border: 1px solid transparent; border-radius: 11px; font-size: .78rem; font-weight: 850; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.swal-button:hover { transform: translateY(-1px); }
.swal-button-confirm { background: var(--ink); color: #fff; box-shadow: 0 8px 18px rgba(23,21,20,.15); }
.swal-button-confirm:hover { background: #292624; }
.swal-button-cancel { border-color: var(--line-strong); background: #fff; color: var(--ink); }
.swal-button-cancel:hover { background: var(--surface-soft); }
.swal2-popup.atyc-toast { width: min(390px, calc(100vw - 28px)) !important; padding: 15px 44px 15px 16px !important; border: 1px solid var(--line) !important; border-left: 4px solid var(--green) !important; border-radius: 15px !important; background: #fff !important; box-shadow: 0 18px 48px rgba(23,21,20,.16) !important; }
.swal2-popup.atyc-toast-error { border-left-color: var(--red) !important; }
.swal2-popup.atyc-toast-warning { border-left-color: var(--amber) !important; }
.atyc-toast .swal2-icon { width: 1.65em !important; min-width: 1.65em !important; height: 1.65em !important; margin: 0 11px 0 0 !important; font-size: .68rem !important; }
.atyc-toast-title { margin: 0 !important; padding: 0 !important; color: var(--ink) !important; font-size: .82rem !important; font-weight: 850 !important; text-align: left !important; }
.atyc-toast-copy { margin: 3px 0 0 !important; padding: 0 !important; color: var(--muted) !important; font-size: .72rem !important; line-height: 1.4 !important; text-align: left !important; }
.atyc-toast-progress { background: var(--green) !important; }
.atyc-toast-error .atyc-toast-progress { background: var(--red) !important; }
.atyc-toast-close { top: 7px !important; right: 8px !important; color: var(--muted) !important; font-size: 1.35rem !important; }
.badge { display: inline-flex; min-height: 25px; align-items: center; gap: 5px; padding: 0 9px; border-radius: 99px; font-size: .66rem; font-weight: 850; white-space: nowrap; }
.badge::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; opacity: .75; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-gray { background: #efefec; color: #75756f; }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }

.filter-bar { display: flex; gap: 10px; margin-bottom: 18px; }
.filter-bar select { min-width: 190px; }
.search-field { min-width: 300px; display: flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; }
.search-field svg { width: 17px; height: 17px; fill: var(--muted); }
.search-field input { min-width: 0; flex: 1; padding-inline: 0; border: 0; box-shadow: none !important; outline: 0; }
label { display: grid; gap: 7px; color: #514e49; font-size: .76rem; font-weight: 750; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); outline: 0; transition: border-color .15s ease, box-shadow .15s ease; }
select { padding-right: 36px; appearance: none; background-image: linear-gradient(45deg,transparent 50%,#777 50%),linear-gradient(135deg,#777 50%,transparent 50%); background-position: calc(100% - 17px) 50%,calc(100% - 12px) 50%; background-size: 5px 5px,5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #8f96e9; box-shadow: 0 0 0 3px rgba(95,109,227,.1); }
label small { color: var(--muted); font-size: .67rem; font-weight: 500; }
.form-panel { max-width: 1160px; }
.form-section + .form-section { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.form-section h2 { margin-bottom: 17px; }
.form-section-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.form-section-heading span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-dark); font-size: .72rem; font-weight: 900; }
.form-section-heading h2 { margin: 0; }
.form-grid { display: grid; gap: 16px; }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.span-2 { grid-column: span 2; }
.check-label { display: flex; align-items: center; gap: 9px; align-self: end; min-height: 42px; }
.check-label input { width: 17px; min-height: 17px; accent-color: var(--ink); }
.form-actions { position: sticky; bottom: 14px; z-index: 12; display: flex; justify-content: flex-end; gap: 8px; margin-top: 26px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.92); box-shadow: 0 12px 32px rgba(23,21,20,.09); backdrop-filter: blur(14px); }

.section-nav { position: sticky; top: 90px; z-index: 25; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: -8px 0 22px; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.section-nav a, .section-nav button { min-height: 38px; padding: 9px 13px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.section-nav a:hover, .section-nav button:hover { background: var(--accent-soft); color: var(--accent-dark); }
.section-nav button.active { background: var(--ink); color: #fff; box-shadow: 0 6px 16px rgba(23,21,20,.12); }
.client-tab-panel[hidden] { display: none !important; }
.client-tab-panel.is-entering { animation: client-panel-in .2s ease both; }
@keyframes client-panel-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.anchor-section { scroll-margin-top: 160px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 26px; margin: 0; }
.detail-grid dt { color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.detail-grid dd { margin: 5px 0 0; font-size: .82rem; font-weight: 700; }
.note-panel { background: linear-gradient(145deg,#fffdf8,#fff); }
.note-panel p { color: #55514b; font-size: .8rem; line-height: 1.65; }
.note-panel hr { margin: 19px 0; border: 0; border-top: 1px solid var(--line); }
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }
.popover { position: relative; }
.popover > form { position: absolute; top: 48px; right: 0; z-index: 40; width: min(440px, 88vw); padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 22px 60px rgba(23,21,20,.18); }
.popover > form label + label, .popover > form .form-grid, .popover > form label + .form-grid, .popover > form .form-grid + label { margin-top: 12px; }
.popover > form h3 { margin-bottom: 15px; font-size: 1rem; }
.popover > form .button { margin-top: 15px; }
.split-tables { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 20px; }
.split-tables h3 { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; }
.split-tables .table-wrap { margin: 0; border: 1px solid var(--line); border-radius: 12px; }
.table-scroll { max-height: 430px; overflow: auto; }
.inline-forms { display: grid; grid-template-columns: .75fr 1.25fr; gap: 18px; margin-bottom: 20px; }
.inline-forms form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; align-items: end; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.inline-forms form h3 { grid-column: 1/-1; margin: 0 0 4px; }
.period-picker { display: flex; gap: 7px; align-items: center; }
.period-picker select { min-width: 130px; }
.period-picker input { width: 90px; }
.checklist-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 13px; }
.checklist-summary > div { padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.checklist-summary span, .checklist-summary strong { display: block; }
.checklist-summary span { color: var(--muted); font-size: .66rem; }
.checklist-summary strong { margin-top: 2px; font-size: 1.1rem; }
.checklist-summary .summary-completed { border-color: #cce7db; background: var(--green-soft); }
.checklist-summary .summary-completed strong { color: var(--green); }
.checklist-summary .summary-pending { border-color: #f1d8a9; background: var(--amber-soft); }
.checklist-summary .summary-pending strong { color: var(--amber); }
.checklist-filters { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 15px; }
.checklist-filters .search-field { flex: 1 1 300px; }
.checklist-filters > label:not(.search-field) { min-width: 180px; }
.checklist-visible-count { margin-left: auto; padding-bottom: 11px; color: var(--muted); font-size: .68rem; white-space: nowrap; }
.checklist-board { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; align-items: start; }
.checklist-group { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.checklist-group[hidden], .checklist-row[hidden] { display: none !important; }
.checklist-group header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: #292622; color: #fff; }
.checklist-group header h3 { margin: 0; font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; }
.checklist-group header span { color: #bbb5ad; font-size: .62rem; }
.checklist-items { display: grid; }
.checklist-row { display: grid; grid-template-columns: minmax(0,1fr) 112px; align-items: center; gap: 9px; min-height: 62px; padding: 9px 11px; border-top: 1px solid #eeece7; }
.checklist-row:first-child { border-top: 0; }
.checklist-row:hover { background: #fcfbf8; }
.checklist-row strong { display: block; font-size: .69rem; line-height: 1.25; }
.checklist-row input { min-height: 25px; margin-top: 3px; padding: 2px 0; border-color: transparent; border-radius: 5px; background: transparent; color: var(--muted); font-size: .62rem; }
.checklist-row input:hover, .checklist-row input:focus { padding-inline: 6px; border-color: var(--line-strong); background: #fff; }
.status-select { min-height: 34px; font-size: .69rem; font-weight: 800; }
.status-completed { border-color: #bde4d5; background-color: var(--green-soft); color: var(--green); }
.status-not_applicable { background-color: #efefec; color: var(--muted); }
.status-pending { border-color: #efd5a5; background-color: var(--amber-soft); color: var(--amber); }
.card-grid { display: grid; gap: 15px; }
.access-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.access-card { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.access-card > div:first-child { display: flex; align-items: center; gap: 10px; }
.access-card strong, .access-card small { display: block; }
.access-card small { margin-top: 2px; color: var(--muted); font-size: .67rem; }
.platform-icon { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: .68rem; font-weight: 900; }
.access-card dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; margin: 16px 0; font-size: .68rem; }
.access-card dt { color: var(--muted); }
.access-card dd { margin: 0; text-align: right; }
.secret-reveal { padding-top: 11px; border-top: 1px solid var(--line); }
.secret-reveal summary { color: var(--blue); font-size: .68rem; font-weight: 850; }
.secret-reveal code { display: block; margin-top: 8px; padding: 8px; border-radius: 7px; background: #f0efeb; font-size: .7rem; word-break: break-all; }
.inline-entry { display: flex; gap: 10px; align-items: end; margin-bottom: 20px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.inline-entry .grow { flex: 1; }
.timeline { position: relative; margin-top: 8px; }
.timeline article { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.timeline article:first-child { border-top: 0; }
.timeline time { color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.timeline p { margin: 8px 0 0; color: #514e49; font-size: .79rem; line-height: 1.55; }

.table-search input { min-width: 220px; }
.compliance-cards { grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 20px; }
.client-progress-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.client-progress-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card-top { display: flex; justify-content: space-between; gap: 12px; }
.card-top > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-top strong, .card-top small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-top strong { font-size: .8rem; }
.card-top small { margin-top: 3px; color: var(--muted); font-size: .67rem; }
.card-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-bottom: 16px; }
.card-stats span { color: var(--muted); font-size: .62rem; text-align: center; }
.card-stats b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 1rem; }
.compact-table { max-height: 480px; overflow-y: auto; }
.summary-strip { display: flex; align-items: center; gap: 22px; margin-bottom: 18px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.72); }
.summary-strip div { display: grid; gap: 2px; }
.summary-strip span { color: var(--muted); font-size: .67rem; }
.summary-strip strong { font-size: .86rem; }
.summary-strip i { width: 1px; height: 28px; background: var(--line); }
.catalog-nav { display: flex; gap: 8px; margin: -8px 0 22px; }
.catalog-nav a { padding: 10px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--muted); font-size: .73rem; font-weight: 800; }
.catalog-nav a:hover { border-color: var(--accent); color: var(--ink); }
.client-identity { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.client-identity .avatar { width: 34px; height: 34px; }

.login-page { background: #f3f1eb; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px,1fr) minmax(500px,.92fr); }
.login-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 50px 6vw 42px; background: #1a1816; color: #fff; }
.login-brand-panel::before { position: absolute; width: 520px; height: 520px; right: -190px; bottom: -210px; border-radius: 50%; background: radial-gradient(circle at 35% 30%,#f7d99d,var(--accent) 34%,#d9899c 63%,transparent 64%); opacity: .9; content: ""; }
.login-brand-panel::after { position: absolute; width: 260px; height: 260px; left: -100px; top: 30%; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; content: ""; }
.brand-light { position: relative; z-index: 1; padding: 0; color: #fff; }
.brand-light .brand-mark { background: var(--accent); color: var(--ink); }
.brand-light small { color: #aaa49b; }
.login-copy { position: relative; z-index: 1; max-width: 620px; }
.login-brand-panel h1 { max-width: 610px; margin-bottom: 20px; font-size: clamp(2.5rem,4.6vw,4.25rem); line-height: 1.01; letter-spacing: -.06em; }
.login-brand-panel p:not(.eyebrow,.login-note) { max-width: 500px; color: #bbb5ad; font-size: 1rem; line-height: 1.7; }
.login-brand-panel .eyebrow { color: var(--accent); }
.login-note { position: relative; z-index: 1; margin: 0; color: #888279; font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; }
.login-form-panel { display: grid; place-items: center; padding: 44px; }
.login-card { width: min(440px,100%); padding: 38px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 28px 80px rgba(23,21,20,.1); }
.login-card h2 { margin-bottom: 8px; font-size: 2rem; }
.login-card > label { margin-top: 19px; }
.login-card .button { margin-top: 24px; min-height: 48px; }
.password-field { position: relative; }
.password-field input { padding-right: 78px; }
.password-field button { position: absolute; right: 8px; top: 7px; min-height: 29px; border: 0; background: transparent; color: var(--blue); font-size: .68rem; font-weight: 850; }
.form-hint { margin: 18px 0 0; color: var(--muted); font-size: .68rem; text-align: center; }
.login-security { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .67rem; }
.login-security svg { width: 15px; height: 15px; fill: var(--green); }
.mobile-logo { display: none; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .content-grid.two-one, .split-tables { grid-template-columns: 1fr; }
  .compliance-cards, .access-grid { grid-template-columns: repeat(2,1fr); }
  .checklist-board { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 24px 0 60px rgba(23,21,20,.18); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 45; display: block; visibility: hidden; border: 0; background: rgba(23,21,20,.32); opacity: 0; transition: .2s ease; }
  .sidebar-backdrop.visible { visibility: visible; opacity: 1; }
  .main-content { width: 100%; margin-left: 0; }
  .topbar { height: 70px; padding: 0 20px; }
  .menu-button { display: block; }
  .topbar-context { display: none; }
  .page-content { padding: 30px 20px 56px; }
  .section-nav { top: 82px; }
  .form-grid.cols-3 { grid-template-columns: repeat(2,1fr); }
  .inline-forms { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .mobile-logo { display: flex; align-items: center; gap: 9px; margin-bottom: 28px; font-weight: 900; }
  .checklist-board { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  h1 { font-size: 2rem; }
  .quick-search, .topbar-avatar { display: none; }
  .topbar-actions .button { white-space: nowrap; }
  .metric-grid, .metric-grid.three, .compliance-cards, .access-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 132px; }
  .page-heading-actions { align-items: stretch; flex-direction: column; }
  .page-heading-actions > .button-primary { display: none; }
  .date-chip { width: fit-content; }
  .filter-bar, .inline-entry, .period-picker { align-items: stretch; flex-direction: column; }
  .search-field, .filter-bar select, .period-picker select, .period-picker input { width: 100%; min-width: 0; }
  .form-grid.cols-2, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .panel { padding: 18px; border-radius: 16px; }
  .table-wrap { margin-left: -18px; margin-right: -18px; }
  .panel-heading { flex-direction: column; }
  .button-group { width: 100%; }
  .button-group > * { flex: 1; }
  .checklist-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .checklist-filters { align-items: stretch; flex-direction: column; }
  .checklist-filters .search-field, .checklist-filters > label:not(.search-field) { width: 100%; min-width: 0; }
  .checklist-filters .search-field { flex: none; }
  .checklist-visible-count { margin-left: 0; padding: 0; }
  .checklist-row { grid-template-columns: minmax(0,1fr) 112px; }
  .data-table-toolbar { align-items: stretch; flex-wrap: wrap; }
  .data-table-search { width: 100%; max-width: none; flex-basis: 100%; }
  .data-table-select { flex: 1 1 140px; align-items: stretch; flex-direction: column; gap: 4px; }
  .data-table-select select { width: 100%; min-width: 0; }
  .data-table-size { margin-left: 0; }
  .data-table-footer { align-items: flex-start; flex-direction: column; margin-inline: -18px; }
  .inline-forms form { grid-template-columns: 1fr; }
  .timeline article { grid-template-columns: 1fr; gap: 5px; }
  .detail-grid { grid-template-columns: 1fr; }
  .summary-strip { align-items: flex-start; flex-direction: column; gap: 10px; }
  .summary-strip i { width: 100%; height: 1px; }
  .catalog-nav { overflow-x: auto; }
  .login-form-panel { padding: 20px; }
  .login-card { padding: 28px; }
  .form-actions { bottom: 8px; }
  .section-nav { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-card-table thead { display: none; }
  .mobile-card-table, .mobile-card-table tbody, .mobile-card-table tr, .mobile-card-table td { display: block; width: 100%; }
  .mobile-card-table tbody { padding: 10px 14px 16px; }
  .mobile-card-table tr { margin-bottom: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
  .mobile-card-table td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; border: 0; text-align: right; white-space: normal; }
  .mobile-card-table td::before { flex: 0 0 auto; color: var(--muted); content: attr(data-label); font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
  .mobile-card-table td[data-label="Cliente"] { align-items: flex-start; justify-content: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--line); text-align: left; }
  .mobile-card-table td[data-label="Cliente"]::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
