:root {
  color-scheme: light;
  --background: #f6f7f9;
  --panel: #ffffff;
  --sidebar: #ffffff;
  --text: #172026;
  --muted: #667085;
  --line: #d9dee7;
  --accent: #1f6feb;
  --accent-hover: #195cc5;
  --button-text: #ffffff;
  --active-bg: #edf4ff;
  --active-text: #114a9f;
  --active-line: #aac8f7;
  --input-bg: #ffffff;
  --input-border: #c7cfdb;
  --focus-ring: rgb(31 111 235 / 14%);
  --secondary-bg: #ffffff;
  --secondary-hover: #f1f4f8;
  --surface-muted: #f9fafb;
  --table-bg: #ffffff;
  --table-heading-bg: #f9fafb;
  --table-heading-text: #475467;
  --panel-shadow: 0 10px 28px rgb(23 32 38 / 7%);
  --modal-backdrop: rgb(23 32 38 / 42%);
  --modal-shadow: 0 18px 48px rgb(23 32 38 / 20%);
  --success-bg: #e8f5ee;
  --success-text: #156f45;
  --warn-bg: #fff2d9;
  --warn-text: #875300;
  --danger-bg: #fde7e7;
  --danger-text: #a41919;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #0f141b;
  --panel: #151c25;
  --sidebar: #111820;
  --text: #e5edf5;
  --muted: #9aa8b8;
  --line: #2b3746;
  --accent: #6aa8ff;
  --accent-hover: #8bbdff;
  --button-text: #08111c;
  --active-bg: #173457;
  --active-text: #d2e5ff;
  --active-line: #376aaf;
  --input-bg: #101720;
  --input-border: #3a4859;
  --focus-ring: rgb(106 168 255 / 22%);
  --secondary-bg: #121a23;
  --secondary-hover: #1c2632;
  --surface-muted: #111923;
  --table-bg: #121a23;
  --table-heading-bg: #18212d;
  --table-heading-text: #b7c3d0;
  --panel-shadow: 0 10px 30px rgb(0 0 0 / 28%);
  --modal-backdrop: rgb(0 0 0 / 58%);
  --modal-shadow: 0 18px 54px rgb(0 0 0 / 42%);
  --success-bg: #123828;
  --success-text: #8bd9ad;
  --warn-bg: #3a2b12;
  --warn-text: #ffd47a;
  --danger-bg: #43191d;
  --danger-text: #ff9ca3;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--text);
}

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

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.2rem;
  line-height: 1.08;
}

h2 {
  margin-bottom: 6px;
  font-size: 1.12rem;
  line-height: 1.25;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-panel,
.entry-panel,
.list-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--panel-shadow);
}

.auth-panel {
  width: min(100%, 420px);
  padding: 24px;
}

.app-frame {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.mobile-app-bar {
  display: none;
}

.mobile-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--line);
  padding: 0;
  background: var(--secondary-bg);
  color: var(--text);
}

.mobile-menu-button:hover {
  background: var(--secondary-hover);
}

.hamburger-icon {
  display: grid;
  width: 20px;
  gap: 4px;
}

.hamburger-icon span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-app-title {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 1px;
}

.mobile-app-title .eyebrow {
  margin: 0;
  font-size: 0.68rem;
}

.mobile-app-title strong {
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: var(--modal-backdrop);
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: 100vh;
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  background: var(--sidebar);
}

.sidebar-brand {
  padding: 8px 8px 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-main {
  display: grid;
  gap: 18px;
}

.sidebar-menu {
  display: grid;
  gap: 6px;
}

.settings-nav,
.company-nav,
.employee-nav {
  display: grid;
  gap: 6px;
}

.settings-toggle {
  justify-content: space-between;
  gap: 10px;
}

.settings-chevron {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 160ms ease;
}

.settings-nav.is-open .settings-chevron,
.company-nav.is-open .settings-chevron,
.employee-nav.is-open .settings-chevron {
  transform: rotate(180deg);
}

.settings-panel {
  display: grid;
  gap: 8px;
  padding: 4px 0 4px 10px;
}

.settings-subtab {
  min-height: 36px;
  padding-left: 14px;
  font-size: 0.92rem;
}

.settings-panel .theme-switcher {
  border-left: 2px solid var(--line);
  padding: 4px 0 4px 12px;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px 8px 0;
}

.session-user {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-content {
  min-width: 0;
  padding: 24px clamp(18px, 4vw, 40px) 48px;
}

.tab-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.tab-button.active,
.tab-button:hover {
  background: var(--active-bg);
  color: var(--active-text);
}

.workspace-grid,
.admin-grid,
.employees-grid,
.todos-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 24px;
}

.dashboard-layout,
.companies-layout,
.archive-layout,
.employees-layout,
.todos-layout,
.emails-layout,
.tags-layout {
  display: grid;
  gap: 24px;
}

.entry-panel,
.list-panel {
  min-width: 0;
  padding: 24px;
}

.entry-panel {
  align-self: start;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.panel-divider {
  height: 1px;
  margin: 24px 0;
  background: var(--line);
}

.row-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.list-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.mailbox-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.mailbox-tabs .active-filter {
  border-color: var(--active-line);
  background: var(--active-bg);
  color: var(--active-text);
}

.dashboard-heading {
  margin-bottom: 0;
}

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

.dashboard-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-top-width: 4px;
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--panel-shadow);
}

