:root {
  --bg: #0a0f1a;
  --bg-alt: #10192a;
  --bg-panel: rgba(8, 14, 24, 0.94);
  --bg-soft: rgba(255, 255, 255, 0.05);
  --bg-card: rgba(15, 25, 40, 0.8);
  --bg-card-strong: rgba(13, 21, 35, 0.92);
  --bg-card-hover: rgba(26, 38, 58, 0.92);
  --border: rgba(191, 226, 255, 0.13);
  --border-strong: rgba(110, 231, 255, 0.34);
  --line: rgba(191, 226, 255, 0.08);
  --text: #f4fbff;
  --text-soft: rgba(244, 251, 255, 0.94);
  --muted: rgba(187, 212, 228, 0.66);
  --muted-strong: rgba(187, 212, 228, 0.82);
  --accent: #6ee7ff;
  --accent-strong: #a78bfa;
  --accent-soft: rgba(110, 231, 255, 0.16);
  --accent-glow: rgba(110, 231, 255, 0.24);
  --success: #34d399;
  --danger: #f87171;
  --radius-xs: 14px;
  --radius-sm: 20px;
  --radius: 32px;
  --radius-lg: 42px;
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.18);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  --shadow-strong: 0 40px 120px rgba(0, 0, 0, 0.44);
  --content-max: 1360px;
  --sidebar-width: 308px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 231, 255, 0.36) transparent;
}

body {
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(110, 231, 255, 0.15), transparent 24%),
    radial-gradient(circle at bottom right, rgba(167, 139, 250, 0.18), transparent 28%),
    linear-gradient(180deg, #08111d 0%, #0d1727 54%, #07101a 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: -1;
}

body::before {
  top: 0;
  left: 4vw;
  width: 32rem;
  height: 32rem;
  background: radial-gradient(circle, rgba(110, 231, 255, 0.11), transparent 72%);
  filter: blur(18px);
}

body::after {
  right: -6rem;
  bottom: -8rem;
  width: 40rem;
  height: 40rem;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.2), transparent 72%);
  filter: blur(24px);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

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

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(110, 231, 255, 0.26);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(110, 231, 255, 0.42);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes sheen {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(220%);
  }
}

.container {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 48px 24px 88px;
}

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

.grid2,
.grid3 {
  display: grid;
  gap: 22px;
}

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

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

.h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.8rem, 4.3vw, 5.1rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin: 0 0 18px;
  color: var(--text);
}

.p {
  max-width: 68ch;
  color: var(--muted);
  font-size: 1rem;
  margin: 0 0 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--bg-card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 30px;
}

.card::before {
  content: '';
  position: absolute;
  left: -20%;
  top: 0;
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  pointer-events: none;
  opacity: 0;
}

.card:hover::before {
  opacity: 1;
  animation: sheen 1.4s ease;
}

.panel-card {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 6px);
  background: rgba(255, 255, 255, 0.025);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.panel-card.raised {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}

.surface-muted {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 10px);
  background: rgba(255, 255, 255, 0.02);
}

.section-shell {
  display: grid;
  gap: 24px;
  animation: fadeInUp 0.45s ease;
}

.page-head,
.page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.page-hero-copy,
.page-intro {
  display: grid;
  gap: 14px;
}

.page-hero-copy .h1,
.page-intro .h1 {
  margin-bottom: 0;
}

.page-hero-copy .p,
.page-intro .p {
  margin-bottom: 0;
}

.page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.hr {
  height: 1px;
  margin: 30px 0;
  background: linear-gradient(90deg, transparent, rgba(110, 231, 255, 0.34), transparent);
}

label {
  display: block;
  margin: 0 0 10px;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid rgba(232, 219, 196, 0.12);
  border-radius: var(--radius-xs);
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(248, 240, 225, 0.03);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
  color-scheme: dark;
}

input::placeholder,
textarea::placeholder {
  color: rgba(223, 210, 190, 0.4);
}

input:focus,
select:focus,
textarea:focus {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(248, 240, 225, 0.05);
  border-color: rgba(110, 231, 255, 0.38);
  box-shadow: 0 0 0 4px rgba(110, 231, 255, 0.11);
  transform: translateY(-1px);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236ee7ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 42px;
}

