:root {
  --navy: #001a36;
  --navy-soft: #06244a;
  --purple: #7048f5;
  --purple-2: #7f56ff;
  --teal: #19bf91;
  --blue: #2182f5;
  --orange: #ffae12;
  --red: #ff4f5e;
  --text: #071431;
  --muted: #5c6a86;
  --faint: #8c98b2;
  --line: #dce4ef;
  --canvas: #f8fbff;
  --card: #ffffff;
  --shadow: 0 15px 38px rgba(12, 30, 64, .06);
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 1180px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: #f8fbff;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.form-builder-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.builder-meta {
  display: grid;
  grid-template-columns: 1fr 220px 1fr auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
  padding: 18px;
}

.builder-meta label,
.builder-settings label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.builder-meta input,
.builder-meta select,
.builder-settings input,
.builder-settings select,
.builder-settings textarea,
.dynamic-field input,
.dynamic-field select,
.dynamic-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.builder-settings textarea,
.dynamic-field textarea {
  min-height: 96px;
  resize: vertical;
}

.builder-sidebar,
.builder-settings,
.builder-canvas {
  padding: 18px;
}

.builder-sidebar h2,
.builder-settings h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.field-palette {
  display: grid;
  gap: 9px;
}

.field-palette button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  font-weight: 700;
}

.field-palette svg,
.builder-field svg {
  width: 17px;
  height: 17px;
}

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

.builder-canvas-head strong,
.builder-canvas-head small {
  display: block;
}

.builder-canvas-head small {
  margin-top: 4px;
  color: var(--muted);
}

.builder-preview {
  display: grid;
  gap: 10px;
  min-height: 460px;
  padding: 16px;
  border: 1px dashed #cfd9e8;
  border-radius: 8px;
  background: #fbfdff;
}

.builder-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 34px 34px 34px;
  gap: 8px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: grab;
}

.builder-field.active {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(112, 72, 245, .1);
}

.builder-field strong,
.builder-field small {
  display: block;
}

.builder-field small {
  margin-top: 5px;
  color: var(--muted);
}

.builder-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.builder-field button,
.option-row button,
.row-actions .view-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
}

.builder-settings {
  display: grid;
  gap: 12px;
}

.field-settings-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfdff;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.builder-options {
  display: grid;
  gap: 10px;
}

.option-row {
  display: grid;
  grid-template-columns: 1fr 1fr 34px;
  gap: 8px;
  margin-bottom: 8px;
}

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

.dynamic-field {
  grid-column: span 12;
}

.dynamic-field.width-half {
  grid-column: span 6;
}

.dynamic-field.width-third {
  grid-column: span 4;
}

.dynamic-field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-weight: 800;
}

.dynamic-field em {
  color: var(--red);
  font-style: normal;
}

.dynamic-field small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.dynamic-options {
  display: grid;
  gap: 8px;
}

.compact-check,
.dynamic-options .compact-check,
.canvas-options span {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  line-height: 1.35;
}

.compact-check input[type="checkbox"],
.compact-check input[type="radio"],
.dynamic-options input[type="checkbox"],
.dynamic-options input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--purple);
}

.compact-check.inline-check {
  display: inline-grid;
  grid-template-columns: 18px auto;
  align-items: center;
  margin: 0 4px;
  white-space: nowrap;
}

.panel-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.dynamic-layout {
  display: grid;
  gap: 16px;
}

.dynamic-layout.columns-1 {
  grid-template-columns: 1fr;
}

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

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

.dynamic-layout-column {
  display: grid;
  gap: 14px;
  align-content: start;
}

.dynamic-container {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.dynamic-container legend {
  padding: 0 8px;
  font-weight: 850;
}

.field-heading h2,
.field-paragraph p {
  margin: 0;
}

.field-section {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: var(--muted);
}

.field-section span {
  height: 1px;
  background: var(--line);
}

.field-error {
  color: var(--red) !important;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.row-actions form {
  margin: 0;
}

.detail-list {
  display: grid;
  gap: 12px;
}

.detail-list div {
  display: grid;
  gap: 5px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-list span {
  color: var(--muted);
  font-weight: 700;
}

.detail-list strong {
  font-size: 15px;
  white-space: pre-wrap;
}

.content:has(.zoho-builder) {
  padding-bottom: 0;
}

.builder-alert {
  margin: 14px 22px 0;
}

.zoho-builder {
  min-height: calc(100vh - 82px);
  background: #eef3f8;
}

.builder-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 12px 22px;
  border-bottom: 1px solid #d8e1ee;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(12, 30, 64, .06);
}

.builder-title-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.builder-back,
.icon-tool {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  text-decoration: none;
}

.builder-title-input {
  width: min(420px, 34vw);
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  font-size: 20px;
  font-weight: 800;
  outline: 0;
}

.builder-title-block span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.builder-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.autosave-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #d8e1ee;
  border-radius: 999px;
  color: #53617d;
  background: #f8fbff;
  font-size: 12px;
  font-weight: 800;
}

.autosave-state svg,
.builder-toolbar svg,
.builder-back svg,
.icon-tool svg {
  width: 17px;
  height: 17px;
}

.zoho-builder-shell {
  display: grid;
  grid-template-columns: 292px minmax(560px, 1fr) 370px;
  min-height: calc(100vh - 156px);
}

.builder-library,
.builder-inspector {
  position: sticky;
  top: 74px;
  align-self: start;
  height: calc(100vh - 74px);
  overflow: auto;
  background: #fff;
}

.builder-library {
  border-right: 1px solid #d8e1ee;
}

.builder-inspector {
  border-left: 1px solid #d8e1ee;
}

.library-header,
.builder-inspector,
.builder-library {
  padding: 18px;
}

.library-header {
  padding: 0 0 14px;
}

.library-header strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
}

.library-header small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 600;
}

.library-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin-bottom: 14px;
  padding: 0 12px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #f8fbff;
}

.library-search input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: 0;
}

.library-group {
  border-bottom: 1px solid #edf1f7;
  padding: 8px 0 12px;
}

.library-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  border: 0;
  padding: 0;
  color: #20304d;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.library-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.library-group.collapsed .library-card-grid {
  display: none;
}

