.dash { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--primary-ink); color: #cfe7e6; padding: 24px 16px; display: flex; flex-direction: column; gap: 6px; animation: dash-slide .8s var(--ease) both; z-index: 50; }
.sidebar .brand { color: #fff; margin: 0 8px 26px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; cursor: pointer; font-weight: 600; position: relative; transition: background .3s var(--ease), color .3s, transform .3s var(--ease); border: 0; background: none; color: inherit; text-align: start; width: 100%; }
.side-link i { width: 20px; text-align: center; }
.side-link:hover { background: rgba(255,255,255,.06); transform: translateX(-4px); }
.side-link.active { background: var(--grad-soft); color: #fff; box-shadow: 0 10px 24px -10px rgba(94,211,196,.6); }
.side-link .badge { margin-inline-start: auto; background: var(--accent-2); color: #3a2400; border-radius: 999px; padding: 0 8px; font-size: .8rem; animation: pulse-badge 2.5s infinite; }
.sidebar .spacer { flex: 1; }
.main { padding: 26px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; animation: hero-rise .8s var(--ease) both; }
.topbar h1 { font-size: 1.7rem; }
.topbar .sub { color: var(--muted); }
.topbar .right { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }
.view { display: none; }
.view.active { display: block; animation: view-in .6s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes dash-slide { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.stat { padding: 22px; display: flex; gap: 16px; align-items: center; animation: hero-rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.stat .service-icon { margin: 0; width: 56px; height: 56px; flex: none; }
.stat b { font-size: 1.7rem; display: block; line-height: 1.2; }
.stat small { color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 22px; animation: hero-rise .7s var(--ease) both; animation-delay: .15s; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-head h3 { font-size: 1.2rem; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 13px 12px; text-align: start; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 700; font-size: .9rem; }
tbody tr { transition: background .25s; }
tbody tr:hover { background: var(--soft); }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.pill.pending, .pill.unpaid { background: #fff1d6; color: #9a6400; }
.pill.confirmed { background: #dcefff; color: #1d5fa0; }
.pill.completed, .pill.paid { background: #d8f5ec; color: #0b7a55; }
.pill.cancelled { background: #fde2e3; color: #b8323b; }
.empty { text-align: center; padding: 34px; color: var(--muted); }
.empty i { font-size: 2.4rem; display: block; margin-bottom: 10px; color: var(--accent); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mini { padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-size: .85rem; transition: all .25s; }
.mini:hover { border-color: var(--primary); color: var(--primary); }
.mini.danger:hover { border-color: #b8323b; color: #b8323b; }
select.input.sm { padding: 6px 10px; border-radius: 10px; width: auto; }

.next-appt { background: var(--grad); color: #fff; border: 0; position: relative; overflow: hidden; }
.next-appt .hero-orb { opacity: .3; }
.next-appt h3 { font-size: 1.5rem; margin: 6px 0; }
.timeline { list-style: none; position: relative; padding-inline-start: 26px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding-bottom: 20px; animation: hero-rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -25px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--soft); }
.timeline small { color: var(--muted); }

.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; transition: all .25s var(--ease); }
.slot:hover { border-color: var(--primary); transform: translateY(-2px); }
.slot.sel { background: var(--grad); color: #fff; border-color: transparent; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.choice { padding: 16px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--bg); cursor: pointer; text-align: start; color: var(--text); transition: all .3s var(--ease); }
.choice:hover { transform: translateY(-3px); border-color: var(--primary); }
.choice.sel { border-color: var(--primary); background: var(--soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.choice small { color: var(--muted); display: block; }

.bars { display: flex; align-items: flex-end; gap: 14px; height: 200px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar span { width: 100%; max-width: 46px; border-radius: 10px 10px 4px 4px; background: var(--grad-soft); transform-origin: bottom; animation: bar-grow 1s var(--ease) both; animation-delay: calc(var(--i) * 90ms); }
.bar small { color: var(--muted); font-size: .8rem; }
@keyframes bar-grow { from { transform: scaleY(0); } }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(4, 20, 25, .55); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 200; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box { background: var(--surface); border-radius: 26px; padding: 28px; width: min(520px, 100%); max-height: 90vh; overflow: auto; transform: translateY(30px) scale(.97); transition: transform .45s var(--ease); }
.modal.open .modal-box { transform: none; }
.modal-box h3 { margin-bottom: 18px; }

@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, 1fr); } .two-col { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 0 0 auto; width: 270px; transform: translateX(110%); transition: transform .45s var(--ease); animation: none; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .menu-btn { display: grid; }
}
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } .topbar h1 { font-size: 1.3rem; } }
