:root {
  --bg: #fcfaf8;
  --bg-alt: #f4eee7;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-strong: #ffffff;
  --surface-soft: rgba(212, 175, 133, 0.12);
  --sidebar: rgba(252, 250, 248, 0.85);
  --sidebar-border: rgba(212, 175, 133, 0.25);
  --primary: #cba37a;
  --primary-strong: #a87b51;
  --primary-soft: rgba(203, 163, 122, 0.16);
  --secondary: #e6d8cd;
  --success: #6e9a7e;
  --warning: #dfb27b;
  --danger: #c57668;
  --text: #594a42;
  --text-strong: #2c231f;
  --muted: #9c897f;
  --border: rgba(168, 123, 81, 0.15);
  --shadow-color: 168, 123, 81;
  --shadow: 0 10px 40px rgba(var(--shadow-color), 0.08);
  --shadow-strong: 0 24px 64px rgba(var(--shadow-color), 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-xs: 10px;
  --font-title: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --glass-blur: blur(24px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(203, 163, 122, 0.18), transparent 25%),
    radial-gradient(circle at top right, rgba(168, 123, 81, 0.12), transparent 25%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  letter-spacing: -0.01em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-title);
  letter-spacing: -0.03em;
}

a {
  color: var(--primary-strong);
  text-decoration: none;
}

a:hover {
  color: #a86b74;
}

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

.sidebar {
  background: var(--sidebar);
  color: var(--text-strong);
  border-right: 1px solid var(--sidebar-border);
  padding: 24px 18px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  backdrop-filter: var(--glass-blur);
  box-shadow: 2px 0 24px rgba(var(--shadow-color), 0.04);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-direction: column;
  margin-bottom: 20px;
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
}

.brand-logo--sidebar {
  max-width: 214px;
}

.brand-caption {
  color: rgba(247, 243, 237, 0.72);
  font-size: .78rem;
  line-height: 1.35;
  max-width: 214px;
}

.nav-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8), 0 4px 12px rgba(var(--shadow-color), 0.03);
  backdrop-filter: var(--glass-blur);
}

.nav-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(168, 123, 81, 0.08);
}

.nav-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.nav-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 10px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary-strong);
}

.nav-link-argon {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  border: 1px solid transparent;
  font-size: .96rem;
}

.nav-link-argon i {
  width: 20px;
  text-align: center;
  color: var(--muted);
  transition: transform 0.25s ease, color 0.25s ease;
}

.nav-link-argon:hover {
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.9);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(var(--shadow-color), 0.05);
}

.nav-link-argon:hover i {
  color: var(--primary-strong);
  transform: scale(1.1);
}

.nav-link-argon.active-link {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));
  color: var(--text-strong);
  border-color: var(--sidebar-border);
  box-shadow: 0 6px 16px rgba(var(--shadow-color), 0.08), inset 0 2px 0 rgba(255, 255, 255, 1);
  font-weight: 700;
}

.nav-link-argon.active-link i {
  color: var(--primary-strong);
}

.nav-link-argon .nav-pill {
  margin-left: auto;
  font-size: .7rem;
  font-weight: 800;
  color: var(--text);
  background: rgba(168, 123, 81, 0.1);
  padding: 4px 8px;
  border-radius: 999px;
  transition: all 0.25s ease;
}

.nav-link-argon.active-link .nav-pill {
  color: #ffffff;
  background: var(--primary-strong);
  box-shadow: 0 2px 8px rgba(168, 123, 81, 0.3);
}

.content {
  padding: 28px;
}

.topbar {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl);
  padding: 16px 24px;
  box-shadow: 0 14px 40px rgba(var(--shadow-color), 0.05), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
  transition: box-shadow 0.3s ease;
}

.topbar-brand-logo {
  display: block;
  width: auto;
  height: 42px;
  max-width: 180px;
  object-fit: contain;
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(132, 91, 69, 0.12);
  background: rgba(247, 243, 237, 0.82);
  color: var(--text-strong);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.topbar .text-secondary,
.topbar .small {
  color: var(--muted) !important;
}

.topbar-search {
  min-width: 320px;
  max-width: 520px;
  flex: 1 1 320px;
}

.topbar-search .input-group-text {
  background: #fff;
  border-color: rgba(132, 91, 69, 0.22);
  color: var(--primary-strong);
  border-radius: 999px 0 0 999px;
}

.topbar-search .form-control {
  min-height: 44px;
  border-radius: 0 999px 999px 0;
}

.panel-card,
.card-login {
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
  border-color: #ffffff;
}

.panel-card-soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.5));
}