.library-field-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  padding: 8px;
  color: #1d2a44;
  background: #fff;
  box-shadow: 0 8px 18px rgba(12, 30, 64, .04);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.library-field-card:hover {
  border-color: var(--purple);
  box-shadow: 0 12px 24px rgba(112, 72, 245, .12);
  transform: translateY(-1px);
}

.library-field-card i,
.library-field-card svg {
  width: 18px;
  height: 18px;
  color: var(--purple);
}

.library-field-card span {
  overflow-wrap: anywhere;
}

.builder-workspace {
  min-width: 0;
  background: #eef3f8;
}

.workspace-tabs,
.builder-device-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid #d8e1ee;
  background: #f8fbff;
}

.workspace-tabs {
  justify-content: center;
}

.workspace-tabs button,
.builder-device-bar button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.workspace-tabs button.active,
.builder-device-bar button.active {
  border-color: #d8e1ee;
  color: var(--purple);
  background: #fff;
  box-shadow: 0 8px 18px rgba(12, 30, 64, .05);
}

.builder-device-bar span {
  color: var(--muted);
  font-weight: 800;
}

.builder-device-bar div {
  display: flex;
  gap: 7px;
}

.form-stage {
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 244px);
  padding: 32px;
  overflow: auto;
}

.form-paper {
  width: min(820px, 100%);
  min-height: 620px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(12, 30, 64, .1);
  transition: width .18s ease;
}

.form-paper.tablet-preview {
  width: 620px;
}

.form-paper-head {
  padding: 30px 34px 22px;
  border-bottom: 1px solid #edf1f7;
}

.form-paper-head h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 850;
}

.form-paper-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.canvas-dropzone {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  min-height: 430px;
  padding: 28px 34px 38px;
}

.builder-empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 360px;
  border: 1px dashed #c6d3e5;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfdff;
  text-align: center;
}

.builder-empty-state svg {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  color: var(--purple);
}

.builder-empty-state strong {
  max-width: 420px;
  color: var(--text);
  font-size: 17px;
}

.builder-empty-state p {
  max-width: 470px;
  margin: 7px 0 0;
}

.canvas-field {
  position: relative;
  grid-column: span 12;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: start;
  min-height: 84px;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.canvas-field.width-half {
  grid-column: span 6;
}

.canvas-field.width-third {
  grid-column: span 4;
}

.canvas-field:hover,
.canvas-field.active {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(112, 72, 245, .09), 0 12px 28px rgba(12, 30, 64, .08);
}

.canvas-field-handle,
.canvas-field-remove {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  color: var(--muted);
  background: #f8fbff;
}

.canvas-field-handle {
  cursor: grab;
}

.canvas-field-remove {
  width: 34px;
  height: 34px;
}

.canvas-field-preview label {
  display: block;
  margin-bottom: 8px;
  color: #17233c;
  font-weight: 850;
}

.canvas-field-preview em {
  color: var(--red);
  font-style: normal;
}

.canvas-field-preview input,
.canvas-field-preview select,
.canvas-field-preview textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
}

.canvas-field-preview textarea {
  min-height: 96px;
}

.canvas-field-preview small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.canvas-options {
  display: grid;
  gap: 8px;
}

.canvas-options span,
.canvas-upload,
.canvas-layout {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  color: var(--muted);
}

.canvas-layout-field {
  grid-column: 1 / -1;
}

.canvas-layout-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.canvas-layout-title small {
  margin: 0;
}

.canvas-layout-grid {
  display: grid;
  gap: 12px;
}

.canvas-layout-grid.columns-1 {
  grid-template-columns: 1fr;
}

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

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

.canvas-column-drop {
  display: grid;
  gap: 10px;
  min-height: 110px;
  padding: 10px;
  border: 1px dashed #c6d3e5;
  border-radius: 8px;
  background: #fbfdff;
}

.canvas-column-drop .canvas-field {
  grid-column: 1 / -1;
}

.column-empty {
  display: grid;
  place-items: center;
  min-height: 88px;
  color: var(--muted);
  font-weight: 800;
}

.rules-paper {
  min-height: 500px;
}

.rules-workbench {
  display: grid;
  gap: 14px;
  padding: 24px 34px;
}

.canvas-rating {
  display: flex;
  gap: 7px;
  color: var(--orange);
}

.canvas-upload {
  justify-content: center;
  min-height: 92px;
  border: 1px dashed #c6d3e5;
  border-radius: 8px;
  background: #fbfdff;
  font-weight: 800;
}

.canvas-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.canvas-divider span {
  height: 1px;
  background: #d8e1ee;
}

.canvas-field-ghost {
  opacity: .45;
}

.canvas-field-chosen {
  transform: scale(.99);
}

.inspector-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.inspector-tabs button {
  min-height: 38px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  color: var(--muted);
  background: #f8fbff;
  font-weight: 850;
}

.inspector-tabs button.active {
  color: var(--purple);
  background: #fff;
}

.builder-inspector [data-field-settings] {
  display: grid;
  gap: 13px;
}

.builder-inspector label,
.form-settings-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.builder-inspector input,
.builder-inspector select,
.builder-inspector textarea,
.form-settings-grid input,
.form-settings-grid select,
.form-settings-grid textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--text);
  background: #fff;
  outline: 0;
}

.builder-inspector textarea,
.form-settings-grid textarea {
  min-height: 86px;
  resize: vertical;
}

.inspector-field-head {
  padding: 14px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #f8fbff;
}

.inspector-field-head span {
  display: block;
  color: var(--purple);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.inspector-field-head strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

.builder-inspector details {
  display: grid;
  gap: 12px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.builder-inspector summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
}

.logic-builder {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.logic-builder > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.logic-rules {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.logic-rules div {
  display: grid;
  grid-template-columns: 1fr 32px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background: #f8fbff;
}

.logic-rules button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #fff;
}

.option-row {
  grid-template-columns: 20px 1fr 1fr auto 32px;
  align-items: center;
}

.builder-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 20, 49, .42);
}

.builder-modal[aria-hidden="true"] {
  display: none;
}

.builder-modal-card {
  width: min(760px, 100%);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(7, 20, 49, .26);
}

.builder-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid #edf1f7;
}