.dashboard-card-alert {
  border-top-color: var(--danger-text);
}

.dashboard-card-today {
  border-top-color: var(--warn-text);
}

.dashboard-card-upcoming {
  border-top-color: var(--success-text);
}

.dashboard-card-mail {
  border-top-color: var(--accent);
}

.dashboard-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-card-label {
  margin-bottom: 2px;
  font-size: 0.95rem;
  font-weight: 780;
}

.dashboard-card-meta,
.dashboard-mail-text,
.dashboard-more {
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-count {
  font-size: 2rem;
  line-height: 1;
}

.dashboard-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.dashboard-list-item {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.dashboard-list-meta {
  display: grid;
  gap: 3px;
}

.dashboard-list-text {
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.dashboard-mail-text,
.dashboard-more {
  margin: 16px 0 0;
}

.stacked-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.divided {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--text);
  background: var(--input-bg);
  outline: none;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

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

.form-grid.compact {
  grid-template-columns: 110px minmax(0, 1fr);
}

.company-location-grid {
  grid-template-columns: 90px 120px minmax(0, 1fr);
}

.employee-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

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

.compact-heading {
  margin-bottom: 10px;
}

.compact-heading h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
}

.geocode-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-muted);
}

.geocode-result {
  display: grid;
  gap: 12px;
}

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

.coordinate-list div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.coordinate-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.coordinate-list dd {
  margin: 0;
  font-weight: 760;
}

.form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

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

.checkbox-row input {
  width: auto;
  min-height: auto;
}

.invite-result {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

body.modal-open {
  overflow: hidden;
}

body.sidebar-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 22px;
  background: var(--modal-backdrop);
}

.modal-panel {
  width: min(100%, 580px);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--panel);
  box-shadow: var(--modal-shadow);
}

.modal-panel.detail-modal {
  width: min(100%, 820px);
}

.inline-form-panel {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: var(--accent);
  color: var(--button-text);
  font-weight: 720;
  cursor: pointer;
}

button:hover {
  background: var(--accent-hover);
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--secondary-bg);
  color: var(--text);
}

.secondary-button:hover {
  background: var(--secondary-hover);
}

.danger-subtle-button {
  border-color: var(--danger-text);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.danger-subtle-button:hover {
  background: var(--danger-bg);
  filter: brightness(0.96);
}

.theme-switcher {
  display: grid;
  gap: 8px;
}

.theme-switcher-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--secondary-bg);
}

.theme-option {
  min-height: 34px;
  border-radius: 0;
  padding: 0 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.theme-option + .theme-option {
  border-left: 1px solid var(--line);
}

.theme-option:hover {
  background: var(--secondary-hover);
}

.theme-option.active {
  background: var(--active-bg);
  color: var(--active-text);
}

.sidebar-footer .secondary-button {
  width: 100%;
  justify-content: center;
}

.compact-button {
  min-height: 34px;
  padding: 0 12px;
}

.tag-picker {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.tag-picker legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
}

.tag-picker-options,
.tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--secondary-bg);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 680;
  cursor: pointer;
}

.tag-option input {
  width: auto;
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.employee-row-select {
  margin-top: 3px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--active-line);
  border-radius: 999px;
  padding: 0 10px;
  background: var(--active-bg);
  color: var(--active-text);
  font-size: 0.82rem;
  font-weight: 760;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.note-panel {
  display: grid;
  gap: 16px;
}

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

.note-item,
.todo-history-item,
.email-history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-muted);
}

