/* ==========================================================
   Yuna's Dental Clinic — Admin Dashboard
   ========================================================== */

:root {
  --plum: #3d1a52;
  --plum-dark: #2a0f3b;
  --purple: #7b3fa0;
  --purple-light: #b98fe0;
  --lavender: #f3ecfa;
  --lavender-soft: #faf7fd;
  --gold: #e8b84b;
  --green: #2f9e5c;
  --green-light: #e7f7ee;
  --red: #c53434;
  --red-light: #fdecea;
  --amber: #b8790e;
  --amber-light: #fdf3e0;
  --blue: #2464c7;
  --blue-light: #e8f0fd;
  --white: #ffffff;
  --ink: #2b2233;
  --ink-soft: #6b5f76;
  --ink-faint: #9b8fa8;
  --border: #e6dcf0;
  --bg: #f7f3fb;
  --shadow: 0 12px 32px -14px rgba(61, 26, 82, 0.28);
  --shadow-sm: 0 4px 14px -6px rgba(61, 26, 82, 0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --gradient: linear-gradient(135deg, var(--plum) 0%, var(--purple) 55%, var(--purple-light) 100%);
  --sidebar-w: 250px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--plum-dark);
}

p {
  margin: 0;
  color: var(--ink-soft);
}

button {
  font-family: var(--font);
}

/* ---------- Auth screen (login) ---------- */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
}

.auth-card__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.auth-card__brand img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 12px;
}

.auth-card__brand strong {
  font-size: 1.15rem;
  color: var(--plum-dark);
}

.auth-card__brand span {
  font-size: 0.82rem;
  color: var(--purple);
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  border: none;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  transform: translateY(-1px);
}

.btn--outline {
  background: var(--white);
  color: var(--plum);
  border: 1.5px solid var(--border);
}

.btn--outline:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.btn--danger {
  background: var(--red-light);
  color: var(--red);
}

.btn--danger:hover {
  background: #f9d8d6;
}

.btn--sm {
  padding: 7px 14px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.btn--icon {
  padding: 8px;
  border-radius: 8px;
  background: var(--lavender);
  color: var(--purple);
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- Layout ---------- */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--plum-dark);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  transition: transform 0.25s ease;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar__brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}

.sidebar__brand strong {
  display: block;
  color: var(--white);
  font-size: 0.95rem;
  line-height: 1.2;
}

.sidebar__brand span {
  font-size: 0.72rem;
  color: var(--purple-light);
}

.sidebar__nav {
  flex: 1;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}

.sidebar__nav a .ico {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
}

.sidebar__nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.sidebar__nav a.active {
  background: var(--gradient);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.sidebar__footer {
  padding: 16px 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sidebar__user .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sidebar__user div strong {
  display: block;
  color: var(--white);
  font-size: 0.85rem;
}

.sidebar__user div span {
  font-size: 0.72rem;
  color: var(--purple-light);
  text-transform: capitalize;
}

.sidebar__toggle {
  display: none;
}

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 251, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 18px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar__menu {
  display: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.topbar h1 {
  font-size: 1.3rem;
  margin: 0;
}

.topbar__sub {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

.content {
  padding: 28px 30px 60px;
}

/* ---------- Stat cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stat-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--lavender);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stat-card strong {
  display: block;
  font-size: 1.55rem;
  color: var(--plum-dark);
  line-height: 1.2;
}

.stat-card span {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 500;
}

/* ---------- Cards / panels ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 22px;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.panel__head h2 {
  font-size: 1.05rem;
  margin: 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  align-items: start;
}

/* ---------- Quick actions ---------- */
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Activity feed ---------- */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item .dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--lavender);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.activity-item .title {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--ink);
}

.activity-item .time {
  font-size: 0.76rem;
  color: var(--ink-soft);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-soft);
}

.empty-state .icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

/* ---------- Table ---------- */
.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

.data-table th {
  text-align: left;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--ink);
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: var(--lavender-soft);
}

.data-table tbody tr.clickable {
  cursor: pointer;
}

.row-actions {
  display: flex;
  gap: 6px;
}

.cell-strong {
  font-weight: 600;
  color: var(--plum-dark);
}

.cell-sub {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* ---------- Badges / status pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge--purple { background: var(--lavender); color: var(--purple); }
.badge--green { background: var(--green-light); color: var(--green); }
.badge--red { background: var(--red-light); color: var(--red); }
.badge--amber { background: var(--amber-light); color: var(--amber); }
.badge--blue { background: var(--blue-light); color: var(--blue); }
.badge--gray { background: #eee; color: #666; }

/* ---------- Filter / toolbar ---------- */
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}

.toolbar .search-input {
  flex: 1;
  min-width: 200px;
}

.search-input input {
  width: 100%;
}

.toolbar select {
  min-width: 150px;
}

/* ---------- Forms ---------- */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--plum-dark);
  margin-bottom: 6px;
}

.field .hint {
  font-size: 0.74rem;
  color: var(--ink-soft);
  font-weight: 400;
  margin-left: 4px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(123, 63, 160, 0.12);
}