.builder-modal-head strong,
.builder-modal-head small {
  display: block;
}

.builder-modal-head small {
  margin-top: 4px;
  color: var(--muted);
}

.form-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px;
}

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

@media (max-width: 1320px) {
  .zoho-builder-shell {
    grid-template-columns: 260px minmax(480px, 1fr) 330px;
  }
}

@media (max-width: 1080px) {
  .zoho-builder-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .builder-inspector {
    grid-column: 1 / -1;
    position: static;
    height: auto;
    border-left: 0;
    border-top: 1px solid #d8e1ee;
  }

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

@media (max-width: 1180px) {
  .form-builder-shell {
    grid-template-columns: 1fr;
  }

  .builder-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  html {
    min-width: 0;
  }

  .dynamic-field.width-half,
  .dynamic-field.width-third {
    grid-column: span 12;
  }

  .dynamic-layout.columns-2,
  .dynamic-layout.columns-3,
  .canvas-layout-grid.columns-2,
  .canvas-layout-grid.columns-3 {
    grid-template-columns: 1fr;
  }

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns .22s ease;
}

body.sidebar-collapsed .dashboard-shell {
  grid-template-columns: 92px minmax(0, 1fr);
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 26px 12px 16px;
  background:
    radial-gradient(circle at 50% 18%, rgba(112, 72, 245, .2), transparent 150px),
    linear-gradient(180deg, #061831 0%, #00162f 100%);
  color: #fff;
  transition: transform .22s ease, padding .22s ease;
}

.sidebar-overlay {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 7px 34px;
  color: #fff;
  text-decoration: none;
}

.brand-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  color: #6df1c0;
}

.brand-logo::before,
.brand-logo::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 34px;
  border: 4px solid;
  border-radius: 24px 24px 7px 24px;
  transform: rotate(-42deg);
  opacity: .95;
}

.brand-logo::before {
  left: 2px;
  border-color: #7657ff;
}

.brand-logo::after {
  right: 2px;
  border-color: #27c79a;
  transform: rotate(42deg);
}

.brand-logo svg {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  color: #fff;
}

.brand strong {
  display: block;
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0;
  font-weight: 800;
}

.brand small {
  display: block;
  margin-top: 6px;
  color: #d6def0;
  font-size: 12px;
  font-weight: 500;
}

body.sidebar-collapsed .brand span:last-child,
body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .nav-stack p,
body.sidebar-collapsed .support-card,
body.sidebar-collapsed .sidebar-user span {
  display: none;
}

body.sidebar-collapsed .brand,
body.sidebar-collapsed .nav-item {
  justify-content: center;
  gap: 0;
}

body.sidebar-collapsed .sidebar {
  padding-left: 10px;
  padding-right: 10px;
}

body.sidebar-collapsed .sidebar-user {
  grid-template-columns: 42px;
  justify-content: center;
  height: 64px;
}

body.sidebar-collapsed .sidebar-user svg {
  display: none;
}

.nav-stack {
  display: grid;
  gap: 8px;
}

.nav-stack p {
  margin: 16px 18px 6px;
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  font-weight: 500;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 48px;
  padding: 0 19px;
  border-radius: 8px;
  color: #e7edf8;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.nav-item svg {
  width: 19px;
  height: 19px;
}

.nav-item.active {
  min-height: 49px;
  background: linear-gradient(135deg, #5f46e8, #7d4cf7);
  box-shadow: 0 14px 34px rgba(112, 72, 245, .28);
  color: #fff;
  font-weight: 700;
}

.support-card {
  margin: auto 0 28px;
  padding: 21px 18px 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #553bd6, #714bf0);
  box-shadow: 0 20px 40px rgba(28, 11, 104, .32);
}

.support-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 800;
}

.support-card span {
  display: block;
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 700;
}

.support-card button {
  width: 100%;
  height: 43px;
  border: 0;
  border-radius: 7px;
  color: #5d3ce4;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
}

.sidebar-user {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  height: 82px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(4, 25, 54, .72);
  color: #fff;
  text-align: left;
  text-decoration: none;
}

.sidebar-user img,
.avatar-btn img {
  border-radius: 50%;
  object-fit: cover;
}

.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  color: #1d2a44;
  font-weight: 900;
  text-transform: uppercase;
}

.avatar-initials {
  border: 2px solid rgba(255, 255, 255, .76);
}

.avatar-topbar {
  width: 43px;
  height: 43px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, .16);
  font-size: 13px;
}

.avatar-sidebar,
.sidebar-user img {
  width: 42px;
  height: 42px;
  font-size: 12px;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  font-size: 11px;
}

.avatar-md {
  width: 48px;
  height: 48px;
  font-size: 13px;
}

.avatar-xl {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  font-size: 28px;
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
}

.sidebar-user strong {
  font-weight: 800;
}

.sidebar-user small {
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 12px;
}

.sidebar-user svg {
  width: 16px;
  color: #d9e3f7;
}

.content {
  min-width: 0;
  background: var(--canvas);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 82px;
  padding: 0 26px 0 37px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 5px 24px rgba(15, 23, 42, .03);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 31px;
}

.topbar-right {
  gap: 22px;
}

.topbar-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.menu-btn,
.icon-btn,
.avatar-btn,
.date-select,
.panel-title button,
.view-btn,
.outline-full,
.outline-center {
  border: 0;
  background: transparent;
}

.menu-btn {
  display: grid;
  place-items: center;
  width: 20px;
  height: 34px;
  padding: 0;
  color: var(--text);
}

.menu-btn svg {
  width: 20px;
  height: 20px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 397px;
  height: 46px;
  padding: 0 17px;
  border: 1px solid #ccd7e6;
  border-radius: 7px;
  background: #fff;
  color: #9aa5ba;
}

.search-field svg {
  width: 19px;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
}

.search-field input::placeholder {
  color: #a6b0c3;
  font-weight: 600;
}

.global-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 80;
  width: min(560px, calc(100vw - 32px));
  max-height: 520px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(12, 30, 64, .16);
}

.global-search-panel[aria-hidden="true"] {
  display: none;
}

.global-search-group {
  display: grid;
  gap: 6px;
  padding: 6px 0;
}