input[type="date"],
input[type="time"] {
  padding-right: 44px;
  font-variant-numeric: tabular-nums;
}

input[type="date"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%236ee7ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2.5'%3E%3C/rect%3E%3Cpath d='M8 2.75V7'%3E%3C/path%3E%3Cpath d='M16 2.75V7'%3E%3C/path%3E%3Cpath d='M3 9.5H21'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
}

input[type="time"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'%3E%3C/circle%3E%3Cpath d='M12 7.8V12l3 2.4'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit {
  color: var(--text-soft);
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value {
  text-align: left;
}

select option {
  color: #11100d;
}

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

.help {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.16);
}

.btn.primary {
  color: #0a0f1a;
  background: linear-gradient(135deg, #6ee7ff 0%, #9aeefe 48%, #a78bfa 100%);
  border-color: rgba(110, 231, 255, 0.42);
  box-shadow: 0 18px 30px rgba(110, 231, 255, 0.22);
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  color: #f6d9d2;
  border-color: rgba(248, 113, 113, 0.26);
  background: rgba(248, 113, 113, 0.1);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge.ok {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.12);
  color: #d4eadb;
}

.badge.warn {
  border-color: rgba(110, 231, 255, 0.28);
  background: rgba(110, 231, 255, 0.14);
  color: #d9f8ff;
}

.badge.off {
  border-color: rgba(248, 113, 113, 0.26);
  background: rgba(248, 113, 113, 0.11);
  color: #f2d7d1;
}

.error {
  padding: 14px 16px;
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: var(--radius-xs);
  background: rgba(248, 113, 113, 0.1);
  color: #f8e1db;
}

.icon-shell {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--accent-strong);
  flex-shrink: 0;
}

.icon-shell svg {
  width: 18px;
  height: 18px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 10px);
  background: rgba(255, 255, 255, 0.018);
}

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

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

th {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

td {
  color: var(--text-soft);
  font-size: 0.94rem;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

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

.table-card {
  display: none;
}

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

.shortcut-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 208px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 8px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(37, 31, 25, 0.72);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.shortcut-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)), rgba(43, 36, 29, 0.84);
}

.shortcut-card h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 0.98;
}

.shortcut-card .desc {
  color: var(--muted);
  font-size: 0.94rem;
}

.shortcut-card .stat {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3.5rem;
  line-height: 0.84;
  color: var(--accent-strong);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 22px;
}

.hero-panel {
  display: grid;
  gap: 22px;
}

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

.metric-block {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.025);
}

.metric-label {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.metric-value {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.2rem, 2.8vw, 3rem);
  line-height: 0.9;
  color: var(--text);
}

.metric-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

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

.upcoming-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.upcoming-item .time {
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.86rem;
}

.upcoming-item .name {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.upcoming-item .type {
  color: var(--muted);
  font-size: 0.76rem;
}

.appointments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.appointment-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 8px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)), rgba(33, 28, 23, 0.88);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.appointment-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.appointment-card.cancelled {
  opacity: 0.62;
}

.appt-header {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.appt-date {
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(110, 231, 255, 0.2);
  background: rgba(110, 231, 255, 0.08);
  text-align: center;
}

.appt-date .day {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  line-height: 0.92;
}

.appt-date .month {
  display: block;
  color: var(--muted-strong);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.appt-time .hour {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  line-height: 0.9;
}

.appt-time .duration {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.appt-body {
  padding: 20px;
}

.appt-customer .name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

.appt-customer .phone {
  color: var(--accent-strong);
  font-size: 0.84rem;
}

.appt-service,
.appt-notes {
  margin-top: 12px;
}

.appt-notes {
  color: var(--muted);
  font-size: 0.9rem;
}

.appt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
}

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tab-btn {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted-strong);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.tab-btn:hover {
  border-color: var(--border-strong);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.18), rgba(167, 139, 250, 0.16));
  border-color: var(--border-strong);
  color: var(--text);
}

.tab-content {
  display: none;
}

.empty-state {
  padding: 44px 18px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: calc(var(--radius) - 10px);
}

