/* =========================================================
   Salon Suite theme — Plum & Rose Gold
   ========================================================= */
:root {
  --plum: #7B2D5E;
  --plum-dark: #5A1F44;
  --plum-light: #F4E8EF;
  --rose: #C9A27E;
  --rose-light: #F6EDE4;
  --ink: #2B2230;
  --muted: #8A7F8D;
  --bg: #F8F5F7;
  --card: #FFFFFF;
  --line: #EDE6EB;
  --sidebar: #241520;
  --sidebar-2: #2F1C2A;
  --success: #2E8B6A;
  --radius: 14px;

  --bs-primary: var(--plum);
  --bs-primary-rgb: 123, 45, 94;
  --bs-link-color: var(--plum);
  --bs-link-hover-color: var(--plum-dark);
  --bs-body-font-family: 'Poppins', system-ui, sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-border-color: var(--line);
}

body { font-size: .9rem; }
h1, h2, h3, h4, h5 { color: var(--ink); font-weight: 600; }
.font-display { font-family: 'Playfair Display', Georgia, serif; }
a { text-decoration: none; }

/* ---------- Buttons ---------- */
.btn { border-radius: 10px; font-weight: 500; padding: .5rem 1rem; }
.btn-sm { padding: .3rem .7rem; border-radius: 8px; }
.btn-primary {
  --bs-btn-bg: var(--plum); --bs-btn-border-color: var(--plum);
  --bs-btn-hover-bg: var(--plum-dark); --bs-btn-hover-border-color: var(--plum-dark);
  --bs-btn-active-bg: var(--plum-dark); --bs-btn-active-border-color: var(--plum-dark);
  --bs-btn-disabled-bg: var(--plum); --bs-btn-disabled-border-color: var(--plum);
}
.btn-outline-primary {
  --bs-btn-color: var(--plum); --bs-btn-border-color: var(--plum);
  --bs-btn-hover-bg: var(--plum); --bs-btn-hover-border-color: var(--plum);
  --bs-btn-active-bg: var(--plum-dark);
}
.btn-rose { background: var(--rose); color: #fff; border-color: var(--rose); }
.btn-rose:hover { background: #b88d68; color: #fff; }
.btn-light { background: #fff; border-color: var(--line); }

/* ---------- Forms ---------- */
.form-control, .form-select { border-radius: 10px; border-color: var(--line); padding: .55rem .8rem; font-size: .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--rose); box-shadow: 0 0 0 .2rem rgba(201, 162, 126, .2); }
.form-label { font-weight: 500; font-size: .82rem; color: #5b5160; margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--plum); border-color: var(--plum); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(123, 45, 94, .15); }
.required::after { content: " *"; color: #c0392b; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; flex-shrink: 0; background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: #d8cbd4; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 1040;
  transition: transform .25s ease;
}
.main { flex: 1; margin-left: 260px; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 1.5rem; flex: 1; }

.brand { display: flex; align-items: center; gap: .75rem; padding: 1.4rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--plum));
}
.brand-name { color: #fff; font-family: 'Playfair Display', serif; font-size: 1.05rem; line-height: 1.2; }
.brand-sub { font-size: .7rem; color: var(--rose); letter-spacing: .12em; text-transform: uppercase; }

.nav-menu { padding: 1rem .75rem; overflow-y: auto; flex: 1; }
.nav-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .14em; color: #8d7a88; padding: .9rem .75rem .4rem; }
.nav-menu .nav-link {
  display: flex; align-items: center; gap: .75rem; color: #d8cbd4; padding: .6rem .75rem; border-radius: 10px;
  font-size: .87rem; margin-bottom: 2px;
}
.nav-menu .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.nav-menu .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-menu .nav-link.active { background: linear-gradient(90deg, rgba(201,162,126,.25), rgba(201,162,126,.05)); color: #fff; box-shadow: inset 3px 0 0 var(--rose); }
.nav-menu .nav-link.disabled { opacity: .45; cursor: default; }
.soon { margin-left: auto; font-size: .6rem; background: rgba(201,162,126,.2); color: var(--rose); padding: 2px 7px; border-radius: 20px; }

.sidebar-footer { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.06); font-size: .75rem; }
.plan-box { background: rgba(201,162,126,.12); border: 1px solid rgba(201,162,126,.25); border-radius: 12px; padding: .75rem; color: #e9dcd2; }

.topbar {
  height: 68px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  gap: 1rem; padding: 0 1.5rem; position: sticky; top: 0; z-index: 1030;
}
.topbar h1 { font-size: 1.15rem; margin: 0; }
.topbar .breadcrumb-sub { font-size: .75rem; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.branch-switch { display: flex; align-items: center; gap: .4rem; background: var(--plum-light); border-radius: 10px; padding: .2rem .2rem .2rem .7rem; color: var(--plum); }
.branch-switch .form-select { border: 0; background-color: transparent; font-weight: 500; color: var(--plum); min-width: 170px; padding-top: .35rem; padding-bottom: .35rem; }
.branch-pill { background: var(--plum-light); color: var(--plum); padding: .4rem .8rem; border-radius: 10px; font-weight: 500; font-size: .82rem; }
.user-chip { display: flex; align-items: center; gap: .5rem; background: none; border: 1px solid var(--line); border-radius: 30px; padding: .25rem .75rem .25rem .25rem; color: var(--ink); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--plum), var(--rose)); color: #fff; font-weight: 600; font-size: .85rem; flex-shrink: 0; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.5rem; }
.btn-icon { border: 1px solid var(--line); background: #fff; border-radius: 10px; width: 40px; height: 40px; display: grid; place-items: center; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(43,34,48,.03); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); padding: 1rem 1.25rem; border-radius: var(--radius) var(--radius) 0 0 !important; }
.card-header h5, .card-header h6 { margin: 0; font-size: .95rem; }
.card-body { padding: 1.25rem; }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--rose); font-weight: 600; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }

.stat-card { position: relative; overflow: hidden; }
.stat-card .stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; }
.stat-card .stat-value { font-size: 1.7rem; font-weight: 600; line-height: 1.1; }
.stat-card .stat-label { color: var(--muted); font-size: .8rem; }
.bg-plum-soft { background: var(--plum-light); color: var(--plum); }
.bg-rose-soft { background: var(--rose-light); color: #a07a55; }
.bg-green-soft { background: #E6F4EE; color: var(--success); }
.bg-blue-soft { background: #E8EEF8; color: #3b5b98; }

.welcome-card { background: linear-gradient(120deg, var(--plum-dark), var(--plum) 55%, #a0577f); color: #fff; border: 0; }
.welcome-card h2 { color: #fff; font-family: 'Playfair Display', serif; }
.welcome-card .text-soft { color: #ecd9e4; }

/* ---------- Tables ---------- */
.table { --bs-table-hover-bg: #fbf7f9; margin: 0; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: #fcfafb; border-bottom: 1px solid var(--line); padding: .8rem 1rem; white-space: nowrap; }
.table td { padding: .8rem 1rem; vertical-align: middle; border-color: var(--line); }
.person { display: flex; align-items: center; gap: .7rem; }
.person .name { font-weight: 500; color: var(--ink); }
.person .sub { font-size: .75rem; color: var(--muted); }
.color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ---------- Badges ---------- */
.badge-soft { padding: .35em .7em; border-radius: 20px; font-weight: 500; font-size: .72rem; }
.badge-plum { background: var(--plum-light); color: var(--plum); }
.badge-rose { background: var(--rose-light); color: #a07a55; }
.badge-green { background: #E6F4EE; color: var(--success); }
.badge-grey { background: #F0EDF0; color: #6f6672; }
.badge-red { background: #FBEAEA; color: #b23b3b; }
.code-badge { font-family: ui-monospace, monospace; background: var(--ink); color: #fff; padding: .2em .55em; border-radius: 6px; font-size: .72rem; letter-spacing: .05em; }

/* ---------- Misc ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.5rem; color: var(--rose); display: block; margin-bottom: .75rem; }
.list-row { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; border-bottom: 1px dashed var(--line); }
.list-row:last-child { border-bottom: 0; }
.info-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.info-value { font-weight: 500; }
.day-chip input { display: none; }
.day-chip label { border: 1px solid var(--line); border-radius: 8px; padding: .35rem .7rem; cursor: pointer; font-size: .8rem; user-select: none; }
.day-chip input:checked + label { background: var(--plum); color: #fff; border-color: var(--plum); }
.shift-table td { padding: .45rem .5rem; }
.form-actions { position: sticky; bottom: 0; background: rgba(248,245,247,.95); backdrop-filter: blur(6px); padding: 1rem 0; border-top: 1px solid var(--line); margin-top: 1rem; }
.alert { border-radius: 12px; border: 0; }
.alert-success { background: #E6F4EE; color: #1f6b50; }
.alert-danger { background: #FBEAEA; color: #8f2c2c; }
.pagination { --bs-pagination-active-bg: var(--plum); --bs-pagination-active-border-color: var(--plum); --bs-pagination-color: var(--plum); margin: 0; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art {
  background: radial-gradient(circle at 20% 20%, rgba(201,162,126,.35), transparent 40%),
              linear-gradient(140deg, var(--sidebar) 0%, var(--plum-dark) 50%, var(--plum) 100%);
  color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 1px solid rgba(201,162,126,.35); }
.auth-art h1 { color: #fff; font-family: 'Playfair Display', serif; font-size: 2.6rem; line-height: 1.15; }
.auth-art .lead { color: #ecd9e4; }
.auth-feature { display: flex; gap: .75rem; align-items: center; color: #f3e6ee; margin-bottom: .75rem; }
.auth-feature i { color: var(--rose); font-size: 1.1rem; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem; background: #fff; }
.auth-box { width: 100%; max-width: 380px; }
.demo-box { background: var(--rose-light); border-radius: 12px; padding: .85rem 1rem; font-size: .8rem; }

/* ---------- Mobile ---------- */
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; }
  .content { padding: 1rem; }
  .topbar { padding: 0 1rem; }
  .branch-switch .form-select { min-width: 120px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}

/* ---------- Phase 2: badges ---------- */
.badge-blue { background: #E8EEF8; color: #3b5b98; }
.badge-amber { background: #FFF3DC; color: #9a6a00; }
.cat-active { background: var(--plum-light) !important; color: var(--plum) !important; font-weight: 500; box-shadow: inset 3px 0 0 var(--plum); }
.list-group-item { border-color: var(--line); font-size: .87rem; }

/* ---------- Calendar ---------- */
.cal-card { overflow: hidden; }
.cal-scroll { overflow: auto; max-height: calc(100vh - 260px); }
.cal-grid { display: grid; grid-template-columns: 70px repeat(var(--cols), minmax(170px, 1fr)); min-width: max-content; }
.cal-head { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line);
  padding: .6rem .75rem; display: flex; align-items: center; gap: .5rem; min-height: 56px; }
.cal-head.cal-gutter { border-left: 0; left: 0; z-index: 6; }
.cal-body { position: relative; }
.cal-gutter.cal-body { position: sticky; left: 0; z-index: 4; background: #fff; }
.cal-time { position: absolute; right: 8px; transform: translateY(-50%); font-size: .68rem; color: var(--muted); white-space: nowrap; }
.cal-time:first-child { transform: none; }
.cal-col { border-left: 1px solid var(--line); cursor: copy; background: #fff; }
.cal-col.is-off { background: repeating-linear-gradient(45deg, #faf7f9, #faf7f9 8px, #f2edf0 8px, #f2edf0 16px); cursor: not-allowed; }
.cal-col.drop-target { background-color: #fbf3f7; }
.cal-line { position: absolute; left: 0; right: 0; border-top: 1px dashed #f1ebef; pointer-events: none; }
.cal-line.full { border-top: 1px solid var(--line); }
.cal-shade { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, #faf7f9, #faf7f9 8px, #f2edf0 8px, #f2edf0 16px); pointer-events: none; }
.cal-now { position: absolute; left: 0; right: 0; border-top: 2px solid #e0457b; z-index: 3; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #e0457b; }
.cal-event { position: absolute; left: 4px; right: 4px; z-index: 2; border-radius: 8px; padding: 4px 8px; overflow: hidden;
  background: color-mix(in srgb, var(--c) 14%, #fff); border-left: 4px solid var(--c); color: var(--ink); font-size: .74rem; line-height: 1.25;
  box-shadow: 0 1px 2px rgba(0,0,0,.06); cursor: pointer; transition: box-shadow .15s, transform .15s; }
.cal-event:hover { box-shadow: 0 4px 12px rgba(43,34,48,.15); color: var(--ink); z-index: 3; }
.cal-event[draggable] { cursor: grab; }
.cal-event.dragging { opacity: .5; transform: scale(.98); }
.cal-event .ev-time { font-weight: 600; font-size: .68rem; color: #5b5160; }
.cal-event .ev-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event .ev-svc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #5b5160; }
.cal-event .ev-status { position: absolute; top: 4px; right: 6px; font-size: .6rem; background: rgba(255,255,255,.85); padding: 0 5px; border-radius: 10px; }
.cal-event.status-completed { opacity: .65; }
.cal-event.status-checked_in, .cal-event.status-in_service { box-shadow: 0 0 0 2px var(--c) inset; }

/* ---------- Booking form ---------- */
.service-row { display: grid; grid-template-columns: 1.6fr 1fr auto; gap: .5rem; margin-bottom: .5rem; }
@media (max-width: 575.98px) { .service-row { grid-template-columns: 1fr auto; } .service-row .stf { grid-column: 1; } }
.slot-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
.slot { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .4rem .7rem; font-size: .8rem; font-weight: 500; color: var(--ink); }
.slot:hover { border-color: var(--rose); background: var(--rose-light); }
.slot.active { background: var(--plum); border-color: var(--plum); color: #fff; }
.customer-chip { display: flex; align-items: center; gap: .75rem; background: var(--plum-light); border-radius: 12px; padding: .6rem .75rem; }
.search-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(43,34,48,.12); margin-top: 4px; max-height: 320px; overflow-y: auto; }
.search-item { display: flex; align-items: center; gap: .6rem; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .6rem .8rem; font-size: .85rem; }
.search-item:hover { background: #fbf7f9; }
.summary-card { position: sticky; top: 84px; }

/* ---------- Phase 3: POS + invoice ---------- */
.pos-table td { padding: .45rem .4rem; }
.pay-row { display: grid; grid-template-columns: 90px 1fr 1fr auto; gap: .35rem; margin-bottom: .4rem; }
.mode-btn.active { background: var(--plum); color: #fff; border-color: var(--plum); }
.inv-doc { font-size: .85rem; color: #222; }
.inv-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--plum); padding-bottom: .9rem; margin-bottom: .9rem; }
.inv-brand { font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; color: var(--plum); font-weight: 700; }
.inv-title { font-size: 1.1rem; font-weight: 700; letter-spacing: .12em; color: var(--rose); }
.inv-muted { color: #6f6672; }
.inv-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--rose); font-weight: 600; }
.inv-bill-to { margin-bottom: .9rem; }
.inv-cancelled { display: inline-block; margin-top: .3rem; border: 2px solid #b23b3b; color: #b23b3b; font-weight: 700; padding: 0 .5rem; transform: rotate(-4deg); }
.inv-table { width: 100%; border-collapse: collapse; margin-bottom: .9rem; }
.inv-table th { background: var(--plum-light); color: var(--plum); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; padding: .45rem .5rem; text-align: left; }
.inv-table td { border-bottom: 1px solid var(--line); padding: .45rem .5rem; vertical-align: top; }
.inv-table .r, .inv-totals .r { text-align: right; }
.inv-foot { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.inv-pay { flex: 1; min-width: 200px; }
.inv-totals { min-width: 260px; border-collapse: collapse; }
.inv-totals td { padding: .25rem .5rem; }
.inv-totals .grand td { border-top: 2px solid var(--plum); font-weight: 700; font-size: 1.05rem; color: var(--plum); padding-top: .5rem; }
.inv-totals .due td { color: #b23b3b; font-weight: 600; }
.inv-thanks { text-align: center; margin-top: 1.2rem; color: var(--muted); font-style: italic; }
@media print { .inv-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---------- Phase 5 ---------- */
.plan-card { display: flex; gap: 1rem; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; margin-bottom: .6rem;
  background: linear-gradient(120deg, #fff, var(--rose-light)); }
.l-pkg label { font-size: .75rem; cursor: pointer; }

/* ---------- Phase 6 ---------- */
.msg-type { border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; margin-bottom: .7rem; }
.msg-type code { font-size: .72rem; }

/* ---------- Multi-language ---------- */
:root { --bs-body-font-family: 'Poppins', 'Noto Sans Tamil', system-ui, sans-serif; }
.font-display, .brand-name, .welcome-card h2, .auth-art h1, .inv-brand { font-family: 'Playfair Display', 'Noto Sans Tamil', Georgia, serif; }
html[lang="ta"] body { font-size: .86rem; }
html[lang="ta"] .nav-menu .nav-link, html[lang="ta"] .btn { font-size: .82rem; }
html[lang="ta"] .form-label { font-size: .78rem; }

/* ---------- Super admin ---------- */
.admin-sidebar { background: linear-gradient(180deg, #14101a, #241a2c); }

/* ---------- Language picker + Google translate ---------- */
.lang-btn { width: auto; padding: 0 .7rem; display: inline-flex; align-items: center; font-size: .82rem; color: var(--ink); }
.lang-modal { border: 0; border-radius: 18px; }
.lang-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
@media (max-width: 575.98px) { .lang-grid { grid-template-columns: repeat(2, 1fr); } }
.lang-card { display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 1px solid #eadbcc; background: #fff;
  border-radius: 12px; padding: .7rem .9rem; transition: all .15s; }
.lang-card:hover { border-color: var(--rose); background: var(--rose-light); }
.lang-card.active { background: #f7ebd4; border-color: #d6b47c; }
.lang-native { font-weight: 600; font-size: 1rem; color: var(--ink); }
.lang-en { font-size: .72rem; color: var(--muted); }
.lang-note { background: #fbf7f1; border-radius: 0 0 18px 18px; }
/* hide Google toolbar / tooltips */
.goog-te-banner-frame, iframe.skiptranslate, #goog-gt-tt, .goog-te-balloon-frame, .goog-tooltip,
.VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf, .VIpgJd-yAWNEb-L7lbkb { display: none !important; }
html.g-translated body { top: 0 !important; position: static !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
font[style*="vertical-align"] { vertical-align: baseline !important; }

/* ================= Online booking (public) ================= */
.bk-body { background: #faf6f8; min-height: 100vh; }
.bk-wrap { max-width: 640px; }
.bk-hero { background: linear-gradient(135deg, var(--plum), #5a1f45); color: #fff; padding: 14px 0 34px; }
.bk-title { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; line-height: 1.1; }
.bk-sub { font-size: .75rem; color: #e9d6e1; }
.bk-lang .btn { color: #fff; border-color: rgba(255,255,255,.4); }
.bk-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: -22px 0 18px; counter-reset: s; }
.bk-steps li { flex: 1; background: #fff; border-radius: 10px; padding: 8px 4px; font-size: .72rem; text-align: center; color: #888; box-shadow: 0 2px 8px rgba(0,0,0,.06); counter-increment: s; }
.bk-steps li::before { content: counter(s); display: block; font-weight: 600; font-size: .9rem; }
.bk-steps li.active { color: var(--plum); font-weight: 600; box-shadow: 0 0 0 2px var(--plum); }
.bk-steps li.done { color: #198754; cursor: pointer; }
.bk-steps li.done::before { content: '✓'; }
.bk-h { font-size: 1rem; font-weight: 600; margin: 4px 0 12px; }
.bk-card { background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.bk-branch { display: flex; align-items: center; gap: 12px; width: 100%; background: #fff; border: 1px solid #eee; border-radius: 14px; padding: 14px; }
.bk-branch > .bi:first-child { font-size: 1.4rem; color: var(--plum); }
.bk-branch small { display: block; color: #777; font-size: .78rem; }
.bk-branch.active, .bk-branch:hover { border-color: var(--plum); background: #fbf3f8; }
.bk-cat-h { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--rose); margin: 14px 0 6px; }
.bk-svc { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 12px; margin-bottom: 8px; cursor: pointer; }
.bk-svc.active { border-color: var(--plum); background: #fbf3f8; }
.bk-svc .form-check-input { width: 1.3em; height: 1.3em; margin: 0; flex-shrink: 0; }
.bk-svc-name { display: block; font-weight: 500; }
.bk-svc-meta { display: block; font-size: .75rem; color: #888; }
.bk-svc-price { font-weight: 600; color: var(--plum); white-space: nowrap; }
.bk-svc-price small { font-weight: 400; color: #999; font-size: .7rem; }
.bk-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.bk-chip { white-space: nowrap; border: 1px solid #ddd; background: #fff; border-radius: 999px; padding: 7px 14px; font-size: .85rem; display: inline-flex; align-items: center; gap: 6px; }
.bk-chip.active { background: var(--plum); border-color: var(--plum); color: #fff; }
.bk-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.bk-dates { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.bk-date { flex: 0 0 64px; border: 1px solid #e5e5e5; background: #fff; border-radius: 12px; padding: 8px 4px; text-align: center; scroll-snap-align: start; }
.bk-date small { display: block; font-size: .68rem; color: #888; }
.bk-date b { display: block; font-size: 1.25rem; line-height: 1.2; }
.bk-date.active { background: var(--plum); border-color: var(--plum); color: #fff; }
.bk-date.active small { color: #f0dbe7; }
.bk-date:disabled { opacity: .45; background: #f3f3f3; }
.bk-slot-h { font-size: .78rem; color: #888; margin: 10px 0 6px; }
.bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.bk-slot { border: 1px solid #ddd; background: #fff; border-radius: 10px; padding: 9px 4px; font-size: .88rem; font-weight: 500; }
.bk-slot:hover { border-color: var(--plum); }
.bk-slot.active { background: var(--plum); border-color: var(--plum); color: #fff; }
.bk-bar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; box-shadow: 0 -4px 16px rgba(0,0,0,.08); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); z-index: 1030; }
.bk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bk-done-icon { font-size: 3.2rem; line-height: 1; margin-bottom: 8px; }
.bk-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #eee; }
.bk-row:last-child { border-bottom: 0; }
.bk-row > .bi { color: var(--plum); font-size: 1.15rem; }
.bk-qr { width: 140px; height: 140px; border-radius: 10px; border: 1px solid #eee; background: #fff; }

/* ---------- Phase 9: attendance & salary ---------- */
.att-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #f3f3f3; }
.att-p { --att: #198754; } .att-h { --att: #d39e00; } .att-a { --att: #dc3545; } .att-l { --att: #0d6efd; } .att-o { --att: #6c757d; } .att-u { --att: #999; }
.att-chip.att-p, .att-chip.att-h, .att-chip.att-a, .att-chip.att-l, .att-chip.att-o, .att-chip.att-u { color: var(--att); background: color-mix(in srgb, var(--att) 10%, #fff); }
.att-btns .btn { min-width: 34px; font-weight: 600; }
.att-btns .btn-check:checked + .btn[class*="att-"] { background: var(--att); border-color: var(--att); color: #fff; }
.att-btns .btn-check:checked + .btn.btn-outline-secondary:not([class*="att-"]) { background: #adb5bd; border-color: #adb5bd; }
.att-reg { font-size: .8rem; }
.att-reg th, .att-reg td { min-width: 30px; vertical-align: middle; }
.att-reg .att-sticky { position: sticky; left: 0; background: #fff; z-index: 2; min-width: 150px; }
.att-reg th.att-p, .att-reg th.att-h, .att-reg th.att-a, .att-reg th.att-l, .att-reg th.att-o { color: var(--att); }
.att-cell { display: block; padding: 6px 0; text-decoration: none; font-weight: 700; color: var(--att, #bbb); }
.att-cell:hover { background: #f6eef3; }
.att-cell.att-auto { opacity: .45; font-style: italic; }
.att-today { background: #fff8e6 !important; }
.att-sun { color: #c0392b; }
.pay-row-paid { background: #f2fbf5; }
.slip-table td { padding: 4px 0; }
.slip-table .amt { text-align: right; white-space: nowrap; }

/* ---------- Phase 10: profit & loss ---------- */
.pl-table td { padding: .4rem .25rem; }
.pl-table .pl-head td { background: #f6eef3; font-weight: 600; color: var(--plum); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.pl-table .pl-net td { font-size: 1.15rem; font-weight: 700; border-top: 2px solid #333; }
.pl-chart { display: flex; gap: 8px; align-items: flex-end; height: 200px; }
.pl-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; text-decoration: none; color: inherit; border-radius: 8px; padding: 4px 0; }
.pl-col.active, .pl-col:hover { background: #faf3f7; }
.pl-bars { flex: 1; width: 100%; display: flex; gap: 3px; align-items: flex-end; justify-content: center; }
.pl-bar { width: 38%; max-width: 22px; border-radius: 4px 4px 0 0; min-height: 2px; }
.pl-in { background: var(--plum); } .pl-out { background: var(--rose); }
.pl-val { font-size: .68rem; font-weight: 600; margin-top: 4px; white-space: nowrap; }
.pl-lbl { font-size: .72rem; color: #888; }
.pl-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
@media print { .main ~ *, .sidebar, .topbar, .main .btn, .main form, .main .alert { display: none !important; } .main { margin-left: 0 !important; } }

/* ---------- Phase 11: bill logo, Tamil, UPI ---------- */
.inv-head-left { display: flex; gap: 12px; align-items: flex-start; }
.inv-logo { max-width: 90px; max-height: 70px; object-fit: contain; }
.inv-tagline { font-size: .78rem; color: var(--rose); font-style: italic; margin-bottom: 2px; }
.inv-doc.inv-ta, .inv-doc.inv-ta .inv-table th { font-family: 'Noto Sans Tamil', Arial, sans-serif; }
.inv-doc.inv-ta .inv-table th { font-size: .72rem; }
.inv-upi { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding: 8px; border: 1px dashed #ccc; border-radius: 8px; width: fit-content; }
.inv-upi img { width: 90px; height: 90px; }
.inv-words { font-size: .78rem; font-style: italic; color: #555; margin-top: 6px; text-align: right; }
.inv-doc .text-end { text-align: right; } .inv-doc .text-center { text-align: center; } .inv-doc .small { font-size: .8em; } .inv-doc .mt-2 { margin-top: .5rem; }
.logo-preview { max-height: 70px; max-width: 160px; object-fit: contain; border: 1px solid #eee; border-radius: 8px; padding: 4px; background: #fff; }
.brand-mark.brand-logo { background: #fff; padding: 3px; overflow: hidden; } .brand-mark.brand-logo img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Phase 12: landing, signup, onboarding ---------- */
.lp { background: #fff; }
.lp-hero { background: radial-gradient(1200px 500px at 80% -10%, #a24a7f 0%, transparent 60%), linear-gradient(135deg, var(--plum), #4a1838); color: #fff; }
.lp-logo { font-family: 'Playfair Display', serif; font-size: 1.15rem; }
.lp-h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.25); font-family: 'Playfair Display', 'Noto Sans Tamil', serif; font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
.lp-lead { max-width: 680px; color: #f0dde8; }
.lp-soft { color: #dcc3d2; }
.lp-h2 { font-family: 'Playfair Display', 'Noto Sans Tamil', serif; font-weight: 700; color: var(--plum); }
.lp-feature { border: 1px solid #f0e6ec; border-radius: 16px; padding: 20px; background: #fff; transition: transform .15s, box-shadow .15s; }
.lp-feature:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(123,45,94,.08); }
.lp-feature > .bi { font-size: 1.6rem; color: var(--plum); background: #f6eef3; border-radius: 12px; padding: 8px 10px; display: inline-block; }
.lp-feature h3 { font-size: 1rem; font-weight: 600; margin: 12px 0 6px; }
.lp-feature p { font-size: .85rem; color: #666; margin: 0; }
.lp-band { background: #faf6f8; }
.lp-plan { position: relative; background: #fff; border: 1px solid #eee; border-radius: 16px; padding: 22px; }
.lp-plan-hot { border: 2px solid var(--plum); box-shadow: 0 12px 28px rgba(123,45,94,.12); }
.lp-plan-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--plum); color: #fff; font-size: .7rem; padding: 2px 12px; border-radius: 999px; }
.lp-plan h3 { font-size: 1.1rem; font-weight: 600; }
.lp-price { font-size: 2rem; font-weight: 700; color: var(--plum); }
.lp-price small { font-size: .85rem; color: #888; font-weight: 400; }
.lp-card { border: 1px solid #eee; border-radius: 16px; padding: 24px; box-shadow: 0 6px 18px rgba(0,0,0,.04); }
.public-lang .btn { font-size: .75rem; padding: 2px 8px; }
.signup-lang .btn-outline-light { color: var(--plum); border-color: #ddd; }
.signup-lang .btn-light { background: var(--plum); color: #fff; border-color: var(--plum); }
.setup-card { border-left: 4px solid var(--plum); }
.setup-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #eee; border-radius: 12px; color: inherit; text-decoration: none; font-size: .88rem; }
.setup-step:hover { border-color: var(--plum); background: #fbf4f8; }
.setup-step .setup-num { width: 24px; height: 24px; border-radius: 50%; background: #f1e6ed; color: var(--plum); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; flex-shrink: 0; }
.setup-step.done { color: #888; text-decoration: line-through; }
.setup-step.done .setup-num { background: #198754; color: #fff; }

/* ---------- Phase 13: subscription ---------- */
.sub-plan { border-radius: 16px; }
.sub-current { border: 2px solid var(--plum); }
.sub-price .amt { font-size: 2rem; font-weight: 700; color: var(--plum); }
.sub-price .per { color: #888; }