.global-search-group + .global-search-group {
  border-top: 1px solid #edf1f7;
}

.global-search-group > strong {
  padding: 5px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.global-search-result {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}

.global-search-result:hover,
.global-search-result.active {
  background: #f6f8fc;
}

.global-search-result > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--purple);
  background: rgba(112, 72, 245, .1);
}

.global-search-result svg {
  width: 18px;
  height: 18px;
}

.global-search-result em,
.global-search-result b,
.global-search-result small {
  display: block;
  min-width: 0;
  font-style: normal;
}

.global-search-result b {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 21px;
  height: 28px;
  color: #0d1832;
  padding: 0;
}

.icon-btn svg {
  width: 21px;
}

.badge-btn::after {
  content: attr(data-count);
  position: absolute;
  top: -7px;
  right: -9px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--purple);
  font-size: 10px;
  font-weight: 800;
}

.badge-btn[data-count="0"]::after,
.badge-btn:not([data-count])::after {
  display: none;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  z-index: 50;
  width: 370px;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 56px rgba(12, 30, 64, .16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
}

.dropdown-panel[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 4px 12px;
  border-bottom: 1px solid #eef3f8;
}

.dropdown-head strong {
  font-size: 15px;
  font-weight: 900;
}

.dropdown-head a {
  color: var(--purple);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.dropdown-list {
  display: grid;
  max-height: 390px;
  overflow-y: auto;
  padding-top: 8px;
}

.dropdown-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px 8px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
}

.dropdown-row:hover,
.dropdown-row.unread {
  background: #f3f7ff;
}

.dropdown-row strong,
.dropdown-row small,
.dropdown-row em {
  display: block;
}

.dropdown-row strong {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 900;
}

.dropdown-row small {
  overflow: hidden;
  color: #5c6a86;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-row em {
  margin-top: 5px;
  color: #8c98b2;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.dropdown-row b {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #fff;
  background: var(--purple);
  font-size: 11px;
}

.dropdown-empty {
  padding: 18px 8px;
  color: #5c6a86;
  font-weight: 700;
  text-align: center;
}

.profile-dropdown {
  width: 210px;
}

.profile-dropdown a,
.profile-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
  background: #f3f7ff;
}

.profile-dropdown svg {
  width: 16px;
  color: var(--purple);
}

.avatar-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  color: #41506a;
}

.avatar-btn img {
  width: 43px;
  height: 43px;
  border: 2px solid #fff;
  box-shadow: 0 8px 16px rgba(15, 23, 42, .16);
}

.avatar-btn svg {
  width: 14px;
}

.page-heading,
.stats-grid,
.analytics-grid,
.bottom-grid,
.module-grid {
  margin-left: 41px;
  margin-right: 28px;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 23px;
}

.page-heading h1 {
  margin: 0 0 9px;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: 0;
}

.page-heading p {
  margin: 0;
  color: #40506c;
  font-size: 14px;
  font-weight: 500;
}

.date-select {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 47px;
  padding: 0 16px;
  border: 1px solid #d4deea;
  border-radius: 8px;
  color: #40506c;
  background: #fff;
  box-shadow: 0 8px 18px rgba(20, 40, 80, .04);
  font-size: 14px;
  font-weight: 600;
}

.date-select svg {
  width: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 26px;
}

.stat-card.compact-stat {
  height: 112px;
}

.stat-card.compact-stat .stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.stat-card.compact-stat .stat-icon svg {
  width: 28px;
  height: 28px;
}

.stat-card,
.panel {
  border: 1px solid #dbe4ef;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 144px;
  padding: 26px 24px;
}

.stat-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 87px;
  height: 87px;
  border-radius: 16px;
}

.stat-icon svg {
  width: 37px;
  height: 37px;
  stroke-width: 2.1;
}

.stat-icon.purple {
  color: var(--purple);
  background: linear-gradient(135deg, rgba(112, 72, 245, .12), rgba(112, 72, 245, .2));
}

.stat-icon.mint {
  color: var(--teal);
  background: linear-gradient(135deg, rgba(25, 191, 145, .12), rgba(25, 191, 145, .18));
}

.stat-icon.amber {
  color: var(--orange);
  background: linear-gradient(135deg, rgba(255, 174, 18, .18), rgba(255, 174, 18, .34));
}

.stat-icon.blue {
  color: var(--blue);
  background: linear-gradient(135deg, rgba(33, 130, 245, .12), rgba(33, 130, 245, .2));
}

.stat-card p {
  margin: 0 0 9px;
  color: #52607a;
  font-size: 13px;
  font-weight: 600;
}

.stat-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 23px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.stat-card small {
  color: #009a6a;
  font-size: 12px;
  font-weight: 600;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) 374px 390px;
  gap: 22px;
  margin-bottom: 26px;
}

.panel {
  padding: 23px 20px;
}

.panel h2,
.panel-title h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}

.overview-panel {
  min-height: 391px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.panel-title button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 13px;
  border: 1px solid #d6e0ec;
  border-radius: 7px;
  color: #4a5873;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}

.panel-title button svg {
  width: 14px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 29px;
  padding-left: 27px;
  margin-bottom: 11px;
  color: #3d4c68;
  font-size: 13px;
  font-weight: 500;
}

.chart-legend b,
.status-breakdown b {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 3px;
}

.confirmed {
  background-color: var(--purple);
}

.pending {
  background-color: var(--orange);
}

.cancelled {
  background-color: var(--red);
}

.completed {
  background-color: var(--teal);
}

.line-holder {
  height: 275px;
}

.status-panel {
  min-height: 391px;
}

.status-panel h2,
.pending-panel h2,
.bookings-card h2,
.notifications-card h2 {
  margin-bottom: 24px;
}

.status-chart-row {
  display: grid;
  grid-template-columns: 195px minmax(0, 1fr);
  align-items: center;
  gap: 21px;
  min-height: 272px;
}

.donut-holder {
  position: relative;
  height: 195px;
}

.status-breakdown {
  display: grid;
  gap: 17px;
}

.status-breakdown span {
  display: grid;
  grid-template-columns: 17px 72px 35px;
  align-items: start;
  column-gap: 2px;
  color: #4f5d78;
  font-size: 13px;
}

.status-breakdown b {
  margin-top: 4px;
}

.status-breakdown em {
  font-style: normal;
}

.status-breakdown strong,
.status-breakdown small {
  display: block;
  color: #4f5d78;
  font-weight: 500;
}

.status-breakdown small {
  grid-column: 3;
  margin-top: 6px;
}

.pending-panel {
  min-height: 391px;
}

.pending-list {
  display: grid;
  gap: 21px;
  margin-bottom: 24px;
}

.pending-list a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 31px;
  align-items: center;
  gap: 17px;
  color: var(--text);
  text-decoration: none;
}