.panel-hero,
.hero-box {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6)),
    linear-gradient(135deg, rgba(203, 163, 122, 0.12), rgba(168, 123, 81, 0.08));
  color: var(--text-strong);
  border-radius: var(--radius-xl);
  padding: 32px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: var(--glass-blur);
}

.panel-hero::before,
.hero-box::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  right: -120px;
  top: -120px;
  background: radial-gradient(circle, rgba(203, 163, 122, 0.18), transparent 70%);
  pointer-events: none;
}

.panel-hero::after,
.hero-box::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  left: -100px;
  bottom: -100px;
  background: radial-gradient(circle, rgba(168, 123, 81, 0.15), transparent 70%);
  pointer-events: none;
}

.panel-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--primary-strong);
}

.panel-hero .title {
  font-family: var(--font-title);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 10px 0 8px;
}

.panel-hero .text {
  color: var(--muted);
  max-width: 64ch;
}

.metric,
.stat-card {
  padding: 22px;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
}

.metric::after,
.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -12px -12px auto;
  width: 108px;
  height: 108px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(214, 173, 118, 0.16), transparent 72%);
  pointer-events: none;
}

.metric .label,
.stat-card .label {
  color: var(--muted);
  font-size: .84rem;
  letter-spacing: 0.01em;
  font-weight: 700;
}

.metric .value,
.stat-card .value {
  font-size: 1.95rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-strong);
  margin-top: 0.35rem;
}

.metric .trend,
.stat-card .trend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: .84rem;
}

.metric .trend strong,
.stat-card .trend strong {
  color: var(--success);
}

.badge-soft {
  background: rgba(214, 173, 118, 0.12);
  color: #74523e;
  border: 1px solid rgba(214, 173, 118, 0.14);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 8px;
}

.status-connected,
.status-success {
  background: var(--success);
}

.status-offline,
.status-danger {
  background: var(--danger);
}

.status-reconnecting,
.status-warning {
  background: var(--warning);
}

.status-pairing_pending,
.status-qr_pending,
.status-connecting {
  background: var(--warning);
}

.status-idle,
.status-muted {
  background: #9aa0aa;
}

.status-info {
  background: #7794a9;
}

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

.quick-tile {
  min-height: 106px;
  border-radius: 20px;
  padding: 16px;
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.quick-tile .label {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .01em;
  color: rgba(255,255,255,.92);
}

.quick-tile .title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
}

.quick-tile .icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.16);
}

.quick-tile.cyan {
  background: linear-gradient(135deg, #845b45, #b78350);
}

.quick-tile.pink {
  background: linear-gradient(135deg, #a96f4d, #d6ad76);
}

.quick-tile.teal {
  background: linear-gradient(135deg, #5b3b2d, #845b45);
}

.quick-tile.coral {
  background: linear-gradient(135deg, #d6ad76, #b78350);
}

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

.finance-tile {
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(132, 91, 69, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 243, 237, 0.92));
  box-shadow: var(--shadow);
}

.finance-tile.success {
  background: linear-gradient(135deg, rgba(94, 139, 107, 0.14), rgba(255, 255, 255, 0.96));
  border-color: rgba(94, 139, 107, 0.20);
}

.finance-tile.danger {
  background: linear-gradient(135deg, rgba(184, 107, 94, 0.14), rgba(255, 255, 255, 0.96));
  border-color: rgba(184, 107, 94, 0.20);
}

.finance-tile .label {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.finance-tile .value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.12;
  margin-top: 8px;
  color: var(--text-strong);
  word-break: break-word;
}

.calendar-card {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,243,237,.88));
  border-radius: 24px;
  border: 1px solid rgba(132, 91, 69, 0.14);
  padding: 18px;
  box-shadow: var(--shadow);
}

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

.calendar-mini .day {
  border-radius: 12px;
  min-height: 56px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255,255,255,.96);
  padding: 8px;
  font-size: .72rem;
  color: var(--muted);
}

.calendar-mini .day.active {
  background: linear-gradient(135deg, rgba(214, 173, 118, 0.20), rgba(183, 131, 80, 0.14));
  border-color: rgba(214, 173, 118, 0.24);
  color: var(--text-strong);
}