.note-meta {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.note-text {
  margin-bottom: 0;
  white-space: pre-wrap;
}

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

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

.email-history-received {
  border-color: color-mix(in srgb, var(--success-text) 26%, var(--line));
  background: color-mix(in srgb, var(--success-bg) 58%, var(--surface-muted));
}

.email-history-sent {
  border-color: color-mix(in srgb, var(--danger-text) 22%, var(--line));
  background: color-mix(in srgb, var(--danger-bg) 50%, var(--surface-muted));
}

.todo-history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.todo-history-text {
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.todo-history-details {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.email-history-subject {
  margin-bottom: 8px;
  font-weight: 760;
}

.email-history-details {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.attachment-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 9px;
  color: var(--accent);
  background: var(--panel);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.attachment-link:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}

.email-history-body {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.email-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.email-detail h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.3;
}

.email-detail .email-history-body {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.email-subject-cell {
  max-width: 320px;
}

.email-preview {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.todo-history-action {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.empty-inline {
  margin-bottom: 0;
  color: var(--muted);
}

.form-status {
  min-height: 22px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.form-status.success {
  color: var(--success-text);
}

.form-status.error {
  color: var(--danger-text);
}

.table-wrap {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  background: var(--table-bg);
}

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

th {
  color: var(--table-heading-text);
  background: var(--table-heading-bg);
  font-size: 0.8rem;
  font-weight: 760;
  text-transform: uppercase;
}

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

.companies-table,
.archive-companies-table {
  table-layout: fixed;
}

.companies-table th:nth-child(1),
.companies-table td:nth-child(1) {
  width: 16%;
}

.companies-table th:nth-child(2),
.companies-table td:nth-child(2) {
  width: 24%;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.companies-table th:nth-child(3),
.companies-table td:nth-child(3) {
  width: 12%;
  overflow-wrap: anywhere;
}

.companies-table th:nth-child(4),
.companies-table td:nth-child(4) {
  width: 20%;
  overflow-wrap: anywhere;
}

.companies-table th:nth-child(5),
.companies-table td:nth-child(5) {
  width: 28%;
}

.archive-companies-table th:nth-child(1),
.archive-companies-table td:nth-child(1) {
  width: 16%;
}

.archive-companies-table th:nth-child(2),
.archive-companies-table td:nth-child(2) {
  width: 24%;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.archive-companies-table th:nth-child(3),
.archive-companies-table td:nth-child(3) {
  width: 11%;
  overflow-wrap: anywhere;
}

.archive-companies-table th:nth-child(4),
.archive-companies-table td:nth-child(4) {
  width: 19%;
  overflow-wrap: anywhere;
}

.archive-companies-table th:nth-child(5),
.archive-companies-table td:nth-child(5) {
  width: 12%;
}

.archive-companies-table th:nth-child(6),
.archive-companies-table td:nth-child(6) {
  width: 18%;
}

.companies-table .compact-button,
.archive-companies-table .compact-button {
  white-space: nowrap;
}

.strong {
  font-weight: 760;
}

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

.notes-cell {
  max-width: 260px;
  color: var(--muted);
  white-space: pre-wrap;
}

.todo-text-cell {
  max-width: 340px;
  white-space: pre-wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.82rem;
  font-weight: 760;
  white-space: nowrap;
}

.status-ok {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-warning {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.status-error {
  background: var(--danger-bg);
  color: var(--danger-text);
}

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

@media (max-width: 980px) {
  .app-frame {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .workspace-grid,
  .admin-grid,
  .employees-grid,
  .companies-layout,
  .employees-layout,
  .emails-layout,
  .todos-layout,
  .todos-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .app-frame {
    display: block;
    min-height: 100vh;
  }

  .mobile-app-bar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 60px;
    border-bottom: 1px solid var(--line);
    padding: 8px 14px;
    background: var(--sidebar);
    box-shadow: 0 8px 20px rgb(23 32 38 / 8%);
  }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(86vw, 320px);
    max-width: calc(100vw - 32px);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: 18px 0 36px rgb(23 32 38 / 20%);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

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

  .sidebar-main {
    gap: 14px;
  }

  .sidebar-menu {
    grid-template-columns: 1fr;
  }

  .sidebar-footer {
    grid-template-columns: 1fr;
    align-items: center;
    padding-top: 12px;
  }

  .app-content {
    padding: 16px 12px 36px;
  }

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

  .entry-panel,
  .list-panel,
  .auth-panel {
    padding: 18px;
  }

  .form-grid,
  .form-grid.compact,
  .form-grid.equal,
  .company-location-grid,
  .employee-filter-row,
  .dashboard-grid,
  .list-controls,
  .coordinate-list,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .header-actions {
    justify-content: stretch;
  }

  .header-actions button {
    width: 100%;
  }

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

  .modal-panel {
    max-height: calc(100vh - 24px);
    padding: 18px;
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .app-sidebar {
    transition: none;
  }
}