.pending-icon,
.note-icon {
  display: grid;
  place-items: center;
  border-radius: 9px;
}

.pending-icon {
  width: 44px;
  height: 44px;
}

.pending-icon svg {
  width: 21px;
}

.pending-icon.purple {
  color: var(--purple);
  background: rgba(112, 72, 245, .12);
}

.pending-icon.amber {
  color: var(--orange);
  background: rgba(255, 174, 18, .14);
}

.pending-icon.blue {
  color: var(--blue);
  background: rgba(33, 130, 245, .12);
}

.pending-icon.green {
  color: var(--teal);
  background: rgba(25, 191, 145, .12);
}

.pending-list strong,
.pending-list small {
  display: block;
}

.pending-list strong {
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 700;
}

.pending-list small {
  color: #5f6c85;
  font-size: 12px;
}

.pending-list em {
  display: grid;
  place-items: center;
  width: 31px;
  height: 24px;
  border-radius: 7px;
  color: #ff3f4d;
  background: #ffdadd;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.outline-full,
.outline-center {
  height: 37px;
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}

.as-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.mini-label {
  color: #75839d;
  font-size: 12px;
  font-weight: 900;
}

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

.line-holder.small {
  height: 220px;
}

.outline-full {
  width: 100%;
}

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) 390px;
  gap: 22px;
  padding-bottom: 28px;
}

.module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding-bottom: 28px;
}

.module-grid.split {
  grid-template-columns: minmax(680px, 1fr) 390px;
}

.module-panel {
  min-height: auto;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.filter-input {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  color: #75839d;
}

.filter-input svg {
  width: 18px;
}

.filter-input input,
.filter-select,
.reason-field textarea {
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.filter-input input {
  width: 100%;
  font-weight: 600;
}

.filter-select {
  height: 44px;
  min-width: 165px;
  padding: 0 12px;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  color: #40506c;
  font-weight: 700;
}

.module-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.module-action svg {
  width: 16px;
}

.module-action.primary {
  color: #fff;
  border-color: var(--purple);
  background: var(--purple);
}

.module-action.success {
  color: #027a55;
  border-color: #b8efd8;
  background: #cff7e7;
}

.module-action.danger {
  color: #d52331;
  border-color: #ffd4d8;
  background: #ffe0e3;
}

.module-action.full {
  width: 100%;
}

.module-table {
  min-width: 930px;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  color: #5c6a86;
  font-size: 13px;
  font-weight: 700;
}

.profile-review {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.profile-avatar img {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  object-fit: cover;
}

.profile-review h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.profile-review p {
  margin: 0 0 12px;
  color: #5c6a86;
  font-weight: 600;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.detail-grid div {
  padding: 14px;
  border: 1px solid #e1e8f1;
  border-radius: 9px;
  background: #fbfdff;
}

.detail-grid span,
.detail-grid strong {
  display: block;
}

.detail-grid span {
  margin-bottom: 8px;
  color: #75839d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-grid strong {
  color: var(--text);
  font-size: 14px;
}

.review-block {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid #e1e8f1;
}

.review-block h2 {
  margin-bottom: 10px;
}

.review-block p {
  margin-bottom: 0;
  color: #40506c;
  line-height: 1.7;
}

.action-stack {
  display: grid;
  gap: 16px;
}

.reason-field {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  color: #40506c;
  font-size: 13px;
  font-weight: 800;
}

.reason-field textarea {
  width: 100%;
  min-height: 98px;
  resize: vertical;
  padding: 12px;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  font-weight: 600;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.care-form {
  display: grid;
  gap: 18px;
}

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

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

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

.selection-grid > div {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #e1e8f1;
  border-radius: 10px;
  background: #fbfdff;
}

.selection-grid h2 {
  margin: 0 0 4px;
  font-size: 15px;
}

.care-form label {
  display: grid;
  gap: 8px;
  color: #40506c;
  font-size: 13px;
  font-weight: 800;
}

.care-form input,
.care-form select,
.care-form textarea {
  width: 100%;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  outline: 0;
}

.care-form input,
.care-form select {
  height: 44px;
  padding: 0 12px;
}

.care-form textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

.priority-list {
  display: grid;
  gap: 14px;
}

.priority-list span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 12px;
  padding: 14px;
  border: 1px solid #e1e8f1;
  border-radius: 9px;
  background: #fbfdff;
}

.priority-list strong {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: var(--purple);
}

.priority-list em {
  color: var(--text);
  font-style: normal;
  font-weight: 800;
}

.priority-list small {
  margin-top: 4px;
  color: #5c6a86;
  line-height: 1.45;
}

.therapist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-height: 180px;
  transition: opacity .2s ease;
}

.therapist-grid.is-loading {
  opacity: .55;
}

.therapist-card,
.empty-state {
  border: 1px solid #e1e8f1;
  border-radius: 12px;
  background: #fbfdff;
}

.therapist-card {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.therapist-card-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.therapist-card-head img {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  object-fit: cover;
}

.therapist-card h2 {
  margin: 0 0 5px;
  font-size: 16px;
}

.therapist-card-head p,
.therapist-bio {
  margin: 0;
  color: #5c6a86;
  line-height: 1.5;
}

.therapist-card-head p {
  font-size: 12px;
  font-weight: 700;
}

.match-score {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 32px;
  border-radius: 999px;
  color: #027a55;
  background: #cff7e7;
  font-size: 12px;
  font-weight: 900;
}

.therapist-bio {
  min-height: 63px;
  font-size: 13px;
}

.therapist-meta {
  display: grid;
  gap: 9px;
}

.therapist-meta span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #35435f;
  font-size: 12px;
  font-weight: 700;
}

.therapist-meta svg {
  width: 16px;
  color: var(--purple);
}

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

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 28px;
  text-align: center;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  color: var(--purple);
}

.empty-state strong {
  font-size: 16px;
}

.empty-state p {
  margin: 8px 0 0;
  color: #5c6a86;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.slot-option {
  position: relative;
  display: grid;
  min-height: 44px;
  cursor: pointer;
}

.slot-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.slot-option span {
  display: grid;
  place-items: center;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  color: #40506c;
  font-size: 13px;
  font-weight: 800;
}

.slot-option input:checked + span {
  color: #fff;
  border-color: var(--purple);
  background: var(--purple);
}

.slot-option.disabled {
  cursor: not-allowed;
  opacity: .45;
}

.muted-copy {
  grid-column: 1 / -1;
  margin: 0;
  color: #5c6a86;
  font-weight: 700;
}

.mini-input {
  min-height: 36px;
  max-width: 180px;
  padding: 0 10px;
  border: 1px solid #d6e0ec;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.chat-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 0;
  min-height: 680px;
  padding: 0;
  overflow: hidden;
}

.chat-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid #e1e8f1;
  background: #fbfdff;
}

.chat-start-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid #e1e8f1;
}