.empty-state h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--muted);
}

.app-layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 20px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 14%),
    var(--bg-panel);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 28px 0 64px rgba(0, 0, 0, 0.22);
  z-index: 100;
}

.sidebar::after {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.sidebar-header {
  padding: 8px 8px 20px;
}

.brand,
.mobile-header .brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.22), rgba(167, 139, 250, 0.16));
  border: 1px solid rgba(110, 231, 255, 0.24);
  color: var(--accent-strong);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  line-height: 0.86;
  font-weight: 600;
}

.brand-text span {
  color: var(--accent-strong);
}

.brand-subtext {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 6px 20px;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-title {
  padding: 0 12px 10px;
  color: rgba(223, 210, 190, 0.55);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 600;
  transition: all 0.18s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  border-color: var(--line);
}

.nav-item.active {
  color: var(--text);
  border-color: rgba(110, 231, 255, 0.28);
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.08), rgba(167, 139, 250, 0.1));
}

.nav-item .icon-shell {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.sidebar-ai-widget {
  padding: 0 4px 14px;
}

.sidebar-ai-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-ai-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 600;
}

.sidebar-ai-dot,
.nav-ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.sidebar-ai-dot.on,
.nav-ai-dot.on {
  background: var(--success);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
}

.sidebar-ai-dot.off,
.nav-ai-dot.off {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
}

.sidebar-ai-btn {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.sidebar-footer {
  padding: 10px 4px 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 12px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #6ee7ff, #a78bfa);
  color: #0a0f1a;
  font-weight: 700;
}

.user-name {
  font-size: 0.94rem;
  font-weight: 700;
}

.user-role {
  color: var(--muted);
  font-size: 0.78rem;
}

.btn-logout {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.22);
  background: rgba(248, 113, 113, 0.08);
  color: #f2d8d1;
  font-weight: 700;
}

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 38px 34px 60px;
}

.main-shell {
  width: min(100%, var(--content-max));
  margin: 0 auto;
}

.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: fixed;
  inset: 0 0 auto;
  min-height: 76px;
  padding: 18px 18px 12px;
  background: rgba(17, 16, 13, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  z-index: 1001;
}

.mobile-menu-btn {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 999;
}

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

@media (max-width: 1180px) {
  .hero-grid,
  .grid3,
  .shortcut-grid,
  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .grid2,
  .grid3,
  .shortcut-grid,
  .hero-grid,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .page-head,
  .page-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .page-actions {
    justify-content: flex-start;
  }

  .upcoming-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }

  .sidebar {
    width: min(88vw, 340px);
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    z-index: 1002;
  }

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

  .sidebar .sidebar-header {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 94px 16px 34px;
  }

  .container {
    padding: 34px 16px 50px;
  }

  .card {
    padding: 22px;
    border-radius: 26px;
  }

  input,
  select,
  textarea {
    min-height: 56px;
    font-size: 16px;
  }

  .table-wrap {
    width: 100%;
    display: block;
    -webkit-overflow-scrolling: touch;
  }

  .page-head > .btn,
  .page-head .btn,
  .page-hero .btn {
    width: 100%;
  }

  .appt-header {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .btn {
    width: 100%;
  }

  .page-actions .btn,
  .appt-actions .btn {
    width: auto;
  }

  .tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tab-btn {
    width: 100%;
  }

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

  .table-card {
    display: grid;
    gap: 14px;
  }

  .table-card-item {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.02);
  }

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

  .table-card-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.75rem;
    line-height: 0.96;
  }

  .table-card-subtitle {
    color: var(--muted);
    font-size: 0.84rem;
    margin-top: 4px;
  }

  .table-card-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
  }

  .table-card-label {
    color: var(--muted-strong);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .table-card-value {
    color: var(--text-soft);
    font-size: 0.92rem;
  }

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

  .table-card-actions .btn,
  .table-card-actions form,
  .table-card-actions form .btn {
    width: 100%;
  }

  .h1 {
    font-size: clamp(2.3rem, 10vw, 3.8rem);
  }

  select,
  input[type="date"],
  input[type="time"] {
    background-position: right 12px center;
  }
}
