:root {
  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-2: #edf2f7;
  --text: #10223f;
  --muted: #64748b;
  --line: #d7e0ea;
  --sky-navy: #0b2a52;
  --sky-navy-2: #071d39;
  --sky-red: #cf3a2b;
  --sky-red-dark: #ad2f24;
  --blue: #0b5cad;
  --blue-dark: #084983;
  --gray: #6b7280;
  --green: #19835c;
  --violet: #6d55c7;
  --orange: #d97706;
  --red: #cf3a2b;
  --shadow: 0 12px 30px rgba(11, 42, 82, 0.09);
}

html,
body {
  height: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow: hidden;
}

#app {
  height: 100%;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.login-shell {
  min-height: 100%;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(11, 42, 82, 0.12), rgba(207, 58, 43, 0.08)),
    var(--bg);
}

.login-panel {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.intro,
.auth-card,
.panel,
.modal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 430px;
  border-top: 4px solid var(--sky-red);
}

.brand-logo {
  display: block;
  width: min(360px, 100%);
  height: auto;
  margin-bottom: 24px;
}

.brand {
  font-size: 34px;
  line-height: 1.05;
  font-weight: 800;
  margin: 0 0 14px;
  color: var(--sky-navy);
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 620px;
  font-size: 16px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.role-pill {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.role-pill strong {
  display: block;
  margin-bottom: 2px;
}

.role-pill span {
  color: var(--muted);
  font-size: 12px;
}

.role-pill input {
  width: auto;
  margin-right: 8px;
}

.auth-card {
  padding: 28px;
}

.auth-card h2,
.panel h2,
.modal-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--text);
  background: #fff;
  outline: none;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.14);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 9px 13px;
  color: #fff;
  background: var(--sky-red);
  font-weight: 700;
}

.btn:hover {
  background: var(--sky-red-dark);
}

.btn.active {
  background: var(--sky-red-dark);
  box-shadow: 0 0 0 3px rgba(207, 58, 43, 0.16);
}