.chat-start-form select {
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.conversation-list {
  overflow-y: auto;
}

.conversation-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #eef3f8;
  color: var(--text);
  text-decoration: none;
}

.conversation-item.active,
.conversation-item:hover {
  background: #f0f5ff;
}

.conversation-item img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
}

.conversation-item strong,
.conversation-item small {
  display: block;
}

.conversation-item strong {
  margin-bottom: 4px;
  font-size: 14px;
}

.conversation-item small {
  overflow: hidden;
  color: #5c6a86;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item em {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  background: var(--purple);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.chat-thread-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  background: #fff;
}

.message-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 22px;
}

.message-bubble {
  max-width: min(620px, 76%);
  padding: 12px 14px;
  border: 1px solid #e1e8f1;
  border-radius: 14px 14px 14px 4px;
  background: #fbfdff;
}

.message-bubble.mine {
  align-self: flex-end;
  color: #fff;
  border-color: var(--purple);
  border-radius: 14px 14px 4px 14px;
  background: var(--purple);
}

.message-bubble span {
  display: block;
  margin-bottom: 6px;
  color: #75839d;
  font-size: 11px;
  font-weight: 800;
}

.message-bubble.mine span {
  color: rgba(255, 255, 255, .72);
}

.message-bubble p {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.message-attachment {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: inherit;
  font-weight: 800;
}

.message-attachment svg {
  width: 15px;
}

.message-compose {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 16px;
  border-top: 1px solid #e1e8f1;
  background: #fbfdff;
}

.message-compose input[name="message"] {
  height: 42px;
  padding: 0 13px;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  outline: 0;
  font-weight: 700;
}

.message-file {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  color: var(--purple);
  cursor: pointer;
}

.message-file input {
  display: none;
}

.empty-chat-state {
  padding: 18px;
  color: #5c6a86;
  font-weight: 700;
}

.language-switcher select {
  height: 38px;
  min-width: 74px;
  padding: 0 9px;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.inline-edit-form {
  display: grid;
  grid-template-columns: 1.2fr .6fr .5fr auto auto;
  gap: 10px;
  align-items: center;
}

.inline-edit-form input,
.inline-edit-form select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d6e0ec;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.compact-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #40506c;
  font-size: 13px;
  font-weight: 800;
}

.compact-check input {
  width: auto;
  height: auto;
}

.document-list {
  display: grid;
  gap: 12px;
}

.document-list article {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e1e8f1;
  border-radius: 10px;
  background: #fbfdff;
}

.document-list strong,
.document-list small {
  display: block;
}

.document-list small {
  margin-top: 5px;
  color: #75839d;
  font-size: 12px;
  font-weight: 800;
}

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

.availability-day {
  padding: 14px;
  border: 1px solid #e1e8f1;
  border-radius: 10px;
  background: #fbfdff;
}

.availability-day h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 900;
}

.availability-slots {
  display: grid;
  gap: 10px;
}

.availability-slots article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}

.availability-slots article.inactive {
  opacity: .55;
}

.availability-slots article span {
  color: var(--text);
  font-weight: 900;
}

.admin-calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.admin-calendar-grid article {
  padding: 14px;
  border: 1px solid #e1e8f1;
  border-radius: 10px;
  background: #fbfdff;
}

.admin-calendar-grid header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-calendar-grid p {
  margin: 7px 0 0;
  color: #40506c;
  font-size: 12px;
  line-height: 1.45;
}

.reports-stats {
  margin-bottom: 26px;
}

.compact-filter {
  margin-bottom: 0;
}

.translation-list {
  display: grid;
  gap: 12px;
}

.translation-row {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1fr) auto auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid #e1e8f1;
  border-radius: 10px;
  background: #fbfdff;
}

.translation-progress {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #e1e8f1;
  border-radius: 10px;
  background: #fbfdff;
}

.translation-progress strong {
  color: var(--purple);
  font-size: 18px;
  font-weight: 900;
}

.translation-progress span {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e8edf5;
}

.translation-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--purple);
}

.translation-progress small {
  color: #5c6a86;
  font-weight: 800;
}

.translation-row strong,
.translation-row small {
  display: block;
}

.translation-row small {
  margin-top: 5px;
  color: #75839d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.translation-row p {
  margin: 8px 0 0;
  color: #5c6a86;
  line-height: 1.45;
}

.translation-row textarea {
  width: 100%;
  min-height: 96px;
  padding: 11px;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  resize: vertical;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e1e8f1;
}

.settings-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  color: #40506c;
  background: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.settings-tabs a.active {
  color: #fff;
  border-color: var(--purple);
  background: var(--purple);
}

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

.settings-form label {
  display: grid;
  gap: 8px;
  color: #40506c;
  font-size: 13px;
  font-weight: 900;
}

.settings-form label.wide,
.settings-actions {
  grid-column: 1 / -1;
}

.settings-form input,
.settings-form select,
.settings-form textarea {
  width: 100%;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  outline: 0;
}