.birthday-card {
  border-radius: 18px;
  background: linear-gradient(135deg, #845b45, #b78350);
  color: #fff;
  padding: 16px;
  box-shadow: var(--shadow);
}

.birthday-card .initials {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(255,255,255,.18);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.hero-title {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.qr-box {
  background: #fff;
  border-radius: 20px;
  padding: 14px;
  display: inline-block;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.btn {
  border-radius: 999px;
  font-weight: 700;
  min-height: 48px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-dark,
.btn-primary,
.btn-warning {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(var(--shadow-color), 0.2);
}

.btn-dark:hover,
.btn-primary:hover,
.btn-warning:hover {
  background: linear-gradient(135deg, #dfb27b, var(--primary));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--shadow-color), 0.3);
}

.btn-dark:active,
.btn-primary:active,
.btn-warning:active {
  transform: translateY(0);
}

.btn-outline-primary {
  color: var(--primary-strong);
  border: 1.5px solid var(--primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-soft);
  border-color: var(--primary-strong);
  color: var(--primary-strong);
  transform: translateY(-1px);
}

.btn-outline-dark {
  border: 1.5px solid rgba(168, 123, 81, 0.3);
  color: var(--text-strong);
  background: transparent;
}

.btn-outline-dark:hover {
  background: rgba(168, 123, 81, 0.05);
  border-color: rgba(168, 123, 81, 0.5);
  color: var(--text-strong);
  transform: translateY(-1px);
}

.btn-outline-secondary {
  border: 1.5px solid rgba(156, 137, 127, 0.3);
  color: var(--text-strong);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: rgba(156, 137, 127, 0.05);
  border-color: rgba(156, 137, 127, 0.5);
  color: var(--text-strong);
  transform: translateY(-1px);
}

.btn-outline-light {
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  background: transparent;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  color: #fff;
  transform: translateY(-1px);
}

.form-label {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: .45rem;
}

.form-text {
  color: var(--muted);
  font-size: .78rem;
}

.form-check-input {
  border-color: rgba(148, 163, 184, 0.42);
}

.form-check-input:checked {
  background-color: var(--primary-strong);
  border-color: var(--primary-strong);
}

.form-control,
.form-select,
textarea.form-control {
  min-height: 48px;
  border-radius: 14px;
  border-color: rgba(132, 91, 69, 0.18);
  box-shadow: none;
  background: #fff;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  border-color: rgba(183, 131, 80, 0.56);
  box-shadow: 0 0 0 .2rem rgba(214, 173, 118, 0.12);
}

textarea.form-control {
  min-height: 120px;
  padding-top: .9rem;
  padding-bottom: .9rem;
}

.nav-tabs {
  border-bottom: 1px solid rgba(183, 131, 80, 0.18);
}

.nav-tabs .nav-link {
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 700;
  border-radius: 999px;
  min-height: 42px;
}

.nav-tabs .nav-link:hover {
  border-color: rgba(183, 131, 80, 0.14);
  color: var(--text-strong);
}

.nav-tabs .nav-link.active {
  background: linear-gradient(135deg, rgba(214, 173, 118, 0.16), rgba(183, 131, 80, 0.08));
  border-color: rgba(214, 173, 118, 0.16);
  color: var(--text-strong);
  box-shadow: inset 0 0 0 1px rgba(214, 173, 118, 0.08);
}

.table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(75, 85, 99, 0.02);
}

.table thead th {
  color: #8b7567;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom-width: 1px;
  padding-top: 1rem;
  padding-bottom: 1rem;
  background: rgba(247, 243, 237, 0.72);
}

.table td,
.table th {
  border-color: rgba(148, 163, 184, 0.16);
  vertical-align: middle;
}

.table tbody tr {
  transition: background-color 0.16s ease;
}

.table tbody tr:hover {
  background: rgba(214, 173, 118, 0.05);
}

.table-responsive {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(132, 91, 69, 0.14);
  background: rgba(255, 255, 255, 0.74);
}

.table-responsive .table {
  margin-bottom: 0;
}

.empty-state {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--muted);
  border: 1px dashed rgba(132, 91, 69, 0.24);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.empty-state .icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  margin: 0 auto 12px;
  background: rgba(214, 173, 118, 0.12);
  color: var(--primary-strong);
  font-size: 1.25rem;
}

.alert {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
}

.alert-success {
  background: rgba(94, 139, 107, 0.10);
  color: #486a51;
  border-color: rgba(94, 139, 107, 0.18);
}

.alert-warning {
  background: rgba(214, 165, 91, 0.12);
  color: #8a5d3d;
  border-color: rgba(214, 141, 91, 0.18);
}

.alert-danger {
  background: rgba(184, 107, 94, 0.10);
  color: #9e5252;
  border-color: rgba(216, 111, 111, 0.18);
}

.alert-info {
  background: rgba(214, 173, 118, 0.10);
  color: #7c5c63;
  border-color: rgba(214, 173, 118, 0.18);
}

.list-group-item {
  border-color: rgba(148, 163, 184, 0.14);
}

.badge {
  border-radius: 999px;
  font-weight: 700;
}

.text-bg-light {
  background-color: #ffffff !important;
  color: var(--text-strong) !important;
  border: 1px solid rgba(132, 91, 69, 0.14);
}

.text-bg-success {
  background-color: rgba(94, 139, 107, 0.16) !important;
  color: #486a51 !important;
}

.text-bg-warning {
  background-color: rgba(214, 173, 118, 0.18) !important;
  color: #8a5d3d !important;
}

.text-bg-info {
  background-color: rgba(183, 131, 80, 0.16) !important;
  color: #7c5c63 !important;
}

.text-bg-secondary {
  background-color: rgba(148, 163, 184, 0.16) !important;
  color: #586170 !important;
}

.text-secondary,
.text-muted {
  color: var(--muted) !important;
}

.card {
  border: 0;
}

.bg-light {
  background-color: rgba(247, 243, 237, 0.86) !important;
}

.modal-content {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-strong);
  border: 1px solid rgba(132, 91, 69, 0.12);
}

.modal-header,
.modal-footer {
  border-color: rgba(148, 163, 184, 0.14);
}

.calendar-toolbar .btn {
  min-width: 140px;
}

.calendar-grid th,
.calendar-grid td {
  vertical-align: top;
}

.calendar-grid thead th {
  background: rgba(247, 243, 237, 0.84);
}

.calendar-day-cell {
  min-height: 180px;
  border-radius: 18px;
  transition: 0.18s ease;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(132, 91, 69, 0.12);
}

.calendar-day-cell:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(183, 131, 80, 0.22);
}

.calendar-day-cell.is-dragover {
  background: rgba(214, 173, 118, 0.10);
  box-shadow: inset 0 0 0 2px rgba(214, 173, 118, 0.24);
}

.agenda-slot {
  border: 1px solid rgba(132, 91, 69, 0.14);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  cursor: grab;
  box-shadow: var(--shadow);
}

.agenda-slot:active {
  cursor: grabbing;
}

.agenda-slot.is-dragging {
  opacity: 0.55;
}

.agenda-slot-title {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-strong);
}

.agenda-slot-meta {
  color: var(--muted);
}

.slot-actions .btn {
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

.calendar-appointments {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.calendar-appointment {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(132, 91, 69, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 243, 237, 0.92));
  box-shadow: var(--shadow);
  padding: 0.8rem 0.9rem;
  position: relative;
  overflow: hidden;
}

.calendar-appointment::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--appointment-accent, #b78350);
}

.calendar-appointment.confirmed { --appointment-accent: #5e8b6b; }
.calendar-appointment.pending { --appointment-accent: #d6a56d; }
.calendar-appointment.cancelled { --appointment-accent: #9aa0aa; }
.calendar-appointment.completed { --appointment-accent: #8ea1ba; }

.calendar-appointment-time {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-strong);
}

.calendar-appointment-name {
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.2rem;
  color: var(--text-strong);
}

.calendar-appointment-meta {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.day-summary {
  border: 1px solid rgba(132, 91, 69, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  padding: 1rem;
  height: 100%;
  box-shadow: var(--shadow);
}

.day-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.day-summary-title {
  font-weight: 800;
  margin: 0;
}

.day-summary-date {
  color: var(--muted);
  font-size: 0.84rem;
}

.day-summary-list {
  display: grid;
  gap: 0.6rem;
}

.day-summary-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border-radius: 16px;
  padding: 0.75rem 0.8rem;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,243,237,.86));
  border: 1px solid rgba(132, 91, 69, 0.08);
}

.day-summary-time {
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--text-strong);
  min-width: 52px;
}

.day-summary-main {
  flex: 1 1 auto;
  min-width: 0;
}

.day-summary-name {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-strong);
}

.day-summary-sub {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.frost-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(132, 91, 69, 0.12);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.section-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-strong);
}

.section-subtitle {
  color: var(--muted);
  font-size: .92rem;
}

.input-icon {
  position: relative;
}

.input-icon .bi {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #a7aab4;
  pointer-events: none;
}

.input-icon .form-control {
  padding-left: 40px;
}

.soft-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 173, 118, 0.26), transparent);
}

.mobile-tabs .nav-link {
  white-space: nowrap;
}

.text-break {
  overflow-wrap: anywhere;
}

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

  .sidebar {
    height: auto;
    position: static;
  }

  .content {
    padding: 18px;
  }

  .topbar-search {
    min-width: 100%;
    max-width: none;
  }

  .topbar-brand {
    width: 100%;
  }

  .topbar-brand-logo {
    height: 36px;
    max-width: 150px;
  }
}

@media (max-width: 767px) {
  .panel-card,
  .panel-hero,
  .hero-box,
  .calendar-card {
    border-radius: 20px;
  }

  .quick-grid,
  .finance-grid {
    grid-template-columns: 1fr;
  }

  .metric .value,
  .stat-card .value {
    font-size: 1.7rem;
  }
}