.btn.secondary {
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.btn.secondary.active {
  color: #fff;
  background: var(--sky-red);
  border-color: var(--sky-red);
}

.btn.secondary:hover {
  background: #e3e9ef;
}

.btn.danger {
  background: var(--red);
}

.btn.good {
  background: var(--green);
}

.btn.good:hover {
  background: #126845;
}

.app-shell {
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  min-height: 0;
  height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  background: linear-gradient(180deg, var(--sky-navy), var(--sky-navy-2));
  color: #fff;
}

.side-brand {
  display: grid;
  justify-items: start;
  gap: 5px;
  margin: -18px -18px 0;
  padding: 16px 18px 14px;
  background: #fff;
  border-bottom: 3px solid var(--sky-red);
}

.side-logo {
  display: block;
  width: 178px;
  max-width: 100%;
  height: auto;
}

.side-brand span {
  color: var(--sky-navy);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-box {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  border-left: 3px solid var(--sky-red);
}

.user-box strong,
.user-box span {
  display: block;
}

.user-box span {
  margin-top: 2px;
  color: #cbd5df;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  width: 100%;
  min-height: 38px;
  border-radius: 8px;
  padding: 9px 10px;
  color: #e8eef4;
  background: transparent;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  background: rgba(207, 58, 43, 0.24);
}

.main {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 22px;
}

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
  color: var(--sky-navy);
}

.topbar p {
  margin: 2px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

.main > .grid {
  min-height: 0;
}

.main > .plan-grid {
  flex: 1 1 auto;
}

.plan-grid {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  padding: 18px;
  border-top: 3px solid rgba(11, 92, 173, 0.12);
}

.calendar-panel {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.calendar-panel .panel-head {
  flex: 0 0 auto;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin-bottom: 0;
}

.panel-head h3 {
  margin: 0;
}

.ai-summary {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
}

.ai-summary .panel-head {
  margin-bottom: 10px;
}

.morning-brief {
  border-top-color: rgba(207, 58, 43, 0.28);
}

.ai-analytics {
  display: grid;
  gap: 16px;
}

.leadership-dashboard {
  border-top-color: rgba(50, 111, 176, 0.3);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.analytics-kpi {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-left: 4px solid var(--blue);
}

.analytics-kpi span {
  color: var(--muted);
  font-weight: 800;
}

.analytics-kpi strong {
  color: var(--sky-navy);
  font-size: 24px;
}

.analytics-kpi.active {
  background: #eff6ff;
  border-left-color: var(--sky-navy);
}

.analytics-kpi.new {
  background: #f8fafc;
  border-left-color: #64748b;
}

.analytics-kpi.closed,
.analytics-kpi.reports {
  background: #f0fdf4;
  border-left-color: var(--green);
}

.analytics-kpi.risk {
  background: #fef2f2;
  border-left-color: var(--red);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dash-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dash-card.wide {
  grid-column: 1 / -1;
}

.dash-card.load-card {
  grid-column: 1 / -1;
}

.dash-card.risk-card {
  grid-column: auto;
}

.dash-card h3 {
  margin: 0 0 9px;
  color: var(--sky-navy);
}

.funnel-row,
.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) 56px minmax(150px, 1fr);
  align-items: center;
  gap: 10px;
  margin: 7px 0;
}

.funnel-row {
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) 48px;
}

.bar-row small {
  color: var(--muted);
  font-weight: 800;
}

.bar-row small.load-warning {
  color: var(--red);
}

.funnel-track,
.bar-track {
  height: 16px;
  overflow: hidden;
  display: flex;
  border-radius: 999px;
  background: #edf2f7;
}

.funnel-track i,
.bar-track i {
  display: block;
  height: 100%;
}

.funnel-track .gray {
  background: #64748b;
}

.funnel-track .teal,
.bar-work {
  background: var(--sky-navy);
}

.funnel-track .green,
.bar-training {
  background: var(--green);
}

.funnel-track .red,
.bar-missing {
  background: var(--red);
}

.funnel-track .orange {
  background: var(--orange);
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(7, minmax(48px, 1fr));
  gap: 6px;
}

.heat-cell {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--sky-navy);
  font-size: 12px;
  font-weight: 800;
  background: #f1f5f9;
}

.heat-cell.level-1 {
  background: #dbeafe;
}

.heat-cell.level-2 {
  background: #93c5fd;
}

.heat-cell.level-3 {
  color: #fff;
  background: #3b82f6;
}

.heat-cell.level-4 {
  color: #fff;
  background: #cf3a2b;
}

.risk-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.risk-card .risk-list {
  grid-template-columns: 1fr;
}

.risk-item {
  display: grid;
  gap: 4px;
  padding: 11px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fff7f7;
}

.risk-item small {
  color: var(--red);
  font-weight: 800;
}

.morning-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.morning-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.morning-grid p {
  margin: 6px 0 0;
}

.morning-headline {
  grid-column: 1 / -1;
  color: var(--sky-navy);
  font-size: 18px;
  font-weight: 800;
}

.ai-chat-panel {
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto;
  gap: 12px;
}

.ai-chat-messages {
  min-height: 240px;
  max-height: 58vh;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
}

.ai-message {
  max-width: 820px;
  padding: 11px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.ai-message.user {
  justify-self: end;
  background: #eef4fb;
}

.ai-message p {
  margin: 6px 0 0;
}

.ai-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.ai-chat-form textarea {
  min-height: 72px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar .field {
  min-width: 180px;
  margin-bottom: 0;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.report-card-list {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #f7f9fc;
  font-size: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.tag.gray {
  background: var(--gray);
}

.tag.green {
  background: var(--green);
}

.tag.violet {
  background: var(--violet);
}

.tag.vacation {
  background: #0891b2;
}

.tag.orange {
  background: var(--orange);
}

.tag.red {
  background: var(--red);
}

.tag.blue {
  background: var(--blue);
}

.tag.teal {
  background: var(--sky-navy);
}

.muted {
  color: var(--muted);
}

.attachment-list {
  display: grid;
  gap: 4px;
}

.attachment-list a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.attachment-list a:hover {
  text-decoration: underline;
}

.selected-file-list {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.selected-file-list span {
  overflow-wrap: anywhere;
}

.selected-file-list strong {
  color: var(--ink);
}

.selected-file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.selected-file-item small {
  color: var(--muted);
  white-space: nowrap;
}

.file-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #fff;
  background: var(--red);
  font-size: 18px;
  line-height: 1;
}

.file-limit-warning {
  padding: 8px 10px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #991b1b;
  background: #fef2f2;
  font-weight: 700;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker-btn {
  width: fit-content;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.stat {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  border-left: 4px solid var(--sky-red);
}

.stat.total {
  background: #f8fafc;
  border-left-color: #64748b;
}

.stat.requests,
.stat.active {
  background: #fff7f5;
  border-left-color: var(--sky-red);
}

.stat.active {
  background: #eff6ff;
  border-left-color: var(--sky-navy);
}

.stat.closed {
  background: #eff6ff;
  border-left-color: var(--blue);
}

.stat.trainings {
  background: #f5f3ff;
  border-left-color: var(--violet);
}

.stat.vacations {
  background: #ecfeff;
  border-left-color: #0891b2;
}

.stat.reports {
  background: #f0fdf4;
  border-left-color: var(--green);
}

.stat.alerts {
  background: #fff7ed;
  border-left-color: var(--orange);
}

.stat strong {
  font-size: 22px;
}

.calendar-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.calendar {
  width: 100%;
  min-width: 100%;
  display: grid;
}

.month-calendar {
  min-width: 0;
}

.cal-head,
.engineer-cell,
.day-cell {
  min-height: 42px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4px 5px;
}

.cal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 36px;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.cal-corner {
  left: 0;
  z-index: 4;
}

.engineer-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
  font-weight: 800;
}

.day-cell {
  background: #fff;
}

.month-head {
  padding: 5px 1px;
  text-align: center;
  font-size: 10px;
}

.month-engineer {
  min-height: 34px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-day {
  min-height: 34px;
  padding: 2px;
}

.month-load {
  width: 100%;
  min-height: 22px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.month-load.gray {
  background: var(--gray);
}

.month-load.blue {
  background: var(--blue);
}

.month-load.green {
  background: var(--green);
}

.month-load.confirmed-report {
  background: var(--green);
}

.month-load.pending-report {
  background: var(--orange);
}

.month-load.missing-report {
  background: var(--red);
}

.month-load.future-report {
  background: var(--sky-navy);
}

.month-load.training {
  background: var(--violet);
}

.month-load.vacation {
  background: #0891b2;
}

.month-load.mixed {
  background: repeating-linear-gradient(
    135deg,
    var(--sky-navy) 0 6px,
    var(--violet) 6px 12px
  );
}

.month-load.orange {
  background: var(--orange);
}

.month-load.red {
  background: var(--red);
}

.event {
  width: 100%;
  margin-bottom: 4px;
  border-radius: 8px;
  padding: 7px;
  color: #fff;
  text-align: left;
  font-size: 12px;
}

.event strong,
.event span {
  display: block;
}

.event.compact {
  padding: 4px 7px;
  line-height: 1.15;
}

.event span {
  opacity: 0.88;
}

.event.gray {
  background: var(--gray);
}

.event.green {
  background: var(--green);
}

.event.violet {
  background: var(--violet);
}

.event.orange {
  background: var(--orange);
}

.event.red {
  background: var(--red);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.46);
}

.modal-panel {
  width: min(980px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: 20px;
}

.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  font-size: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.notice {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.request-summary {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.request-summary h3 {
  margin: 0;
  font-size: 16px;
}

.request-summary p {
  margin: 4px 0 0;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.notification.unread {
  border-color: rgba(217, 119, 6, 0.35);
  background: #fffbeb;
}

.notification-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification time {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.history-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.empty {
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow: auto;
    overflow-x: hidden;
  }

  .login-panel,
  .app-shell,
  .grid.two,
  .grid.three,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    position: static;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    height: auto;
    overflow: visible;
    gap: 10px;
    padding: 12px 14px;
  }

  .main {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    height: auto;
    overflow: hidden;
    padding: 14px;
  }

  .side-brand {
    margin: -12px -14px 0;
    padding: 12px 14px 10px;
  }

  .side-logo {
    width: 150px;
  }

  .side-brand span {
    font-size: 13px;
  }

  .user-box {
    padding: 10px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .nav button {
    min-height: 34px;
    padding: 8px 9px;
    font-size: 13px;
  }

  .sidebar > .btn {
    width: 100%;
    min-height: 34px;
    padding: 8px 10px;
  }

  .plan-grid {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .panel {
    min-width: 0;
    padding: 14px;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-panel {
    width: 100%;
    min-width: 0;
    height: auto;
    overflow: hidden;
  }

  .compact-calendar-wrap {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .compact-calendar-wrap .month-calendar {
    width: 1314px;
    min-width: 1314px;
  }

  .compact-calendar-wrap .cal-corner,
  .compact-calendar-wrap .engineer-cell {
    box-shadow: 8px 0 14px rgba(15, 23, 42, 0.08);
  }

  .month-head {
    font-size: 11px;
  }

  .month-day,
  .month-engineer {
    min-height: 38px;
  }

  .report-table-wrap {
    display: none;
  }

  .report-card-list {
    display: grid;
    gap: 10px;
  }

  .report-card {
    display: grid;
    gap: 11px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .report-card-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
  }

  .report-card-head strong,
  .report-card-head span {
    display: block;
  }

  .report-card-head span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .report-card-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    background: #f8fafc;
  }

  .report-card-meta span,
  .report-card-section span {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .report-card-meta strong,
  .report-card-section p {
    overflow-wrap: anywhere;
  }

  .report-card-section p {
    margin: 0;
  }

  .modal {
    align-items: start;
    padding: 10px;
  }

  .modal-panel {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 14px;
  }

  .form-grid {
    gap: 10px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar .field {
    min-width: 0;
  }

  .form-grid .btn-row,
  .modal-panel .btn-row,
  .report-card .btn-row {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid .btn-row .btn,
  .modal-panel .btn-row .btn,
  .report-card .btn-row .btn,
  .file-picker-btn {
    width: 100%;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-body {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-chat-form {
    grid-template-columns: 1fr;
  }

  .kpi-grid,
  .dashboard-grid,
  .risk-list {
    grid-template-columns: 1fr;
  }

  .dash-card.load-card,
  .dash-card.risk-card {
    grid-column: auto;
  }

  .funnel-row,
  .bar-row {
    grid-template-columns: 1fr;
  }

  .morning-grid {
    grid-template-columns: 1fr;
  }

  .role-grid {
    grid-template-columns: 1fr;
  }
}