.settings-form input,
.settings-form select {
  height: 44px;
  padding: 0 12px;
}

.settings-form textarea {
  min-height: 140px;
  padding: 12px;
  resize: vertical;
}

.settings-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-weight: 800;
}

.settings-toggle input {
  width: auto;
  height: auto;
}

.settings-actions {
  padding-top: 8px;
}

.bookings-card {
  min-height: 458px;
  padding: 21px 20px 17px;
}

.bookings-card h2,
.notifications-card h2 {
  font-size: 18px;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid #dbe4ef;
  border-radius: 9px;
}

.bookings-table {
  width: 100%;
  min-width: 970px;
  border-collapse: collapse;
}

.bookings-table th,
.bookings-table td {
  height: 55px;
  padding: 0 14px;
  border-bottom: 1px solid #e1e8f1;
  color: #35435f;
  font-size: 12px;
  vertical-align: middle;
}

.bookings-table th {
  height: 49px;
  color: var(--text);
  font-weight: 800;
}

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

.person {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-weight: 500;
}

.person img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.confirmed {
  color: #009f70;
  background: #cff7e7;
}

.status-pill.pending {
  color: #e68f00;
  background: #fff0cc;
}

.status-pill.submitted,
.status-pill.payment-submitted {
  color: #0a7cf3;
  background: #ddecff;
}

.status-pill.pending-payment {
  color: #e68f00;
  background: #fff0cc;
}

.status-pill.cancelled,
.status-pill.rejected {
  color: #ff3644;
  background: #ffe0e3;
}

.status-pill.completed {
  color: #009f70;
  background: #cff7e7;
}

.view-btn {
  display: grid;
  place-items: center;
  width: 39px;
  height: 36px;
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  color: #58677f;
  background: #fff;
}

.view-btn svg {
  width: 16px;
}

.outline-center {
  display: block;
  width: 190px;
  margin: 16px auto 0;
  color: #5d36e8;
}

.notifications-card {
  min-height: 458px;
  padding: 21px 20px 17px;
}

.notifications-list {
  display: grid;
  gap: 28px;
  margin-bottom: 85px;
}

.notifications-list article {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 74px;
  gap: 14px;
  align-items: center;
}

.note-icon {
  width: 44px;
  height: 44px;
}

.note-icon svg {
  width: 19px;
}

.note-icon.red {
  color: var(--red);
  background: rgba(255, 79, 94, .12);
}

.note-icon.green {
  color: var(--teal);
  background: rgba(25, 191, 145, .13);
}

.note-icon.blue {
  color: var(--blue);
  background: rgba(33, 130, 245, .12);
}

.note-icon.mint {
  color: var(--teal);
  background: rgba(25, 191, 145, .14);
}

.notifications-list p {
  margin: 0;
  color: #1e2b45;
  font-size: 14px;
  line-height: 1.38;
  font-weight: 500;
}

.notifications-list strong {
  display: block;
  font-weight: 500;
}

.notifications-list time {
  color: #75839d;
  font-size: 12px;
  text-align: right;
}

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

.notification-page-list article {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e1e8f1;
  border-radius: 10px;
  background: #fbfdff;
}

.notification-page-list article.unread {
  border-color: #cfdcff;
  background: #f3f7ff;
}

.notification-page-list h2 {
  margin: 0 0 5px;
  font-size: 15px;
}

.notification-page-list p {
  margin: 0 0 6px;
  color: #40506c;
  line-height: 1.45;
}

.notification-page-list time {
  color: #8c98b2;
  font-size: 12px;
  font-weight: 800;
}

.care-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 18, 42, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.care-modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.care-modal-card {
  position: relative;
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(12, 30, 64, .22);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  color: #40506c;
  background: #fff;
}

.modal-close svg {
  width: 16px;
}

@media (max-width: 1360px) {
  html {
    min-width: 0;
  }

  .dashboard-shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  body.sidebar-collapsed .dashboard-shell {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .brand strong {
    font-size: 20px;
  }

  .analytics-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

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

  .secondary-analytics {
    grid-template-columns: 1fr;
  }

  .overview-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .dashboard-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 286px;
    transform: translateX(-100%);
  }

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

  body.sidebar-collapsed .brand span:last-child,
  body.sidebar-collapsed .nav-item span,
  body.sidebar-collapsed .nav-stack p,
  body.sidebar-collapsed .support-card,
  body.sidebar-collapsed .sidebar-user span {
    display: block;
  }

  body.sidebar-collapsed .brand,
  body.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    gap: 18px;
  }

  body.sidebar-collapsed .sidebar-user {
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    height: 82px;
  }

  body.sidebar-collapsed .sidebar-user svg {
    display: block;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: block;
    background: rgba(0, 18, 42, .38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar,
  .page-heading,
  .stats-grid,
  .analytics-grid,
  .bottom-grid,
  .module-grid {
    margin-left: 18px;
    margin-right: 18px;
  }

  .topbar {
    margin: 0;
    padding: 0 18px;
  }

  .search-field {
    width: min(52vw, 397px);
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .stats-grid,
  .analytics-grid,
  .secondary-analytics,
  .module-grid.split {
    grid-template-columns: 1fr 1fr;
  }

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

  .availability-board,
  .selection-grid,
  .admin-calendar-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    padding: 16px;
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .topbar-left,
  .topbar-right {
    justify-content: space-between;
  }

  .search-field {
    flex: 1;
    width: auto;
  }

  .stats-grid,
  .analytics-grid,
  .secondary-analytics,
  .bottom-grid,
  .module-grid.split {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .pagination-row {
    align-items: stretch;
    flex-direction: column;
  }

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

  .form-grid,
  .therapist-grid,
  .slot-grid,
  .chat-shell,
  .availability-board,
  .selection-grid,
  .admin-calendar-grid {
    grid-template-columns: 1fr;
  }

  .document-list article {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .chat-list-panel {
    min-height: 280px;
    border-right: 0;
    border-bottom: 1px solid #e1e8f1;
  }

  .inline-edit-form,
  .translation-row,
  .settings-form {
    grid-template-columns: 1fr;
  }

  .stat-card {
    height: auto;
  }

  .status-chart-row {
    grid-template-columns: 1fr;
  }

  .notification-page-list article {
    grid-template-columns: 44px minmax(0, 1fr);
  }
}

.timeline-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  position: relative;
}

.timeline-list article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid #e5ebf4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.timeline-dot {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #6d5dfc;
  background: #f0edff;
  border-radius: 50%;
}

.timeline-list p {
  margin: 4px 0 0;
  color: #64748b;
  line-height: 1.45;
}

.timeline-list time {
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
}

.communication-tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 18px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid #e5ebf4;
  border-radius: 16px;
  overflow-x: auto;
}

.communication-tabs a {
  padding: 10px 14px;
  color: #64748b;
  border-radius: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.communication-tabs a.active,
.communication-tabs a:hover {
  color: #111827;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
}

.email-workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 720px;
  border: 1px solid #e5ebf4;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.email-sidebar {
  border-right: 1px solid #e5ebf4;
  background: #fbfdff;
}

.email-folders {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid #e5ebf4;
}

.email-folders a {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 12px;
  color: #64748b;
  font-weight: 700;
}

.email-folders a.active {
  color: #6d5dfc;
  background: #f0edff;
}

.email-thread-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  max-height: 650px;
  overflow: auto;
}

