:root {
  --navy-950: #04172a;
  --navy-900: #071e35;
  --navy-800: #102c48;
  --navy-700: #1b3b59;
  --gold: #d7b36a;
  --gold-light: #ead7aa;
  --paper: #f4f5f6;
  --white: #ffffff;
  --ink: #142436;
  --muted: #6d7a88;
  --line: #e2e6e9;
  --green: #23846c;
  --green-soft: #e6f4ef;
  --red: #bb4a4a;
  --red-soft: #faeaea;
  --yellow: #b7791f;
  --yellow-soft: #fff4da;
  --blue-soft: #e8f0f8;
  --shadow: 0 16px 40px rgba(7, 30, 53, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.hidden { display: none !important; }

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 15% 15%, rgba(54, 126, 151, 0.28), transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(215, 179, 106, 0.12), transparent 30%),
    linear-gradient(145deg, var(--navy-800), var(--navy-950) 72%);
}
.auth-card { width: min(470px, 100%); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 24px; background: var(--white); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35); }
.auth-brand { display: flex; align-items: center; gap: 14px; padding: 22px 26px; color: var(--white); background: linear-gradient(130deg, var(--navy-800), var(--navy-950)); }
.auth-brand img { width: 52px; height: 52px; border-radius: 13px; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand strong { font-size: 14px; letter-spacing: 0.09em; }
.auth-brand span { margin-top: 5px; color: #c7d0d9; font-size: 10px; letter-spacing: 0.2em; }
.auth-content { padding: 29px 30px 22px; }
.auth-content h1 { margin: 0; color: var(--navy-900); font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 500; }
.auth-content > p { margin: 10px 0 23px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-form { display: grid; gap: 15px; }
.auth-form.compact { margin-top: 18px; }
.auth-form label { display: grid; gap: 7px; color: #52606c; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.auth-form input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; outline: 0; color: var(--ink); background: #fbfcfc; font-size: 14px; font-weight: 500; }
.auth-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215, 179, 106, 0.16); }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-message { margin: 0 30px 18px; padding: 12px 14px; border-radius: 10px; color: var(--red); background: var(--red-soft); font-size: 11px; line-height: 1.5; }
.auth-message.success { color: var(--green); background: var(--green-soft); }
.auth-security { display: flex; align-items: center; gap: 9px; padding: 15px 26px; border-top: 1px solid var(--line); color: var(--muted); background: #f8f9fa; font-size: 9px; line-height: 1.4; }
.auth-security span { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(35, 132, 108, 0.1); }
.qr-box { width: 210px; height: 210px; display: grid; place-items: center; margin: 0 auto; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.qr-box img { width: 100%; height: 100%; }
.auth-secret { overflow-wrap: anywhere; padding: 9px; border-radius: 8px; background: #f2f4f5; font-size: 9px !important; text-align: center; }
.auth-secret code { color: var(--navy-800); }
.auth-loading { opacity: 0.65; pointer-events: none; }

.app-shell { min-height: 100vh; display: flex; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 270px;
  display: flex;
  flex-direction: column;
  color: var(--white);
  background:
    radial-gradient(circle at 18% 0%, rgba(38, 102, 127, 0.32), transparent 32%),
    linear-gradient(165deg, var(--navy-800), var(--navy-950) 72%);
  box-shadow: 12px 0 36px rgba(3, 16, 29, 0.12);
}

.brand {
  height: 92px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.brand strong { display: block; font-size: 14px; letter-spacing: 0.08em; }
.brand span { display: block; margin-top: 5px; color: #c8d0da; font-size: 10px; letter-spacing: 0.2em; }

.main-nav { display: grid; gap: 7px; padding: 25px 14px; }
.nav-item {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: #bbc6d2;
  background: transparent;
  text-align: left;
  transition: 160ms ease;
}
.nav-item:hover { color: var(--white); background: rgba(255, 255, 255, 0.06); }
.nav-item.active { color: var(--white); background: rgba(215, 179, 106, 0.16); }
.nav-item.active::before {
  position: absolute;
  left: 0;
  width: 3px;
  height: 28px;
  border-radius: 0 4px 4px 0;
  background: var(--gold);
  content: "";
}
.nav-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 800;
}
.nav-item > span:last-child { font-size: 14px; font-weight: 600; }

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: auto 15px 19px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #47c69a; box-shadow: 0 0 0 5px rgba(71, 198, 154, 0.1); }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: 12px; }
.sidebar-footer small { margin-top: 3px; color: #9eacba; font-size: 10px; }

.main-content { width: calc(100% - 270px); min-height: 100vh; margin-left: 270px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(14px);
}
.topbar-left, .topbar-actions, .user-chip { display: flex; align-items: center; }
.topbar-left { gap: 12px; flex: 1; }
.topbar-actions { position: relative; gap: 14px; }
.menu-button { display: none !important; }
.search-box {
  width: min(460px, 100%);
  height: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f9fa;
}
.search-box span { color: #84909c; font-size: 22px; transform: rotate(-20deg); }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search-box input::placeholder { color: #98a2ac; }

.install-button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--gold);
  border-radius: 11px;
  color: var(--navy-900);
  background: #fbf5e7;
  font-size: 12px;
  font-weight: 800;
}
.notification-button, .icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--navy-800);
  background: var(--white);
}
.notification-button > span { font-weight: 900; }
.notification-button[aria-expanded="true"] { border-color: var(--gold); background: #fbf5e7; }
.notification-button i {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--white);
  border-radius: 20px;
  color: var(--white);
  background: var(--red);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}
.user-chip { gap: 10px; padding-left: 5px; }
.user-chip-button { border: 0; color: inherit; background: transparent; text-align: left; }
.avatar { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; color: var(--white); background: var(--navy-800); font-size: 12px; font-weight: 800; }
.user-chip strong, .user-chip small { display: block; white-space: nowrap; }
.user-chip strong { font-size: 12px; }
.user-chip small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.notification-panel {
  position: absolute;
  top: 54px;
  right: 58px;
  z-index: 40;
  width: min(410px, calc(100vw - 30px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--white);
  box-shadow: 0 22px 60px rgba(3, 15, 28, 0.22);
}
.notification-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 18px 13px; border-bottom: 1px solid var(--line); }
.notification-header .eyebrow { margin-bottom: 4px; }
.notification-header h2 { margin: 0; color: var(--navy-900); font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 500; }
.notification-list { max-height: min(440px, calc(100vh - 150px)); overflow-y: auto; }
.notification-entry { width: 100%; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; padding: 14px 17px; border: 0; border-bottom: 1px solid #edf0f2; color: inherit; background: var(--white); text-align: left; }
.notification-entry:last-child { border-bottom: 0; }
.notification-entry:hover { background: #fafbfc; }
.notification-entry .activity-mark { color: var(--red); background: var(--red-soft); }
.notification-entry.finance .activity-mark { color: var(--yellow); background: var(--yellow-soft); }
.notification-entry strong, .notification-entry small { display: block; }
.notification-entry strong { margin-bottom: 4px; color: var(--ink); font-size: 11px; }
.notification-entry small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.notification-entry time { color: var(--red); font-size: 9px; font-weight: 800; white-space: nowrap; }
.notification-empty { padding: 35px 20px; color: var(--muted); font-size: 11px; text-align: center; }
.notification-empty strong { display: block; margin-bottom: 6px; color: var(--green); font-family: Georgia, serif; font-size: 19px; font-weight: 500; }

.view { display: none; padding: 32px 34px 46px; }
.view.active { display: block; animation: fade-in 180ms ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: 0.17em; }
.page-heading h1, .modal-header h2 { margin: 0; color: var(--navy-900); font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.page-heading h1 { font-size: clamp(28px, 3vw, 38px); }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.button {
  min-height: 43px;
  padding: 0 17px;
  border: 0;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 800;
}
.button.primary { color: var(--navy-950); background: var(--gold); }
.button.primary:hover { background: #e0bd77; }
.button.secondary { border: 1px solid var(--line); color: var(--ink); background: var(--white); }
.button.danger { color: var(--red); background: var(--red-soft); }
.button.small { min-height: 35px; padding: 0 12px; font-size: 11px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-bottom: 18px; }
.stat-card, .panel, .table-card, .deadline-card, .setting-card {
  border: 1px solid rgba(7, 30, 53, 0.07);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.stat-card { position: relative; overflow: hidden; padding: 20px; }
.stat-card::after { position: absolute; right: -20px; bottom: -30px; width: 90px; height: 90px; border-radius: 50%; background: rgba(215, 179, 106, 0.1); content: ""; }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-symbol { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: var(--navy-800); background: var(--blue-soft); font-size: 11px; font-weight: 900; }
.stat-value { position: relative; z-index: 1; display: block; color: var(--navy-900); font-family: Georgia, "Times New Roman", serif; font-size: 28px; }
.stat-note { position: relative; z-index: 1; display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.8fr); gap: 18px; margin-bottom: 18px; }
.panel { padding: 21px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.panel-header h2 { margin: 0; color: var(--navy-900); font-size: 15px; }
.panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.period-chip { padding: 7px 10px; border-radius: 8px; color: var(--muted); background: #f4f6f7; font-size: 10px; font-weight: 700; }

.bar-chart { height: 230px; display: flex; align-items: flex-end; gap: 13px; padding: 15px 6px 0; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent, transparent 54px, #edf0f2 55px); }
.bar-group { height: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; position: relative; }
.bar { width: min(18px, 35%); min-height: 2px; border-radius: 5px 5px 0 0; transition: height 300ms ease; }
.bar.received { background: var(--navy-700); }
.bar.expected { background: var(--gold); }
.bar-label { position: absolute; bottom: -22px; color: var(--muted); font-size: 9px; font-weight: 700; }
.chart-legend { display: flex; gap: 15px; margin-top: 29px; color: var(--muted); font-size: 10px; }
.legend-dot { width: 8px; height: 8px; display: inline-block; margin-right: 6px; border-radius: 3px; }

.donut-wrap { display: grid; place-items: center; min-height: 165px; }
.donut {
  width: 146px;
  height: 146px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--navy-800) 0 25%, var(--gold) 25% 50%, #4d8194 50% 75%, #c8d2db 75% 100%);
}
.donut::after { width: 88px; height: 88px; display: grid; place-items: center; border-radius: 50%; color: var(--navy-900); background: var(--white); content: attr(data-total) " casos"; font-family: Georgia, serif; font-size: 14px; text-align: center; white-space: pre; }
.area-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.area-legend div { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--muted); font-size: 9px; }
.area-legend b { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 3px; }

.lower-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.agenda-list, .activity-list { display: grid; gap: 3px; }
.agenda-item, .activity-item { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid #edf0f2; }
.agenda-item:last-child, .activity-item:last-child { border-bottom: 0; }
.date-box { display: grid; place-items: center; padding: 8px 4px; border-radius: 10px; color: var(--navy-800); background: var(--blue-soft); }
.date-box strong { font-family: Georgia, serif; font-size: 18px; line-height: 1; }
.date-box span { margin-top: 3px; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.item-main strong, .item-main span { display: block; }
.item-main strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.item-main span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.activity-item { grid-template-columns: 34px 1fr auto; }
.activity-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--gold); background: #fbf5e7; font-size: 10px; font-weight: 900; }

.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 20px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.tag.green { color: var(--green); background: var(--green-soft); }
.tag.red { color: var(--red); background: var(--red-soft); }
.tag.yellow { color: var(--yellow); background: var(--yellow-soft); }
.tag.blue { color: #36698f; background: var(--blue-soft); }
.tag.gray { color: #687481; background: #eef0f2; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.filter-input { width: min(380px, 100%); height: 41px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: var(--white); font-size: 12px; }
.filter-input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215, 179, 106, 0.15); }

.table-card { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 13px 17px; color: #7c8792; background: #f8f9fa; font-size: 9px; font-weight: 900; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 15px 17px; border-top: 1px solid #edf0f2; color: #4b5864; font-size: 11px; vertical-align: middle; }
.data-table tbody tr:hover { background: #fbfcfc; }
.row-actions { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.cell-title { color: var(--ink); font-weight: 800; }
.cell-subtitle { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.client-cell { display: flex; align-items: center; gap: 10px; }
.initials { width: 33px; height: 33px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--navy-800); background: var(--blue-soft); font-size: 10px; font-weight: 900; }
.empty-state { padding: 55px 20px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 7px; color: var(--navy-800); font-family: Georgia, serif; font-size: 20px; font-weight: 500; }

.deadline-list { display: grid; gap: 12px; }
.deadline-card { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 18px; padding: 17px; }
.deadline-date { padding: 11px 8px; border-right: 1px solid var(--line); text-align: center; }
.deadline-date strong { display: block; color: var(--navy-800); font-family: Georgia, serif; font-size: 25px; }
.deadline-date span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.deadline-detail h3 { margin: 0; color: var(--ink); font-size: 13px; }
.deadline-detail p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.deadline-meta { display: flex; align-items: flex-end; gap: 8px; flex-direction: column; }

.finance-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin-bottom: 17px; }
.finance-card { padding: 19px; border-left: 3px solid var(--gold); }
.finance-card span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.finance-card strong { display: block; margin-top: 9px; color: var(--navy-900); font-family: Georgia, serif; font-size: 23px; font-weight: 500; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.setting-card { padding: 22px; }
.setting-card h3 { margin: 0; color: var(--navy-900); font-size: 14px; }
.setting-card p { min-height: 38px; margin: 8px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.setting-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.security-list { margin: 0; padding: 0; list-style: none; }
.security-list li { display: flex; gap: 9px; padding: 8px 0; color: var(--muted); font-size: 10px; }
.security-list li::before { color: var(--green); content: "✓"; font-weight: 900; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(3, 15, 28, 0.67); backdrop-filter: blur(5px); }
.modal { width: min(720px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 20px; background: var(--white); box-shadow: 0 26px 80px rgba(0, 0, 0, 0.3); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 25px 17px; border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 23px 25px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #52606c; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.field-required { color: var(--red); }
.field-optional { margin-left: 4px; color: #98a2ac; font-size: 8px; font-weight: 700; letter-spacing: 0.02em; text-transform: lowercase; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--ink); background: var(--white); font-size: 12px; }
.field textarea { min-height: 78px; padding-top: 11px; resize: vertical; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 17px 25px 23px; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 70; max-width: 360px; padding: 14px 17px; border-radius: 12px; color: var(--white); background: var(--navy-800); box-shadow: 0 16px 45px rgba(3, 15, 28, 0.28); font-size: 12px; font-weight: 700; animation: toast-in 180ms ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1120px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .topbar { padding-inline: 24px; }
  .view { padding-inline: 24px; }
}

@media (max-width: 850px) {
  .sidebar { transform: translateX(-100%); transition: transform 180ms ease; }
  .sidebar.open { transform: translateX(0); }
  .main-content { width: 100%; margin-left: 0; }
  .menu-button { display: grid !important; }
  .user-chip div { display: none; }
  .install-button { display: none !important; }
  .lower-grid, .settings-grid { grid-template-columns: 1fr; }
  .data-table { min-width: 720px; }
  .table-card { overflow-x: auto; }
}

@media (max-width: 620px) {
  .topbar { height: 68px; padding-inline: 14px; }
  .view { padding: 23px 14px 35px; }
  .user-chip { display: none; }
  .notification-panel { position: fixed; top: 76px; right: 14px; left: 14px; width: auto; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .stats-grid, .finance-summary { grid-template-columns: 1fr; }
  .stat-card { padding: 17px; }
  .deadline-card { grid-template-columns: 62px 1fr; }
  .deadline-meta { grid-column: 2; align-items: flex-start; flex-direction: row; }
  .form-grid { grid-template-columns: 1fr; padding-inline: 18px; }
  .field.full { grid-column: auto; }
  .modal-header, .modal-footer { padding-inline: 18px; }
}

@media print {
  .sidebar, .topbar, .page-heading .button, .toolbar { display: none !important; }
  .main-content { width: 100%; margin: 0; }
  .view { padding: 0; }
  .panel, .table-card, .stat-card { box-shadow: none; break-inside: avoid; }
}
