:root {
  font-family:
    Inter,
    Segoe UI Variable,
    Segoe UI,
    sans-serif;
  color: var(--text);
  background: var(--app);
  font-synthesis: none;
  --app: #050b18;
  --sidebar: #07142a;
  --sidebar-border: #17305a;
  --card: #0b1628;
  --elevated: #0e1b30;
  --border: #243a5d;
  --text: #f8fafc;
  --secondary: #9eabc0;
  --muted: #6f7d92;
  --blue: #3b82f6;
  --violet: #6d4cff;
  --cyan: #00b8f5;
  --gold: #f4b400;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
  --focus: 0 0 0 3px rgba(59, 130, 246, 0.35);
}
:root[data-theme="light"] {
  --app: #f4f7fb;
  --sidebar: #fff;
  --sidebar-border: #dce4ef;
  --card: #fff;
  --elevated: #f8fafd;
  --border: #d7e0ec;
  --text: #12213b;
  --secondary: #5f6f85;
  --muted: #8a96a8;
  --blue: #2563eb;
  --violet: #6246ea;
  --cyan: #0891b2;
  --gold: #d98b00;
  --success: #168866;
  --warning: #d97706;
  --danger: #dc3545;
  --shadow: 0 14px 34px rgba(30, 55, 90, 0.09);
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.24);
}
* {
  box-sizing: border-box;
}
html {
  background: var(--app);
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--app);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  transition:
    color 0.18s,
    background 0.18s,
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 0;
  box-shadow: var(--focus);
}
a {
  color: inherit;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  background: var(--app);
}
.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  border: 1px solid var(--sidebar-border);
  border-radius: 0 28px 28px 0;
  background: var(--sidebar);
  padding: 28px 22px 24px;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.04em;
  padding: 4px 10px 22px;
}
.brand img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: contain;
  border-radius: 0;
}
.sidebar nav {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}
.nav-link {
  min-height: 58px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--secondary);
  font-size: 17px;
  font-weight: 700;
}
.nav-link svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}
.nav-link:hover {
  color: var(--text);
  background: var(--elevated);
  border-color: var(--border);
}
.nav-link.active {
  color: #fff;
  background: linear-gradient(110deg, #2346b8, #5d36eb);
  border-color: #6578ff;
  box-shadow: 0 8px 24px #4846f038;
}
:root[data-theme="light"] .nav-link.active {
  color: #fff;
}
.nav-divider {
  height: 1px;
  background: var(--sidebar-border);
  margin: 17px 14px;
}
.sidebar-agency {
  margin-top: auto;
  border-top: 1px solid var(--sidebar-border);
  padding: 20px 14px 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--secondary);
}
.sidebar-agency strong {
  font-size: 17px;
  color: var(--text);
}
.sidebar-agency a,
.agency-detail {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  text-decoration: none;
}
.sidebar-agency svg {
  width: 16px;
  flex: 0 0 16px;
}
.sidebar-agency a:hover {
  color: var(--blue);
}
.signout-button {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--secondary);
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 8px 0;
  cursor: pointer;
}
.signout-button:hover {
  color: var(--danger);
}
.sidebar-close,
.mobile-menu-button,
.sidebar-scrim {
  display: none;
}
.content {
  min-width: 0;
  width: 100%;
  padding: 37px 42px 48px;
  max-width: 1700px;
  margin: auto;
}
.page-header,
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}
.page-header h1,
.dashboard-header h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0 0 7px;
}
.page-header p,
.dashboard-header p {
  color: var(--secondary);
  font-size: 17px;
  margin: 0;
}
.dashboard-header time {
  font-size: 15px;
  color: var(--secondary);
  font-weight: 650;
  padding-top: 8px;
}
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.section-card,
.dashboard-action-card,
.dashboard-list-card,
.tool-card,
.staff-card,
.data-table-wrap,
.auth-card,
.content-card,
.property-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.dashboard-top-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.dashboard-action-card {
  min-height: 286px;
  padding: 22px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  color: var(--text);
}
a.dashboard-action-card:hover,
.dashboard-list-card:hover {
  transform: translateY(-2px);
  border-color: #526f9c;
}
.card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}
.card-heading h2 {
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.02em;
}
.dashboard-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #6d4cff1f;
  border: 1px solid rgba(109, 76, 255, 0.38);
  color: #8a6dff;
}
.dashboard-icon svg {
  width: 27px;
}
.dashboard-icon.blue {
  color: var(--blue);
  background: #3b82f61f;
  border-color: #3b82f659;
}
.dashboard-icon.cyan {
  color: var(--cyan);
  background: #00b8f51a;
  border-color: #00b8f552;
}
.dashboard-icon.orange {
  color: #ff6b35;
  background: #ff6b351a;
  border-color: #ff6b354d;
}
.dashboard-icon.gold {
  color: var(--gold);
  background: #f4b4001a;
  border-color: #f4b40052;
}
.dashboard-action-card > p {
  color: var(--secondary);
  line-height: 1.55;
  margin: 26px 0 20px;
}
.dashboard-button {
  margin-top: auto;
  min-height: 49px;
  border-radius: 10px;
  background: linear-gradient(100deg, #335df0, #6d2ce9);
  display: grid;
  place-items: center;
  font-weight: 750;
  color: #fff;
  border: 1px solid #6f6bff;
}
.dashboard-button.secondary {
  background: transparent;
  color: #876dff;
}
.voicemail-counts {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.voicemail-counts span {
  display: flex;
  align-items: center;
  gap: 9px;
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
}
.dot.danger {
  background: var(--danger);
}
.dot.success {
  background: var(--success);
}
.dashboard-links {
  display: grid;
  gap: 17px;
  margin-top: 27px;
}
.dashboard-links a {
  color: #6f65ff;
  text-decoration: none;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
}
.dashboard-links a:hover {
  color: #9d94ff;
}
.dashboard-lower-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.dashboard-list-card {
  min-height: 275px;
  padding: 22px;
  color: var(--text);
  text-decoration: none;
}
.dashboard-list-card ul {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}
.dashboard-list-card li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.dashboard-list-card li strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-list-card li span,
.dashboard-list-card li time {
  font-size: 13px;
  color: var(--secondary);
}
.daily-tip {
  margin-top: 22px;
  min-height: 116px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-color: #f4b4008c;
  background: linear-gradient(100deg, rgba(244, 180, 0, 0.08), var(--card) 45%);
}
.daily-tip h2 {
  margin: 0 0 8px;
}
.daily-tip p {
  margin: 0;
  color: var(--secondary);
  font-size: 16px;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.tool-card {
  min-height: 150px;
  padding: 21px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  color: var(--text);
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: #526f9c;
}
.tool-icon {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #6d4cff1c;
  border: 1px solid rgba(109, 76, 255, 0.28);
  color: #856dff;
}
.tool-icon svg {
  width: 30px;
}
.tool-card h2 {
  font-size: 20px;
  margin: 0 0 7px;
}
.tool-card p {
  color: var(--secondary);
  margin: 0;
  line-height: 1.45;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tabs button {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--secondary);
  border-radius: 10px;
  padding: 11px 17px;
  font-weight: 700;
  cursor: pointer;
}
.tabs button:hover {
  color: var(--text);
  border-color: #526f9c;
}
.tabs button.active {
  background: #6d4cff29;
  border-color: #6d62cb;
  color: var(--text);
}
.content-grid,
.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.content-card,
.staff-card {
  padding: 21px;
}
.content-card h2,
.staff-card h2 {
  margin: 0 0 8px;
}
.content-card p {
  color: var(--secondary);
  line-height: 1.5;
}
.staff-card {
  display: flex;
  gap: 15px;
}
.avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #6d4cff24;
  color: #927fff;
  font-weight: 800;
}
.staff-card a,
.staff-card span {
  display: block;
  margin-top: 7px;
  color: var(--secondary);
}
.staff-card a:hover {
  color: var(--blue);
}
.primary-button,
.secondary-button,
.danger-button,
.table-button,
.primary,
.secondary {
  min-height: 42px;
  padding: 0 17px;
  border-radius: 9px;
  font-weight: 750;
  cursor: pointer;
}
.primary-button,
.primary {
  border: 1px solid #6f6bff;
  background: linear-gradient(100deg, #335df0, #6d2ce9);
  color: #fff;
}
.primary-button:hover,
.primary:hover {
  filter: brightness(1.08);
}
.secondary-button,
.secondary,
.table-button {
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
}
.secondary-button:hover,
.secondary:hover,
.table-button:hover {
  border-color: #59719a;
}
.danger-button {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: #ef44441f;
  color: #ff7b7b;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.icon-button {
  border: 0;
  background: transparent;
  color: var(--secondary);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-button:hover {
  background: var(--elevated);
  color: var(--text);
}
label {
  display: grid;
  gap: 7px;
  color: var(--secondary);
  font-weight: 650;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
  border-radius: 9px;
  padding: 11px 13px;
}
input,
select {
  min-height: 44px;
}
textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}
.search-field {
  width: min(420px, 100%);
  position: relative;
  display: block;
}
.search-field svg {
  position: absolute;
  left: 13px;
  top: 13px;
  width: 18px;
  color: var(--muted);
}
.search-field input {
  padding-left: 42px;
}
.data-table-wrap {
  overflow: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}
.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--secondary);
  background: var(--elevated);
}
.data-table tbody tr:hover {
  background: #3b82f60b;
}
.row-actions {
  display: flex;
  gap: 10px;
}
.row-actions button {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  padding: 5px;
}
.row-actions .danger-text {
  color: var(--danger);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  background: var(--elevated);
  color: var(--secondary);
}
.status-badge.success {
  background: #22c55e1f;
  color: var(--success);
}
.status-badge.warning {
  background: #f59e0b1f;
  color: var(--warning);
}
.status-badge.danger {
  background: #ef44441f;
  color: var(--danger);
}
.empty-state {
  min-height: 115px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--secondary);
  gap: 6px;
}
.empty-state strong {
  color: var(--secondary);
  font-size: 16px;
}
.loading-state {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--secondary);
}
.spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.error-state,
.notice {
  display: flex;
  gap: 13px;
  padding: 16px;
  border-radius: 11px;
  border: 1px solid rgba(239, 68, 68, 0.38);
  background: #ef444414;
  color: var(--text);
  margin-bottom: 18px;
}
.error-state svg {
  color: var(--danger);
  flex: 0 0 auto;
}
.error-state p {
  color: var(--secondary);
  margin: 5px 0 10px;
}
.notice {
  border-color: #f59e0b66;
  background: #f59e0b14;
}
.modal-open {
  overflow: hidden;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #00050eb8;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  width: min(650px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 28px 80px #00000073;
}
.modal > header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.modal h2 {
  margin: 0;
  font-size: 21px;
}
.modal-form {
  padding: 21px;
  display: grid;
  gap: 15px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.modal-form footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 5px;
}
.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 10px;
  z-index: 200;
}
.toast {
  min-width: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 11px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast svg {
  width: 20px;
}
.toast.success svg {
  color: var(--success);
}
.toast.error svg {
  color: var(--danger);
}
.confirmation-dialog {
  width: min(470px, 100%);
}
.confirmation-dialog > p {
  padding: 22px;
  margin: 0;
  color: var(--secondary);
  line-height: 1.55;
}
.confirmation-dialog > footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 22px 22px;
}
.auth-page,
.center-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: min(430px, 100%);
  padding: 32px;
  display: grid;
  gap: 17px;
}
.auth-card h1 {
  margin: 3px 0;
}
.brand.large {
  padding: 0;
  font-size: 36px;
}
.message {
  color: var(--danger);
}
.assistant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.editor-card {
  padding: 20px;
  display: grid;
  gap: 14px;
}
.editor-card textarea {
  min-height: 390px;
}
.search-card {
  padding: 20px;
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}
.search-card label {
  min-width: 280px;
  flex: 1;
}
.counter {
  white-space: nowrap;
  padding-bottom: 13px;
  color: var(--secondary);
}
.results-card {
  padding: 24px;
}
.results-card dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.results-card dl div {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.results-card dt {
  font-size: 12px;
  color: var(--secondary);
}
.results-card dd {
  margin: 4px 0 0;
  font-weight: 700;
}
.attribution {
  color: var(--muted);
  font-size: 13px;
}
.property-card {
  padding: 20px;
  display: grid;
  gap: 10px;
  text-decoration: none;
}
.property-card:hover {
  transform: translateY(-2px);
  border-color: #526f9c;
}
.notepad {
  width: 100%;
  min-height: 65vh;
  background: color-mix(in srgb, var(--card) 88%, #f4b400 12%);
}
.settings-layout,
.help-layout {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 20px;
}
.settings-menu,
.help-menu {
  position: sticky;
  top: 28px;
  align-self: start;
  display: grid;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.settings-menu a,
.help-menu a,
.settings-menu strong {
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
}
.settings-menu a:hover,
.help-menu a:hover,
.settings-menu a.active {
  background: var(--elevated);
  color: var(--blue);
}
.settings-card,
.help-card {
  padding: 22px;
  margin-bottom: 16px;
}
.inline-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.inline-form label {
  flex: 1;
  min-width: 180px;
}
.link-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.link-list a {
  padding: 12px;
  border-radius: 8px;
  background: var(--elevated);
  text-decoration: none;
  color: var(--blue);
}
@media (max-width: 1250px) {
  .dashboard-top-grid,
  .dashboard-lower-grid,
  .tool-grid,
  .content-grid,
  .staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: 0;
    transform: translate(-102%);
    width: min(320px, 88vw);
    border-radius: 0 25px 25px 0;
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translate(0);
  }
  .sidebar-close {
    display: grid;
    margin-left: auto;
  }
  .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    background: #0000008c;
    z-index: 35;
  }
  .mobile-menu-button {
    display: grid;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 30;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
  }
  .content {
    padding: 76px 24px 35px;
  }
  .settings-layout,
  .help-layout {
    grid-template-columns: 1fr;
  }
  .settings-menu,
  .help-menu {
    position: static;
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .content {
    padding: 74px 16px 28px;
  }
  .page-header,
  .dashboard-header {
    display: grid;
  }
  .page-header h1,
  .dashboard-header h1 {
    font-size: 29px;
  }
  .dashboard-header time {
    grid-row: 2;
  }
  .dashboard-top-grid,
  .dashboard-lower-grid,
  .tool-grid,
  .content-grid,
  .staff-grid,
  .assistant-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-action-card {
    min-height: 235px;
  }
  .dashboard-list-card {
    min-height: 220px;
  }
  .form-row,
  .results-card dl,
  .link-list {
    grid-template-columns: 1fr;
  }
  .search-card {
    display: grid;
  }
  .settings-menu,
  .help-menu {
    grid-template-columns: 1fr 1fr;
  }
  .daily-tip {
    align-items: flex-start;
  }
  .modal-backdrop {
    padding: 10px;
  }
  .modal {
    max-height: calc(100vh - 20px);
  }
}

/* Shared page layout: all routed content uses the same top-left bounds. */
.content {
  align-self: stretch;
  max-width: none;
  margin: 0;
  padding: 32px clamp(24px, 3vw, 40px) 48px;
}
.content > section,
.content > .page-container {
  width: 100%;
  max-width: 1600px;
  margin: 0;
}
.page-header,
.dashboard-header {
  width: 100%;
  align-items: flex-start;
  margin-bottom: 24px;
}
.page-header > div:first-child,
.dashboard-header > div:first-child {
  min-width: 0;
}
.header-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}
.tool-grid,
.content-grid,
.staff-grid {
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 20px;
}
.data-table-wrap,
.settings-layout,
.help-layout,
.assistant-grid,
.search-card,
.results-card {
  width: 100%;
}
@media (max-width: 1024px) {
  .content {
    padding: 76px 24px 36px;
  }
}
@media (max-width: 768px) {
  .content {
    padding: 74px 16px 28px;
  }
  .page-header,
  .dashboard-header {
    gap: 16px;
    margin-bottom: 20px;
  }
  .header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
@media (max-width: 390px) {
  .content {
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (max-width: 390px) {
  .content {
    padding-left: 12px;
    padding-right: 12px;
  }
  .dashboard-header h1 {
    font-size: 26px;
  }
  .section-card,
  .dashboard-action-card,
  .dashboard-list-card,
  .tool-card,
  .staff-card {
    border-radius: 13px;
  }
  .tool-card {
    align-items: flex-start;
  }
  .settings-menu,
  .help-menu {
    grid-template-columns: 1fr;
  }
  .toast-region {
    left: 12px;
    right: 12px;
  }
  .toast {
    min-width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
  }
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.theme-options button {
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
  border-radius: 11px;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.theme-options button.selected {
  border-color: var(--violet);
  box-shadow: var(--focus);
}
.theme-swatch {
  width: 30px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.theme-swatch.dark {
  background: #07142a;
}
.theme-swatch.light {
  background: #fff;
}
.theme-swatch.system {
  background: linear-gradient(90deg, #07142a 50%, #fff 50%);
}
.settings-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 15px 0 0;
}
.settings-details div {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.settings-details dt {
  font-size: 12px;
  color: var(--muted);
}
.settings-details dd {
  margin: 4px 0 0;
  font-weight: 700;
}
.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}
.section-title-row h2 {
  margin: 0;
}
.section-title-row p {
  color: var(--secondary);
  margin: 5px 0;
}
.settings-link-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.settings-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--elevated);
  border-radius: 10px;
}
.settings-link-row > a {
  display: grid;
  gap: 4px;
  text-decoration: none;
}
.settings-link-row > a span,
.permission-note {
  color: var(--secondary);
  font-size: 13px;
}
.staff-photo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: cover;
  border-radius: 13px;
}
.staff-copy {
  min-width: 0;
}
.staff-copy h2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.staff-actions {
  margin-top: 10px;
}
.checkbox-row {
  display: flex;
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 9px;
}
.checkbox-row input {
  width: 18px;
  height: 18px;
  min-height: 0;
}
.tabs a {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--secondary);
  border-radius: 10px;
  padding: 11px 17px;
  font-weight: 700;
  text-decoration: none;
}
.tabs a:hover {
  color: var(--text);
  border-color: #526f9c;
}
.glossary-list {
  display: grid;
  gap: 10px;
}
.glossary-row {
  display: grid;
  grid-template-columns: minmax(220px, 30%) 1fr;
  gap: 24px;
  padding: 17px 19px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.glossary-row h2 {
  font-size: 17px;
  margin: 0;
}
.glossary-row p {
  color: var(--secondary);
  line-height: 1.5;
  margin: 0;
}
.not-found {
  max-width: 570px;
  margin: 12vh auto;
  padding: 45px;
  text-align: center;
}
.not-found > span {
  font-size: 54px;
  color: var(--violet);
  font-weight: 900;
}
.not-found h1 {
  font-size: 30px;
}
.not-found p {
  color: var(--secondary);
  margin-bottom: 28px;
}
.not-found a {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}
.training-card {
  display: block;
  color: var(--text);
  text-decoration: none;
}
.training-card:hover {
  transform: translateY(-2px);
  border-color: #526f9c;
}
.training-link {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  font-weight: 750;
  margin-top: 16px;
}
.training-link svg {
  width: 16px;
}
.access-state {
  max-width: 650px;
  margin: 10vh auto;
  padding: 34px;
}
.access-state h1 {
  margin-top: 0;
}
.access-state p {
  color: var(--secondary);
  line-height: 1.6;
  margin-bottom: 22px;
}
.address-search-card {
  position: relative;
}
.address-combobox {
  position: relative;
  flex: 1;
  min-width: 280px;
}
.address-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 7px);
  z-index: 20;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.address-suggestions button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 11px 12px;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
}
.address-suggestions button:hover,
.address-suggestions button:focus-visible {
  background: var(--elevated);
}
@media (max-width: 768px) {
  .theme-options,
  .settings-details {
    grid-template-columns: 1fr;
  }
  .settings-link-row {
    align-items: flex-start;
  }
  .glossary-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }
}

/* AgentOS Web UI 2.0 shared presentation system. */
:root {
  --shell-gap: 16px;
  --page-gutter: clamp(22px, 3vw, 48px);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --surface-glass: rgba(11, 22, 40, 0.82);
  --surface-soft: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(79, 103, 255, 0.09);
  --shadow-card: 0 18px 46px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 24px 62px rgba(0, 0, 0, 0.3);
}
:root[data-theme="light"] {
  --surface-glass: rgba(255, 255, 255, 0.86);
  --surface-soft: rgba(18, 33, 59, 0.035);
  --surface-hover: rgba(37, 99, 235, 0.07);
  --shadow-card: 0 16px 42px rgba(31, 50, 81, 0.09);
  --shadow-hover: 0 24px 58px rgba(31, 50, 81, 0.14);
}
html {
  scroll-behavior: smooth;
}
body {
  background:
    radial-gradient(
      circle at 72% -15%,
      rgba(59, 130, 246, 0.11),
      transparent 34rem
    ),
    radial-gradient(
      circle at 18% 105%,
      rgba(109, 76, 255, 0.09),
      transparent 30rem
    ),
    var(--app);
  font-size: 16px;
  line-height: 1.5;
}
.app-shell {
  grid-template-columns: 282px minmax(0, 1fr);
  gap: var(--shell-gap);
  padding: 12px 12px 12px 0;
  background: transparent;
}
.sidebar {
  top: 12px;
  height: calc(100vh - 24px);
  margin-left: 12px;
  padding: 24px 18px 20px;
  border-radius: var(--radius-xl);
  border-color: color-mix(in srgb, var(--sidebar-border) 82%, transparent);
  background: var(--surface-glass);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}
.brand {
  min-height: 72px;
  padding: 2px 12px 20px;
}
.brand img {
  max-width: 218px;
  filter: drop-shadow(0 8px 22px rgba(40, 102, 255, 0.18));
}
.sidebar nav {
  gap: 7px;
  margin-top: 9px;
}
.nav-link {
  position: relative;
  min-height: 56px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 16px;
  letter-spacing: -0.01em;
  overflow: hidden;
}
.nav-link::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  transition:
    background 180ms ease,
    box-shadow 180ms ease;
}
.nav-link:hover {
  transform: translateX(2px);
  background: var(--surface-hover);
  border-color: color-mix(in srgb, var(--border) 78%, transparent);
}
.nav-link.active {
  color: var(--text);
  background: linear-gradient(
    100deg,
    rgba(59, 130, 246, 0.2),
    rgba(109, 76, 255, 0.16)
  );
  border-color: rgba(112, 126, 255, 0.35);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.05),
    0 10px 30px rgba(31, 73, 180, 0.14);
}
.nav-link.active::before {
  background: linear-gradient(var(--cyan), var(--violet));
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.65);
}
:root[data-theme="light"] .nav-link.active {
  color: var(--text);
}
.sidebar-agency {
  margin: auto 4px 0;
  padding: 18px 12px 2px;
  border-top-color: color-mix(in srgb, var(--sidebar-border) 65%, transparent);
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
}
.sidebar-agency strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}
.content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 32px var(--page-gutter) 64px 18px;
}
.content > section,
.content > .page-container {
  width: 100%;
  max-width: 1600px;
  margin: 0;
  animation: page-enter 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.page-header,
.dashboard-header {
  min-height: 90px;
  padding: 8px 4px 20px;
  margin-bottom: 22px;
  align-items: flex-start;
}
.page-header h1,
.dashboard-header h1 {
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  margin-bottom: 10px;
}
.page-header p,
.dashboard-header p {
  max-width: 760px;
  font-size: 17px;
  line-height: 1.55;
}
.dashboard-header time {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--secondary);
}
.header-actions {
  gap: 12px;
  padding-top: 3px;
}
.primary,
.secondary,
.danger-button,
.table-button,
.icon-button,
.dashboard-button,
.tabs button,
.theme-options button {
  min-height: 44px;
  border-radius: 12px;
  font-weight: 750;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.primary {
  border-color: transparent;
  background: linear-gradient(120deg, var(--blue), var(--violet));
  box-shadow:
    0 10px 26px rgba(76, 79, 238, 0.24),
    inset 0 1px rgba(255, 255, 255, 0.18);
}
.primary:hover,
.dashboard-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow:
    0 16px 34px rgba(76, 79, 238, 0.3),
    inset 0 1px rgba(255, 255, 255, 0.2);
}
.secondary {
  background: var(--surface-soft);
  border-color: color-mix(in srgb, var(--border) 82%, transparent);
}
.secondary:hover,
.table-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  background: var(--surface-hover);
  border-color: color-mix(in srgb, var(--blue) 48%, var(--border));
}
.section-card,
.dashboard-action-card,
.dashboard-list-card,
.tool-card,
.staff-card,
.data-table-wrap,
.auth-card,
.content-card,
.property-card,
.search-card,
.results-card,
.editor-card,
.help-card {
  border-color: color-mix(in srgb, var(--border) 76%, transparent);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--card);
  box-shadow: var(--shadow-card);
}
.dashboard-action-card,
.dashboard-list-card,
.tool-card,
.staff-card,
.property-card,
.training-card {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}
a.dashboard-action-card:hover,
.dashboard-list-card:hover,
.tool-card:hover,
.staff-card:hover,
.property-card:hover,
.training-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--blue) 48%, var(--border));
  box-shadow: var(--shadow-hover);
}
.dashboard-top-grid,
.dashboard-lower-grid,
.tool-grid,
.staff-grid,
.content-grid {
  gap: 22px;
}
.dashboard-action-card {
  min-height: 300px;
  padding: 26px;
}
.dashboard-list-card,
.tool-card,
.staff-card,
.property-card,
.content-card,
.section-card {
  padding: 24px;
}
.dashboard-icon,
.tool-icon {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  border-radius: 17px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 10px 24px rgba(0, 0, 0, 0.12);
}
.dashboard-icon svg,
.tool-icon svg {
  width: 30px;
  height: 30px;
}
.card-heading h2,
.tool-card h2,
.staff-card h2,
.section-title-row h2 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.tool-card p,
.dashboard-action-card > p,
.content-card p {
  font-size: 16px;
  line-height: 1.6;
}
.daily-tip {
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(
      circle at 95% 50%,
      rgba(244, 180, 0, 0.12),
      transparent 26rem
    ),
    linear-gradient(110deg, rgba(244, 180, 0, 0.08), transparent 45%),
    var(--card);
  box-shadow: var(--shadow-card);
}
.data-table-wrap {
  padding: 8px 14px 14px;
  overflow-x: auto;
}
.data-table {
  border-collapse: separate;
  border-spacing: 0 8px;
}
.data-table th {
  padding: 13px 16px;
  background: transparent;
  border: 0;
  color: var(--secondary);
  font-size: 13px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.data-table td {
  min-height: 58px;
  padding: 16px;
  background: var(--surface-soft);
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
}
.data-table td:first-child {
  border-left: 1px solid transparent;
  border-radius: 12px 0 0 12px;
}
.data-table td:last-child {
  border-right: 1px solid transparent;
  border-radius: 0 12px 12px 0;
}
.data-table tbody tr:hover td {
  background: var(--surface-hover);
  border-color: color-mix(in srgb, var(--blue) 28%, transparent);
}
.status-badge,
.badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.inline-form,
.modal-form,
.form-row,
.search-card {
  gap: 18px;
}
label,
.inline-form label,
.search-card label {
  gap: 8px;
  color: var(--secondary);
  font-size: 14px;
  font-weight: 750;
}
input,
select,
textarea,
.search-field {
  border-radius: 12px;
  border-color: color-mix(in srgb, var(--border) 86%, transparent);
  background: color-mix(in srgb, var(--elevated) 88%, transparent);
}
input,
select {
  min-height: 48px;
  padding-inline: 14px;
}
textarea {
  padding: 14px;
  line-height: 1.55;
}
input:hover,
select:hover,
textarea:hover {
  border-color: color-mix(in srgb, var(--blue) 42%, var(--border));
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: var(--focus);
}
.modal-backdrop {
  background: rgba(2, 7, 18, 0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: backdrop-in 160ms ease both;
}
.modal,
.confirmation-dialog {
  border-radius: 24px;
  border-color: color-mix(in srgb, var(--blue) 25%, var(--border));
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(79, 70, 229, 0.1),
      transparent 24rem
    ),
    var(--card);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.48);
  animation: modal-in 200ms cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
@keyframes backdrop-in {
  from {
    opacity: 0;
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}
.modal > header {
  padding: 24px 26px 18px;
}
.modal-form {
  padding: 22px 26px 26px;
}
.modal-form footer,
.confirmation-dialog > footer {
  padding-top: 18px;
}
.empty-state,
.loading-state,
.error-state {
  min-height: 220px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}
.loading-state::after {
  content: "";
  width: min(320px, 60%);
  height: 10px;
  margin-top: 16px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(111, 125, 255, 0.34),
    transparent
  );
  background-size: 200% 100%;
  animation: loading-shimmer 1.2s linear infinite;
}
@keyframes loading-shimmer {
  to {
    background-position: -200% 0;
  }
}
.tabs {
  gap: 8px;
  padding: 5px;
  width: fit-content;
  border-radius: 14px;
  background: var(--surface-soft);
}
.tabs button,
.tabs a {
  border-color: transparent;
  background: transparent;
}
.tabs button.active {
  background: var(--card);
  border-color: color-mix(in srgb, var(--blue) 34%, var(--border));
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.13);
}
.toolbar {
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0 18px;
}
.toast {
  border-radius: 14px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 10px;
  }
  .sidebar {
    padding-inline: 14px;
  }
  .dashboard-top-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1024px) {
  .app-shell {
    display: block;
    padding: 0;
  }
  .content {
    padding: 84px 24px 48px;
  }
  .sidebar {
    top: 0;
    height: 100vh;
    margin: 0;
    border-radius: 0 24px 24px 0;
  }
}
@media (max-width: 768px) {
  .content {
    padding: 78px 16px 36px;
  }
  .page-header,
  .dashboard-header {
    min-height: 0;
    padding-bottom: 12px;
  }
  .page-header h1,
  .dashboard-header h1 {
    font-size: 34px;
  }
  .dashboard-top-grid,
  .dashboard-lower-grid,
  .assistant-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-action-card {
    min-height: 250px;
  }
  .data-table-wrap {
    border-radius: 16px;
    padding-inline: 8px;
  }
  .modal {
    border-radius: 20px;
  }
}
@media (max-width: 480px) {
  .content {
    padding-inline: 12px;
  }
  .page-header h1,
  .dashboard-header h1 {
    font-size: 31px;
  }
  .section-card,
  .dashboard-action-card,
  .dashboard-list-card,
  .tool-card,
  .staff-card,
  .property-card,
  .content-card {
    padding: 20px;
    border-radius: 18px;
  }
  .header-actions > * {
    flex: 1 1 auto;
  }
}