.field textarea {
  resize: vertical;
  min-height: 80px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-row--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-error {
  display: none;
  background: var(--red-light);
  color: var(--red);
  border: 1px solid #f5c2c0;
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  font-size: 0.84rem;
  margin-bottom: 14px;
}

.form-error.show {
  display: block;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px 4px;
  margin: 0 0 18px;
}

fieldset legend {
  padding: 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--purple);
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.tabs button {
  background: none;
  border: none;
  padding: 12px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tabs button.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 15, 59, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 500;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 560px;
  padding: 28px;
  transform: translateY(-12px);
  transition: transform 0.2s ease;
}

.modal-overlay.is-open .modal {
  transform: translateY(0);
}

.modal--wide {
  max-width: 780px;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal__head h2 {
  font-size: 1.1rem;
  margin: 0;
}

.modal__close {
  background: var(--lavender);
  color: var(--purple);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

/* ---------- Toasts ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 900;
}

.toast {
  background: var(--plum-dark);
  color: var(--white);
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast--success { background: var(--plum-dark); }
.toast--error { background: var(--red); }

/* ---------- Calendar ---------- */
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-nav h2 {
  min-width: 170px;
  text-align: center;
  font-size: 1.05rem;
}

.view-switch {
  display: flex;
  background: var(--lavender);
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
}

.view-switch button {
  border: none;
  background: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
}

.view-switch button.active {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.month-grid .weekday {
  background: var(--lavender);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--purple);
  padding: 8px 0;
  text-transform: uppercase;
}

.month-cell {
  background: var(--white);
  min-height: 96px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.month-cell:hover {
  background: var(--lavender-soft);
}

.month-cell.other-month {
  background: #fafafa;
  color: #bbb;
}

.month-cell .date-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.month-cell.today .date-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient);
  color: var(--white);
}

.month-cell .appt-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--lavender);
  color: var(--purple);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-cell .more-chip {
  font-size: 0.66rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.day-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day-slot {
  display: flex;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  align-items: center;
}

.day-slot .time-col {
  min-width: 84px;
  font-weight: 700;
  color: var(--plum-dark);
  font-size: 0.85rem;
}

.day-slot .info-col {
  flex: 1;
}

.day-slot .info-col strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
}

.day-slot .info-col span {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.week-col {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  min-height: 200px;
}

.week-col h4 {
  font-size: 0.78rem;
  text-align: center;
  margin-bottom: 10px;
  color: var(--ink-soft);
}

.week-col .appt-chip {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--lavender);
  color: var(--purple);
  margin-bottom: 6px;
  cursor: pointer;
}

/* ---------- Tooth chart ---------- */
.tooth-chart {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
}

.tooth-arch {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.tooth {
  width: 38px;
  height: 46px;
  border-radius: 10px 10px 14px 14px;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.tooth:hover {
  transform: translateY(-3px);
  border-color: var(--purple-light);
}

.tooth.status-planned {
  background: var(--amber-light);
  border-color: var(--amber);
  color: var(--amber);
}

.tooth.status-in_progress {
  background: var(--blue-light);
  border-color: var(--blue);
  color: var(--blue);
}

.tooth.status-completed {
  background: var(--green-light);
  border-color: var(--green);
  color: var(--green);
}

.tooth-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.tooth-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tooth-legend .dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

/* ---------- Patient profile ---------- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.profile-header .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-header h1 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

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

.info-grid .item span {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.info-grid .item strong {
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 600;
}

.doc-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.doc-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  background: var(--lavender-soft);
}

.doc-card .ico {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.doc-card .name {
  font-size: 0.78rem;
  font-weight: 600;
  word-break: break-word;
  margin-bottom: 8px;
}

.dropzone {
  border: 2px dashed var(--purple-light);
  border-radius: var(--radius-sm);
  padding: 28px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.86rem;
  cursor: pointer;
  background: var(--lavender-soft);
}

.dropzone:hover {
  background: var(--lavender);
}

/* ---------- Billing / receipt ---------- */
.invoice-summary {
  display: grid;
  gap: 10px;
}

.invoice-summary .row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 6px 0;
}

.invoice-summary .row.total {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--plum-dark);
}

.invoice-summary .row.balance {
  font-weight: 700;
  color: var(--red);
}

.item-row {
  display: grid;
  grid-template-columns: 1fr 70px 100px 100px 34px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.item-row input {
  padding: 8px 10px;
  font-size: 0.82rem;
}

#receiptPrintArea {
  display: none;
}

.receipt {
  max-width: 420px;
  margin: 0 auto;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.receipt__head {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
}

.receipt__head img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin: 0 auto 8px;
}

.receipt__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.receipt__foot {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.text-muted { color: var(--ink-soft); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .main {
    margin-left: 0;
  }

  .topbar__menu {
    display: flex;
  }

  .field-row,
  .field-row--3 {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 50px; }
  .topbar { padding: 14px 16px; }
}

/* ---------- Print (receipts) ---------- */
@media print {
  .sidebar, .topbar, .toolbar, .panel__head .btn, .no-print {
    display: none !important;
  }
  .main {
    margin-left: 0;
  }
  body {
    background: var(--white);
  }
  body.printing-receipt .admin-layout {
    display: none !important;
  }
  body.printing-receipt #receiptPrintArea {
    display: block !important;
  }
}
