:root {
  --bg: #f6f8fc;
  --panel: #ffffff;
  --ink: #0a1f44;
  --muted: #5b6472;
  --line: #e5e7eb;
  --brand: #1e3a8a;
  --brand-dark: #0a1f44;
  --accent: #ff7a18;
  --accent-soft: #ffb347;
  --danger: #c2410c;
  --danger-bg: #fff4e7;
  --shadow: 0 18px 45px rgba(10, 31, 68, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: linear-gradient(135deg, #0a1f44 0%, #1e3a8a 54%, #ff7a18 100%);
}

.login-screen.hidden,
.app-shell.locked {
  display: none;
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  padding: 34px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(10, 31, 68, 0.28);
}

.login-logo {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.login-card h1 {
  font-size: 30px;
}

.login-error {
  min-height: 22px;
  margin: 0;
  color: var(--danger);
  font-weight: 750;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

.mobile-menu-button,
.menu-backdrop {
  display: none;
}

.sidebar {
  background: var(--brand-dark);
  color: #ffffff;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--muted);
  font-weight: 750;
}

.sidebar .eyebrow {
  color: #cbd5e1;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 20px;
}

h2 {
  font-size: 30px;
}

h3 {
  font-size: 22px;
}

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

.nav-group {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(229, 231, 235, 0.16);
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-arrow {
  display: inline-block;
  font-size: 0;
  line-height: 1;
  transition: transform 0.16s ease;
}

.nav-arrow::before {
  content: ">";
  font-size: 18px;
}

.nav-group.open .nav-arrow {
  transform: rotate(90deg);
}

.nav-submenu {
  display: none;
  gap: 8px;
}

.nav-group.open .nav-submenu {
  display: grid;
}

.nav-button {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: transparent;
  color: #dbeafe;
  text-align: left;
}

.nav-button.sub-nav {
  padding-left: 28px;
}

.nav-button.active,
.nav-button:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #ffffff;
}

.logout-button {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.main-panel {
  padding: 32px;
  min-width: 0;
  overflow-x: hidden;
}

.topbar,
.section-heading,
.hero-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}

.hero-actions {
  display: flex;
  align-items: end;
  gap: 14px;
  min-width: 0;
}

.topbar {
  margin-bottom: 28px;
}

.date-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  background: var(--panel);
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 24px;
  min-width: 0;
  max-width: 100%;
}

.hero-strip {
  background: linear-gradient(135deg, #0a1f44 0%, #1e3a8a 58%, #ff7a18 100%);
  border: 1px solid rgba(30, 58, 138, 0.2);
  border-radius: 8px;
  padding: 24px;
  color: #ffffff;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.hero-strip > div {
  min-width: 0;
}

.hero-strip h3 {
  overflow-wrap: anywhere;
}

.hero-strip .eyebrow {
  color: #e5e7eb;
}

.primary-action,
.secondary-action {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 750;
  max-width: 100%;
  min-width: 0;
}

.primary-action {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #ffffff;
}

.primary-action:hover {
  background: linear-gradient(135deg, #f56f0d, #ff9f2b);
}

.secondary-action {
  background: #eef2ff;
  color: var(--ink);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.metric-grid.compact {
  margin-bottom: 18px;
}

.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.metric-card strong {
  font-size: 32px;
}

.metric-card.warning strong {
  color: var(--danger);
}

.metric-card strong.status-good,
.status-good {
  color: #15803d;
  font-weight: 800;
}

.metric-card strong.status-risk,
.status-risk {
  color: var(--danger);
  font-weight: 800;
}

.content-band,
.analysis-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}

.content-band.urgent {
  background: var(--danger-bg);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.compact-label {
  min-width: 190px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.compact-label select {
  margin-top: 6px;
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  padding: 0 44px 0 18px;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(10, 31, 68, 0.14);
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #ffffff;
}

textarea {
  resize: vertical;
}

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

.upload-box {
  border: 1px dashed #9aa7c7;
  border-radius: 8px;
  padding: 22px;
  background: #fbfdfb;
}

.upload-box span {
  color: var(--ink);
}

.password-control {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
  align-items: center;
}

.icon-button {
  width: 48px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2ff;
  color: var(--brand);
  font-size: 18px;
  font-weight: 900;
}

.project-list,
.report-list,
.task-list,
.meeting-list,
.note-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.project-card,
.report-card,
.finance-card,
.module-tile,
.task-card,
.meeting-card,
.comparison-card,
.note-card,
.team-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcff;
}

.report-card {
  cursor: pointer;
}

.finance-card {
  grid-template-columns: 1fr auto;
}

.credential-card [data-secret] {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.report-card.active-report {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.16);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.dashboard-focus-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
  margin-top: 18px;
}

.module-tile {
  grid-template-columns: 1fr;
  box-shadow: none;
}

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

.task-card.done-task {
  opacity: 0.62;
}

.compare-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
  margin-top: 18px;
  overflow: hidden;
}

.compare-controls label {
  flex: 1 1 170px;
  min-width: 150px;
}

.compare-controls label:first-child {
  flex-basis: 230px;
  max-width: 360px;
}

.compare-controls .primary-action {
  flex: 0 0 140px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

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

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

.comparison-stats button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  font: inherit;
}

.comparison-stats button:hover {
  border-color: var(--accent);
  color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.12);
}

.priority-pill {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.priority-pill.high {
  background: #fff4e7;
  color: #c2410c;
}

.priority-pill.medium {
  background: #eef2ff;
  color: var(--brand);
}

.priority-pill.low {
  background: #ecfdf3;
  color: #15803d;
}

.compact-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.busy-bar {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
  margin-top: 12px;
}

.busy-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.calendar-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.calendar-day strong,
.calendar-day span {
  display: block;
}

.calendar-day span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.calendar-day.selected-day {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.16);
}

.empty-day {
  background: transparent;
  border: 0;
}

.time-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.day-timeline {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.timeline-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}

.timeline-row:last-child {
  border-bottom: 0;
}

.timeline-hour {
  padding: 12px;
  color: var(--muted);
  font-weight: 800;
  background: #f8fafc;
}

.timeline-slot {
  position: relative;
  min-height: 72px;
  padding: 8px 10px;
}

.free-time-label {
  color: #9aa3b2;
  font-size: 13px;
}

.timeline-event {
  position: absolute;
  left: 10px;
  right: 10px;
  min-height: 24px;
  border-radius: 8px;
  padding: 7px 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #3155b7);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(10, 31, 68, 0.18);
  display: flex;
  align-items: center;
  gap: 14px;
}

.timeline-event strong,
.timeline-event span {
  display: block;
  line-height: 1.2;
}

.timeline-event strong {
  flex: 0 0 auto;
}

.timeline-event span {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-block {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.free-block {
  background: #f8fafc;
  color: var(--muted);
}

.busy-block {
  background: #eef2ff;
}

.note-card {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.note-card p {
  margin: 0;
}

.note-card.blue {
  background: #eef2ff;
}

.note-card.orange {
  background: #fff4e7;
}

.note-card.green {
  background: #ecfdf3;
}

.note-card.yellow {
  background: #fef9c3;
}

.flat-form {
  box-shadow: none;
  margin-bottom: 18px;
}

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

.checkbox-row input {
  width: auto;
}

.compact-control {
  min-width: 220px;
  max-width: 280px;
}

.compact-control select {
  min-height: 44px;
}

.org-tree {
  display: grid;
  gap: 20px;
}

.org-level {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

.team-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.team-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.employee-profile {
  margin-top: 10px;
}

.employee-profile-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcff;
}

.employee-profile-card h3 {
  margin: 0 0 8px;
}

.person-avatar {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid rgba(255, 122, 24, 0.32);
  background: #eef2ff;
  box-shadow: 0 10px 26px rgba(10, 31, 68, 0.14);
}

.employee-profile-card .person-avatar {
  width: 92px;
  height: 92px;
}

.fallback-avatar {
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

.team-member-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  font-weight: 750;
}

.team-member-button.active-member {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.16);
}

.team-card {
  grid-template-columns: 72px 1fr auto;
}

.team-card strong {
  display: block;
  font-size: 18px;
}

.founder-hero {
  margin-bottom: 0;
}

.muted-line {
  margin: 6px 0 0;
  color: var(--muted);
}

.delete-button {
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff4e7;
  color: #9a3412;
  font-weight: 750;
}

.edit-button,
.link-button {
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  background: #eef2ff;
  color: var(--brand);
  font-weight: 750;
}

.link-button {
  padding: 0;
  background: transparent;
  text-align: left;
}

.link-button:hover {
  color: var(--accent);
}

.inline-actions,
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

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

.company-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  max-height: 320px;
  overflow: auto;
}

.detail-list {
  max-height: 420px;
}

.company-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.company-list strong {
  display: block;
}

.reason-text {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.hidden,
.empty {
  display: none;
}

@media (max-width: 920px) {
  body {
    width: 100%;
    max-width: 100vw;
  }

  .app-shell {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .mobile-menu-button {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 30;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    gap: 4px;
    border: 0;
    border-radius: 8px;
    padding: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    box-shadow: 0 12px 30px rgba(10, 31, 68, 0.24);
  }

  .mobile-menu-button span {
    width: 22px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: #ffffff;
  }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 18;
    border: 0;
    background: rgba(10, 31, 68, 0.52);
  }

  .app-shell.menu-open .menu-backdrop {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 25;
    width: min(84vw, 330px);
    padding: 76px 18px 20px;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 18px 0 45px rgba(10, 31, 68, 0.22);
  }

  .app-shell.menu-open .sidebar {
    transform: translateX(0);
  }

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

  .nav-submenu {
    grid-template-columns: 1fr;
  }

  .nav-button {
    text-align: left;
    white-space: normal;
  }

  .nav-button.sub-nav {
    padding-left: 14px;
  }

  .main-panel {
    padding: 76px 20px 20px;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
  }

  .view.active,
  .content-band,
  .analysis-panel,
  .setup-grid,
  .hero-strip,
  .metric-grid,
  .module-grid,
  .dashboard-focus-grid,
  .compare-grid,
  .report-list,
  .task-list,
  .team-toolbar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .topbar,
  .section-heading,
  .hero-strip,
  .project-card,
  .report-card {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  .topbar {
    gap: 14px;
  }

  .date-pill {
    width: 100%;
    border-radius: 999px;
    font-size: 16px;
    padding: 12px 14px;
  }

  .hero-strip {
    padding: 18px;
    gap: 18px;
  }

  #overviewView .hero-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #overviewView .hero-strip > div,
  #overviewView .hero-actions,
  #overviewView .compact-label,
  #overviewView .compact-label select,
  #overviewView .primary-action {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .hero-strip h3 {
    font-size: clamp(20px, 5vw, 28px);
    line-height: 1.18;
    max-width: 100%;
    word-break: break-word;
  }

  #overviewTitle {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    min-width: 0;
  }

  .compact-label {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .compact-label select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 52px;
    padding-left: 14px;
    font-size: 16px;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
    min-height: 50px;
    white-space: normal;
    justify-content: center;
    text-align: center;
    overflow: hidden;
  }

  .metric-grid,
  .split-grid,
  .setup-grid,
  .module-grid,
  .dashboard-focus-grid,
  .team-toolbar,
  .compare-controls,
  .compare-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .compare-controls {
    display: grid;
    overflow: visible;
    width: 100%;
    min-width: 0;
  }

  .compare-controls label,
  .compare-controls label:first-child,
  .compare-controls .primary-action {
    min-width: 0;
    max-width: none;
    width: 100%;
    flex: initial;
  }

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

@media (max-width: 560px) {
  .main-panel {
    padding: 74px 12px 18px;
  }

  .topbar,
  .section-heading,
  .hero-strip,
  .project-card,
  .report-card {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  .topbar {
    gap: 14px;
  }

  .date-pill {
    width: 100%;
    border-radius: 999px;
    font-size: 16px;
    padding: 12px 14px;
  }

  .hero-strip {
    padding: 16px;
    gap: 16px;
    width: 100%;
    max-width: 100%;
  }

  #overviewView .hero-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-strip h3 {
    font-size: 20px;
    line-height: 1.18;
    max-width: 100%;
    word-break: break-word;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    min-width: 0;
  }

  .compact-label {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .compact-label select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 52px;
    padding-left: 14px;
    font-size: 16px;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
    min-height: 50px;
    white-space: normal;
    justify-content: center;
    text-align: center;
    overflow: hidden;
  }

  h2 {
    font-size: clamp(30px, 10vw, 34px);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  h3 {
    font-size: 22px;
    line-height: 1.16;
  }

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

  .metric-card,
  .content-band,
  .analysis-panel,
  .setup-grid {
    padding: 16px;
  }

  .metric-card strong {
    font-size: 34px;
  }

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

  .nav-submenu {
    grid-template-columns: 1fr;
  }

  .time-block,
  .task-card,
  .meeting-card,
  .finance-card,
  .note-card,
  .team-card,
  .employee-profile-card {
    grid-template-columns: 1fr;
  }

  .person-avatar,
  .employee-profile-card .person-avatar {
    width: 84px;
    height: 84px;
  }

  table {
    min-width: 520px;
  }
}

@media (max-width: 380px) {
  .main-panel {
    padding: 72px 10px 16px;
  }

  .hero-strip {
    padding: 14px;
  }

  .hero-strip h3 {
    font-size: 18px;
  }

  .compact-label select,
  .primary-action,
  .secondary-action {
    font-size: 15px;
  }
}
