:root {
  --navy: #10213f;
  --navy-2: #1b3156;
  --ink: #14213b;
  --muted: #65748d;
  --paper: #ffffff;
  --line: rgba(16, 33, 63, 0.1);
  --brand: #f5cf17;
  --brand-soft: #fff6b8;
  --good: #08745e;
  --good-soft: #ddf7ec;
  --warn: #a65a08;
  --warn-soft: #fff0cf;
  --danger: #b4232e;
  --danger-soft: #fee8e8;
  --shadow: 0 18px 48px rgba(16, 33, 63, 0.11);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { color: var(--ink); font-family: "Avenir Next", "Segoe UI", sans-serif; background: radial-gradient(circle at 86% 4%, rgba(245, 207, 23, 0.2), transparent 20%), radial-gradient(circle at 24% 0%, rgba(58, 93, 168, 0.17), transparent 24%), #eef3f9; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.app-shell-auth { display: block; }
.sidebar { display: flex; position: sticky; top: 0; flex-direction: column; gap: 22px; height: 100vh; padding: 28px 17px 18px; color: #edf3fc; background: linear-gradient(180deg, var(--navy), #0c1629); box-shadow: 12px 0 34px rgba(16, 33, 63, 0.18); }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 16px; }
.brand-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 7px rgba(245, 207, 23, 0.12); }
.brand span:last-child { display: grid; gap: 4px; }
.brand strong { color: #fff; font-family: Georgia, serif; font-size: 1.2rem; letter-spacing: -0.04em; }
.brand small, .sidebar-user span { color: rgba(237, 243, 252, 0.65); font-size: 0.78rem; font-weight: 700; }
.nav { display: grid; gap: 8px; }
.nav a { padding: 13px 14px; border: 1px solid transparent; border-radius: 15px; color: rgba(237, 243, 252, 0.82); font-size: 0.92rem; font-weight: 800; }
.nav .nav-active { border-color: rgba(245, 207, 23, 0.3); background: rgba(245, 207, 23, 0.15); color: #fffbe2; }
.sidebar-user { display: grid; gap: 3px; margin-top: auto; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.07); }
.sidebar-user strong { font-size: 0.88rem; }
.logout-form button { width: 100%; padding: 11px; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 13px; color: #fff; background: transparent; cursor: pointer; font-weight: 800; }
.content { min-width: 0; padding: 34px; }

.hero, .panel { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.9); box-shadow: var(--shadow); }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 34px; border-radius: 30px; background: linear-gradient(112deg, #1d3156 0%, #10213f 66%, #284a90 100%); color: #f8fbff; overflow: hidden; }
.hero.slim { margin-bottom: 20px; }
.hero h1, h2, h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; letter-spacing: -0.035em; }
.hero h1 { margin-top: 4px; font-size: clamp(2.2rem, 3vw, 3.5rem); }
.hero p { max-width: 680px; margin: 12px 0 0; color: rgba(248, 251, 255, 0.74); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.eyebrow { margin: 0; color: #71809a; font-size: 0.69rem; font-weight: 900; letter-spacing: 0.13em; }
.hero .eyebrow { color: rgba(255, 255, 255, 0.62); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 0 16px; border: 1px solid transparent; border-radius: 14px; cursor: pointer; font-weight: 800; transition: transform 160ms ease, box-shadow 160ms ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(16, 33, 63, 0.16); }
.button-primary { background: var(--brand); color: #17223c; }
.button-secondary { border-color: rgba(16, 33, 63, 0.12); background: #fff; color: var(--ink); }
.hero .button-secondary { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.1); color: #fff; }

.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.tab { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.76); color: var(--muted); box-shadow: 0 10px 24px rgba(16, 33, 63, 0.06); font-size: 0.9rem; font-weight: 800; }
.tab strong { display: grid; place-items: center; min-width: 27px; min-height: 27px; padding: 0 7px; border-radius: 999px; background: rgba(16, 33, 63, 0.08); color: var(--ink); font-size: 0.77rem; }
.tab-active { border-color: rgba(245, 207, 23, 0.55); background: linear-gradient(135deg, var(--brand-soft), #fffef8); color: var(--ink); }
.tab-active strong { background: var(--navy); color: #fff; }

.panel { margin-top: 20px; padding: 24px; border-radius: 26px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.section-head h2 { margin-top: 5px; font-size: 1.45rem; }
.chip, .status, .document, .meeting { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--muted); }
.chip-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.week-panel { background: linear-gradient(125deg, rgba(255, 247, 192, 0.75), rgba(255,255,255,0.94) 45%); }
.week-calendar { display: grid; grid-template-columns: repeat(7, minmax(128px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.week-day { display: grid; align-content: start; gap: 12px; min-height: 175px; padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.67); }
.week-day header { display: flex; align-items: baseline; gap: 7px; text-transform: uppercase; }
.week-day header strong { font-family: Georgia, serif; font-size: 1.5rem; }
.week-day header span { color: var(--muted); font-size: 0.7rem; font-weight: 900; letter-spacing: .08em; }
.week-day-today { border-color: rgba(245, 207, 23, 0.75); }
.week-day > div { display: grid; gap: 8px; }
.week-item { display: grid; gap: 3px; padding: 9px; border-radius: 12px; background: #fff; box-shadow: 0 4px 13px rgba(16, 33, 63, 0.08); }
.week-item strong, .week-item span, .week-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-item strong { font-size: 0.77rem; }.week-item span, .week-item small { color: var(--muted); font-size: .7rem; }.week-item-overdue { background: var(--danger-soft); }.week-item-done { background: var(--good-soft); }

.table-scroll { overflow-x: auto; }.table-panel { margin-bottom: 28px; }table { width: 100%; min-width: 940px; border-collapse: collapse; }th { padding: 0 12px 12px; color: var(--muted); text-align: left; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }td { padding: 15px 12px; border-top: 1px solid var(--line); vertical-align: top; font-size: .88rem; }td strong { display: block; }.debtor { min-width: 230px; }.debtor span, .debtor small, .muted, .block { display: block; margin-top: 4px; color: var(--muted); font-size: .79rem; line-height: 1.35; }.comment { min-width: 220px; max-width: 360px; color: var(--muted); line-height: 1.45; }.blog { min-width: 280px; max-width: 410px; }.blog-summary { display: grid; gap: 5px; }.blog-summary time, .blog-summary span { color: var(--muted); font-size: .75rem; font-weight: 700; }.blog-summary p { margin: 0; line-height: 1.42; }.blog-summary details summary { color: #315da7; cursor: pointer; font-size: .78rem; font-weight: 800; }.blog-summary details article { margin-top: 7px; padding: 8px; border-radius: 9px; background: #f4f7fb; }.blog-summary details article p { margin: 4px 0 0; }.text-link { color: #234b8f; font-weight: 800; }.empty { padding: 35px; color: var(--muted); text-align: center; }.danger-text { color: var(--danger); font-weight: 800; }
.status { background: #eef2f6; color: #536278; }.status-submitted, .status-observation { background: #e3edff; color: #1f52a5; }.status-without_movement { background: var(--danger-soft); color: var(--danger); }.status-scheduled, .status-competition { background: var(--warn-soft); color: var(--warn); }.status-realization, .status-restructuring { background: var(--good-soft); color: var(--good); }.document { background: var(--warn-soft); color: var(--warn); }.document-sent, .meeting-good { background: var(--good-soft); color: var(--good); }.meeting-warning { background: var(--warn-soft); color: var(--warn); }.meeting-danger { background: var(--danger-soft); color: var(--danger); }.meeting-neutral { background: #edf1f6; color: var(--muted); }

.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }.compact-panel { margin-top: 0; }.form-card { max-width: 1160px; }.form-grid { display: grid; gap: 16px; }.form-columns { display: grid; gap: 16px; }.form-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }.form-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }label { display: grid; gap: 7px; color: #4f5f79; font-size: .84rem; font-weight: 800; }input, select, textarea { width: 100%; border: 1px solid rgba(16, 33, 63, .15); border-radius: 13px; padding: 12px 13px; color: var(--ink); background: #fff; }textarea { resize: vertical; min-height: 94px; }input:focus, select:focus, textarea:focus { outline: 3px solid rgba(49, 93, 167, .12); border-color: #5a7fbe; }.form-subhead { padding-top: 17px; border-top: 1px solid var(--line); }.form-subhead h3 { margin-top: 3px; font-size: 1.05rem; }.checkbox { display: inline-flex; grid-auto-flow: column; justify-content: start; align-items: center; gap: 10px; min-height: 39px; color: var(--ink); }.checkbox input { width: 18px; height: 18px; padding: 0; }.actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }.deadline-list, .timeline { display: grid; gap: 11px; margin-top: 18px; }.deadline { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: #f8fafc; }.deadline strong, .deadline span { display: block; }.deadline span, .deadline p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }.deadline-done { background: var(--good-soft); }.deadline-done strong { text-decoration: line-through; }.timeline article { padding: 13px 0 13px 15px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--brand); }.timeline time, .timeline span { color: var(--muted); font-size: .77rem; font-weight: 800; }.timeline p { margin: 6px 0; line-height: 1.48; }

.login-stage { display: grid; min-height: 100vh; place-items: center; padding: 26px; }.login-card { width: min(100%, 430px); padding: 34px; border: 1px solid rgba(255,255,255,.15); border-radius: 27px; color: #f8fbff; background: linear-gradient(145deg, #1c3157, #10213f); box-shadow: 0 25px 64px rgba(16, 33, 63, .25); }.login-card h1 { margin: 7px 0; font-size: 3rem; }.login-card > p:not(.eyebrow) { margin: 0 0 23px; color: rgba(255,255,255,.68); line-height: 1.5; }.login-card label { color: rgba(255,255,255,.75); }.flash-stack { display: grid; gap: 9px; margin-bottom: 16px; }.flash { padding: 12px; border-radius: 12px; font-weight: 700; }.flash-error { background: var(--danger-soft); color: var(--danger); }.flash-success { background: var(--good-soft); color: var(--good); }

@media (max-width: 1040px) { .app-shell { grid-template-columns: 1fr; }.sidebar { position: static; height: auto; }.sidebar-user, .logout-form { margin-top: 0; }.tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }.form-columns-3 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .content { padding: 16px; }.hero, .section-head { align-items: flex-start; flex-direction: column; }.hero { padding: 24px; border-radius: 22px; }.hero h1 { font-size: 2.25rem; }.tabs, .two-columns, .form-columns-2 { grid-template-columns: 1fr; }.panel { padding: 18px; border-radius: 20px; }.week-calendar { grid-template-columns: repeat(7, minmax(148px, 1fr)); }.button { width: 100%; }.actions { justify-content: stretch; }.hero-actions { width: 100%; } }

.bulk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px; margin-bottom: 20px; background: #eef3fa; border-radius: 14px; }
.bulk-toolbar select { width: auto; max-width: 100%; }
.bulk-toolbar .muted { flex-basis: 100%; }
.selection-cell { width: 48px; }
.selection-cell input { width: 20px; height: 20px; padding: 0; accent-color: #234b8f; cursor: pointer; }
tr:has(.selection-cell input:checked) { background: #edf4ff; }
button:disabled { opacity: .45; cursor: not-allowed; }
.debtor .text-link { color: #234b8f; }
[hidden] { display: none !important; }
#bulk-confirmation { flex-basis: 100%; padding: 16px; border: 1px solid #adc2df; border-radius: 12px; background: white; }