.email-thread-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e5ebf4;
  border-radius: 16px;
  background: #fff;
  color: #172033;
}

.email-thread-card.active,
.email-thread-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 12px 28px rgba(109, 93, 252, 0.12);
}

.email-thread-card small,
.email-message small {
  display: block;
  color: #64748b;
  margin-top: 4px;
}

.email-thread-card time {
  color: #94a3b8;
  font-size: 12px;
}

.email-thread-card b,
.email-thread-card em {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  background: #e0f2fe;
  color: #0369a1;
}

.email-reader {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.email-reader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid #e5ebf4;
}

.email-reader-head h2 {
  margin: 0;
  font-size: 20px;
}

.email-message-list {
  display: grid;
  gap: 16px;
  padding: 20px;
  flex: 1;
  overflow: auto;
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.email-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  max-width: 860px;
}

.email-message.outgoing {
  justify-self: end;
}

.email-message > div {
  padding: 16px;
  border: 1px solid #e5ebf4;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.email-message header {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.email-message h3 {
  margin: 12px 0 8px;
}

.email-message p {
  margin: 0;
  color: #334155;
  line-height: 1.55;
}

.email-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.email-attachments a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.email-composer {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-top: 1px solid #e5ebf4;
  background: #fff;
}

.email-composer textarea {
  resize: vertical;
}

.email-empty {
  margin: auto;
}

@media (max-width: 720px) {
  .timeline-list article {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .timeline-list time {
    grid-column: 2;
  }

  .email-workspace {
    grid-template-columns: 1fr;
  }

  .email-sidebar {
    border-right: 0;
    border-bottom: 1px solid #e5ebf4;
  }

  .email-reader-head,
  .email-message header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Production responsive polish */
html {
  min-width: 0;
}

body {
  overflow-x: hidden;
}

.content,
.panel,
.module-panel,
.stat-card,
.compact-stat,
.stats-grid,
.module-grid,
.bottom-grid,
.analytics-grid,
.secondary-analytics {
  min-width: 0;
}

.page-heading,
.stats-grid,
.analytics-grid,
.bottom-grid,
.module-grid,
.topbar {
  max-width: 100%;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table,
.module-table {
  width: 100%;
}

.module-action,
.date-select,
.view-btn,
.icon-btn,
.icon-tool {
  flex-shrink: 0;
  min-width: 38px;
  min-height: 38px;
}

.module-action {
  white-space: nowrap;
}

.inline-actions,
.row-actions,
.topbar-right,
.filter-bar {
  flex-wrap: wrap;
  min-width: 0;
}

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

.data-table .view-btn,
.module-table .view-btn,
.table-wrap .view-btn,
.row-actions .view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  color: #475569;
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  line-height: 1;
}

.data-table .view-btn svg,
.module-table .view-btn svg,
.table-wrap .view-btn svg,
.row-actions .view-btn svg {
  display: block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  stroke: currentColor;
}

.schedule-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.schedule-row span {
  min-width: 0;
}

.schedule-row strong,
.schedule-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-row small {
  margin-top: 4px;
  color: var(--muted);
}

.therapist-overview-grid {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}

@media (min-width: 1025px) and (max-width: 1366px) {
  .dashboard-shell {
    grid-template-columns: 244px minmax(0, 1fr);
  }

  body.sidebar-collapsed .dashboard-shell {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .search-field {
    width: min(30vw, 340px);
  }

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

  .module-grid.split,
  .therapist-dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .78fr);
  }

  .zoho-builder-shell {
    grid-template-columns: 250px minmax(0, 1fr) 320px;
  }

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

@media (min-width: 641px) and (max-width: 1024px) {
  .stats-grid,
  .therapist-overview-grid,
  .module-grid.split,
  .therapist-dashboard-grid,
  .analytics-grid,
  .bottom-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zoho-builder-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .form-stage {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .page-heading,
  .stats-grid,
  .analytics-grid,
  .bottom-grid,
  .module-grid {
    margin-left: 12px;
    margin-right: 12px;
  }

  .topbar-left,
  .topbar-right,
  .inline-actions,
  .filter-bar,
  .pagination-row {
    width: 100%;
  }

  .module-action,
  .date-select {
    width: 100%;
    justify-content: center;
  }

  .stats-grid,
  .therapist-overview-grid,
  .module-grid.split,
  .therapist-dashboard-grid,
  .analytics-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .schedule-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .schedule-row .status-pill {
    grid-column: 2;
    justify-self: start;
  }

  .zoho-builder-shell {
    display: block;
  }

  .builder-library,
  .builder-inspector {
    position: static;
    height: auto;
    border: 0;
  }

  .builder-topbar {
    position: static;
  }

  .builder-toolbar,
  .workspace-tabs,
  .builder-device-bar {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .form-stage {
    padding: 12px;
  }

  .canvas-dropzone,
  .form-paper-head {
    padding-left: 16px;
    padding-right: 16px;
  }

  .canvas-field.width-half,
  .canvas-field.width-third {
    grid-column: 1 / -1;
  }
}
