/* Naptic UI v2 — light purple design system */

/* ── CSS variables ─────────────────────────────────────── */
:root {
    --v2-purple:      #6366f1;
    --v2-purple-dk:   #4f46e5;
    --v2-purple-bg:   #eef2ff;
    --v2-purple-bd:   #c7d2fe;
    --v2-white:       #ffffff;
    --v2-bg:          #f1f3f9;
    --v2-text:        #111827;
    --v2-muted:       #6b7280;
    --v2-border:      #e5e7eb;
    --v2-shadow:      0 2px 12px rgba(17,24,39,.07);
    --v2-r:           16px;
    --v2-r-sm:        12px;
}

/* ── Page-level reset for v2 pages ─────────────────────── */
body.page-home-v2,
body.page-guests-v2,
body.page-guest-v2,
body.page-calendar-v2,
body.page-services-v2,
body.page-booking-v2,
body.page-booking-public-v2 {
    --bg-deep:         var(--v2-bg);
    --bg-surface:      var(--v2-white);
    --text-main:       var(--v2-text);
    --text-muted:      var(--v2-muted);
    --accent:          var(--v2-purple);
    --accent-hot:      #818cf8;
    --accent-soft:     var(--v2-purple-bg);
    --glass-bg:        var(--v2-white);
    --glass-bg-strong: var(--v2-white);
    --glass-border:    var(--v2-border);
    --glass-highlight: transparent;
    --shadow-soft:     var(--v2-shadow);
    --shadow-accent:   0 8px 24px rgba(99,102,241,.22);
    color-scheme: light;
    background: var(--v2-bg);
}

body.page-home-v2::before,
body.page-guests-v2::before,
body.page-guest-v2::before,
body.page-calendar-v2::before,
body.page-services-v2::before,
body.page-booking-v2::before,
body.page-booking-public-v2::before {
    display: none !important;
}

/* ── Top bar ────────────────────────────────────────────── */
.v2-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 6px;
}

.v2-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--v2-text);
    font-size: 17px;
    font-weight: 700;
}

.v2-brand img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

.v2-bell {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-r-sm);
    background: var(--v2-white);
    color: var(--v2-purple);
    text-decoration: none;
    position: relative;
}

.v2-bell svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.v2-topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.v2-logout {
    color: var(--v2-muted);
}

/* ── Greeting ───────────────────────────────────────────── */
.v2-greeting {
    margin: 8px 0 14px;
}

.v2-greeting h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--v2-text);
    line-height: 1.2;
}

.v2-greeting p {
    margin-top: 4px;
    color: var(--v2-muted);
    font-size: 14px;
}

/* ── Date navigator ─────────────────────────────────────── */
.v2-date-nav {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}

.v2-date-arrow {
    width: 42px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-r-sm);
    background: var(--v2-white);
    color: var(--v2-muted);
    text-decoration: none;
}

.v2-date-arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.v2-date-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-r-sm);
    background: var(--v2-white);
    box-shadow: var(--v2-shadow);
    text-decoration: none;
    color: var(--v2-text);
    font-size: 13px;
    font-weight: 600;
}

.v2-date-pill svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: var(--v2-purple);
    stroke-width: 2;
    stroke-linecap: round;
}

.v2-date-sub {
    margin-left: auto;
    color: var(--v2-muted);
    font-size: 11px;
    font-weight: 500;
}

/* ── Stats panel ────────────────────────────────────────── */
.v2-stats-panel {
    padding: 14px;
    margin-bottom: 14px;
    border: 1px solid var(--v2-purple-bd);
    border-radius: 18px;
    background: linear-gradient(160deg, #f5f3ff 0%, #eef2ff 100%);
}

.v2-stats-title {
    margin-bottom: 10px;
    color: var(--v2-purple-dk);
    font-size: 13px;
    font-weight: 700;
}

.v2-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

@media (min-width: 400px) {
    .v2-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.v2-stat-card {
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 14px;
    background: var(--v2-white);
    box-shadow: 0 2px 8px rgba(99,102,241,.08);
}

.v2-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    border-radius: 9px;
    background: var(--v2-purple-bg);
    color: var(--v2-purple);
}

.v2-stat-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.v2-stat-card strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--v2-text);
    line-height: 1.1;
}

.v2-stat-card > span {
    display: block;
    margin-top: 2px;
    color: var(--v2-muted);
    font-size: 11px;
    font-weight: 600;
}

/* ── Two-column split ───────────────────────────────────── */
.v2-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.v2-panel {
    padding: 14px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-r);
    background: var(--v2-white);
    box-shadow: var(--v2-shadow);
}

.v2-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 10px;
}

.v2-panel-head h2 {
    font-size: 13px;
    font-weight: 800;
    color: var(--v2-text);
    line-height: 1.3;
}

.v2-label-purple {
    color: var(--v2-purple);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.v2-link-purple {
    color: var(--v2-purple);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* Agenda empty */
.v2-empty-agenda {
    text-align: center;
    padding: 4px 0;
}

.v2-empty-agenda svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
}

.v2-empty-agenda p {
    color: var(--v2-muted);
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.v2-next-appointment strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
}

.v2-next-appointment span {
    display: block;
    margin: 4px 0 10px;
    color: var(--v2-muted);
    font-size: 12px;
}

/* Todo list */
.v2-todo-list {
    display: grid;
    gap: 6px;
}

.v2-todo-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    border-radius: 10px;
    background: #f9fafb;
    text-decoration: none;
    color: var(--v2-text);
    font-size: 11px;
    font-weight: 600;
}

.v2-todo-item svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    fill: none;
    stroke: var(--v2-muted);
    stroke-width: 2;
    stroke-linecap: round;
}

.v2-todo-item span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-todo-item strong {
    font-size: 13px;
    font-weight: 800;
    color: var(--v2-purple);
    flex: 0 0 auto;
}

.v2-todo-hot strong {
    color: #ef4444;
}

/* ── Primary button (v2) ────────────────────────────────── */
.v2-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: var(--v2-r-sm);
    background: var(--v2-purple);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: filter 140ms;
}

.v2-btn-primary:active { filter: brightness(.9); }

/* ── Quick actions ──────────────────────────────────────── */
.v2-section-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 10px;
}

.v2-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.v2-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border: 1px solid var(--v2-border);
    border-radius: 14px;
    background: var(--v2-white);
    box-shadow: var(--v2-shadow);
    text-decoration: none;
    color: var(--v2-text);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.v2-quick-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--v2-purple-bg);
    color: var(--v2-purple);
}

.v2-quick-icon-primary {
    background: var(--v2-purple);
    color: #fff;
}

.v2-quick-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Banner link ────────────────────────────────────────── */
.v2-banner-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--v2-purple-bd);
    border-radius: var(--v2-r);
    background: linear-gradient(90deg, #eef2ff, #f5f3ff);
    text-decoration: none;
    color: var(--v2-text);
    margin-bottom: 8px;
}

.v2-banner-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--v2-purple-bg);
    color: var(--v2-purple);
}

.v2-banner-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.v2-banner-text {
    flex: 1;
}

.v2-banner-text strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
}

.v2-banner-text span {
    display: block;
    margin-top: 2px;
    color: var(--v2-muted);
    font-size: 12px;
}

.v2-chevron {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--v2-muted);
    stroke-width: 2;
    stroke-linecap: round;
    flex: 0 0 18px;
}

/* ── Bottom nav v2 overrides ────────────────────────────── */
body.page-home-v2 .bottom-menu,
body.page-guests-v2 .bottom-menu,
body.page-guest-v2 .bottom-menu,
body.page-calendar-v2 .bottom-menu,
body.page-services-v2 .bottom-menu,
body.page-booking-v2 .bottom-menu {
    border-top: 1px solid var(--v2-border);
    background: rgba(255,255,255,.94);
    box-shadow: 0 -4px 16px rgba(17,24,39,.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.page-home-v2 .menu-item,
body.page-guests-v2 .menu-item,
body.page-guest-v2 .menu-item,
body.page-calendar-v2 .menu-item,
body.page-services-v2 .menu-item,
body.page-booking-v2 .menu-item {
    color: var(--v2-muted);
    font-weight: 700;
}

body.page-home-v2 .menu-item.active,
body.page-guests-v2 .menu-item.active,
body.page-guest-v2 .menu-item.active,
body.page-calendar-v2 .menu-item.active,
body.page-services-v2 .menu-item.active,
body.page-booking-v2 .menu-item.active {
    color: var(--v2-purple);
    background: var(--v2-purple-bg);
    border-radius: 14px;
}

/* ── Guests page ────────────────────────────────────────── */
body.page-guests-v2 .v2-search-row {
    position: relative;
    margin-bottom: 10px;
}

body.page-guests-v2 .v2-search-row svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--v2-muted);
    stroke-width: 2;
    pointer-events: none;
}

body.page-guests-v2 .v2-search-row input[type="search"] {
    padding-left: 40px;
    min-height: 48px;
    border: 1px solid var(--v2-border);
    border-radius: 14px;
    background: var(--v2-white);
    box-shadow: var(--v2-shadow);
    font-size: 14px;
}

.v2-add-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid var(--v2-purple-bd);
    border-radius: var(--v2-r);
    background: var(--v2-purple-bg);
    color: var(--v2-text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
}

.v2-add-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--v2-purple);
    color: #fff;
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
}

.v2-add-btn small {
    display: block;
    color: var(--v2-muted);
    font-size: 12px;
    font-weight: 500;
    margin-top: 2px;
}

.v2-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.v2-list-head h2 {
    font-size: 14px;
    font-weight: 800;
}

.v2-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid var(--v2-border);
    border-radius: 10px;
    background: var(--v2-white);
    color: var(--v2-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.v2-sort-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Guest card v2 */
.v2-guest-card {
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-r);
    background: var(--v2-white);
    box-shadow: var(--v2-shadow);
}

.v2-guest-row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 10px;
    align-items: start;
    text-decoration: none;
    color: inherit;
}

.v2-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--v2-purple);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.v2-guest-info h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--v2-text);
}

.v2-guest-info p {
    margin-top: 2px;
    color: var(--v2-muted);
    font-size: 13px;
}

.v2-guest-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    color: var(--v2-muted);
    font-size: 11px;
}

.v2-guest-meta svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex: 0 0 13px;
}

.v2-count-badge {
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--v2-purple-bg);
    color: var(--v2-purple);
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.v2-guest-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.v2-guest-actions a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--v2-purple-bd);
    border-radius: 12px;
    background: var(--v2-purple-bg);
    color: var(--v2-purple);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.v2-guest-actions svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* ── Guest profile page ─────────────────────────────────── */
.v2-guest-hero {
    display: grid;
    grid-template-columns: 1fr 72px;
    gap: 12px;
    align-items: start;
    margin: 8px 0 14px;
}

.v2-guest-hero .v2-eyebrow {
    color: var(--v2-purple);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.v2-guest-hero h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-top: 4px;
}

.v2-guest-hero p {
    margin-top: 4px;
    color: var(--v2-muted);
    font-size: 14px;
}

.v2-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: var(--v2-purple);
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Guest quick actions */
.v2-guest-btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.v2-btn-outline {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--v2-border);
    border-radius: 999px;
    background: var(--v2-white);
    color: var(--v2-text);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.v2-btn-outline svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Info cards */
.v2-info-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-r);
    background: var(--v2-white);
    box-shadow: var(--v2-shadow);
    text-decoration: none;
    color: inherit;
}

.v2-card-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--v2-purple-bg);
    color: var(--v2-purple);
}

.v2-card-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.v2-card-body {
    flex: 1;
    min-width: 0;
}

.v2-card-body h3 {
    font-size: 14px;
    font-weight: 800;
}

.v2-card-body p {
    margin-top: 3px;
    color: var(--v2-muted);
    font-size: 12px;
    line-height: 1.45;
}

.v2-card-body .v2-detail-row {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--v2-muted);
    font-size: 12px;
    margin-top: 4px;
}

.v2-card-body .v2-detail-row svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex: 0 0 13px;
}

.v2-tag {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--v2-purple-bg);
    color: var(--v2-purple);
    font-size: 10px;
    font-weight: 700;
    margin-left: 5px;
}

.v2-check-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.v2-check-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--v2-purple);
    font-size: 11px;
    font-weight: 700;
}

.v2-check-badge svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
}

/* History cards */
.v2-history-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid var(--v2-border);
    border-radius: 14px;
    background: var(--v2-white);
    text-decoration: none;
    color: inherit;
}

.v2-history-dot {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.v2-history-dot.open { background: #dcfce7; color: #16a34a; }
.v2-history-dot.closed { background: #f3f4f6; color: #9ca3af; }
.v2-history-dot.noshow { background: #fee2e2; color: #dc2626; }

.v2-history-dot svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
}

.v2-history-body { flex: 1; min-width: 0; }

.v2-history-body h3 {
    font-size: 13px;
    font-weight: 700;
}

.v2-history-body p {
    margin-top: 2px;
    color: var(--v2-muted);
    font-size: 11px;
}

/* Edit drawer */
.v2-edit-drawer > summary {
    padding: 12px 14px;
    border: 1px solid var(--v2-border);
    border-radius: 12px;
    background: var(--v2-white);
    color: var(--v2-purple);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

/* ── Calendar page ──────────────────────────────────────── */
body.page-calendar-v2 .v2-cal-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

body.page-calendar-v2 .v2-cal-header h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.v2-fab {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--v2-purple);
    color: #fff;
    font-size: 26px;
    font-weight: 300;
    text-decoration: none;
    flex: 0 0 46px;
    line-height: 1;
}

/* ── Services page ──────────────────────────────────────── */
.v2-new-service-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid var(--v2-purple-bd);
    border-radius: var(--v2-r);
    background: var(--v2-purple-bg);
    color: var(--v2-text);
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.v2-new-service-btn strong {
    display: block;
    font-size: 15px;
}

.v2-new-service-btn small {
    display: block;
    margin-top: 2px;
    color: var(--v2-muted);
    font-size: 12px;
}

.v2-service-card {
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-r);
    background: var(--v2-white);
    box-shadow: var(--v2-shadow);
}

.v2-service-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--v2-purple);
}

.v2-service-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--v2-purple);
}

.v2-service-card h3 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.01em;
    margin-bottom: 10px;
}

.v2-service-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.v2-service-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid var(--v2-border);
    border-radius: 999px;
    color: var(--v2-muted);
    font-size: 12px;
    font-weight: 600;
}

.v2-service-meta svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.v2-service-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.v2-btn-edit {
    min-height: 38px;
    border: 1px solid var(--v2-purple-bd);
    border-radius: 12px;
    background: var(--v2-purple-bg);
    color: var(--v2-purple);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.v2-btn-edit svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.v2-btn-delete {
    min-height: 38px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fef2f2;
    color: #ef4444;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.v2-btn-delete svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.v2-tip-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--v2-purple-bd);
    border-radius: var(--v2-r);
    background: var(--v2-purple-bg);
    color: var(--v2-text);
    font-size: 13px;
}

.v2-tip-banner strong { display: block; font-weight: 800; }
.v2-tip-banner span { display: block; margin-top: 2px; color: var(--v2-muted); font-size: 12px; }

/* ── Online booking page ────────────────────────────────── */
.v2-booking-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.v2-toggle-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    margin-top: 4px;
}

.v2-toggle-wrap small {
    font-size: 10px;
    font-weight: 700;
    color: var(--v2-purple);
}

.v2-toggle {
    position: relative;
    width: 52px;
    height: 30px;
    border-radius: 999px;
    background: var(--v2-purple);
}

.v2-toggle.off { background: #d1d5db; }

.v2-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
    transition: right 140ms;
}

.v2-toggle.off::after { right: auto; left: 3px; }

.v2-overview-card {
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--v2-border);
    border-radius: 18px;
    background: #f3f4f6;
}

.v2-overview-card h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.v2-overview-card > p {
    margin: 6px 0 14px;
    color: var(--v2-muted);
    font-size: 13px;
    line-height: 1.45;
}

.v2-overview-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.v2-overview-stat {
    padding: 10px 8px;
    border-radius: 12px;
    background: var(--v2-white);
    text-align: center;
}

.v2-overview-stat strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
}

.v2-overview-stat span {
    display: block;
    margin-top: 3px;
    color: var(--v2-muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.v2-link-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-r);
    background: var(--v2-white);
    box-shadow: var(--v2-shadow);
    text-decoration: none;
    color: inherit;
}

.v2-link-card h3 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 6px;
}

.v2-link-card p {
    color: var(--v2-muted);
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.v2-url-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--v2-purple-bd);
    border-radius: 10px;
    background: var(--v2-purple-bg);
}

.v2-url-box input {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--v2-purple);
    font-size: 12px;
    font-weight: 600;
    min-width: 0;
    padding: 0;
}

.v2-url-box button {
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 1px solid var(--v2-purple-bd);
    border-radius: 8px;
    background: var(--v2-white);
    color: var(--v2-purple);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.v2-nav-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-r);
    background: var(--v2-white);
    text-decoration: none;
    color: inherit;
}

.v2-nav-row h3 { font-size: 14px; font-weight: 800; }
.v2-nav-row p { margin-top: 2px; color: var(--v2-muted); font-size: 12px; }

.v2-settings-card {
    padding: 16px;
    margin-bottom: 10px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-r);
    background: var(--v2-white);
    box-shadow: var(--v2-shadow);
}

.v2-settings-card h3 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 12px;
}

.v2-shield-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--v2-purple-bd);
    border-radius: var(--v2-r);
    background: var(--v2-purple-bg);
    font-size: 13px;
    color: var(--v2-text);
}

.v2-shield-note strong { display: block; font-weight: 800; }
.v2-shield-note span { display: block; margin-top: 2px; color: var(--v2-muted); font-size: 12px; }

/* ── Public booking (foglalas.php) ──────────────────────── */
body.page-booking-public-v2 {
    background: var(--v2-bg);
}

.v2-secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--v2-purple-bg);
    color: var(--v2-purple);
    font-size: 11px;
    font-weight: 700;
}

.v2-secure-badge svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.v2-booking-panel {
    padding: 16px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-r);
    background: var(--v2-white);
    box-shadow: var(--v2-shadow);
}

.v2-section-label {
    font-size: 13px;
    font-weight: 800;
    margin: 14px 0 8px;
    color: var(--v2-text);
}

.v2-selected-service {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid var(--v2-purple);
    border-radius: 14px;
    background: var(--v2-purple-bg);
}

.v2-selected-service .v2-sel-label {
    color: var(--v2-purple);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.v2-selected-service strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
}

.v2-selected-service span {
    display: block;
    margin-top: 2px;
    color: var(--v2-muted);
    font-size: 12px;
}

/* override booking slot grid */
body.page-booking-public-v2 .booking-slot-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

body.page-booking-public-v2 .booking-slot-button {
    min-height: 38px;
    border: 1px solid var(--v2-border);
    border-radius: 10px;
    background: var(--v2-white);
    color: var(--v2-text);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 120ms, border-color 120ms;
}

body.page-booking-public-v2 .booking-slot-button.is-selected {
    border-color: var(--v2-purple);
    background: var(--v2-purple);
    color: #fff;
}

body.page-booking-public-v2 .btn-primary {
    background: linear-gradient(135deg, var(--v2-purple), #818cf8);
}

/* glass-panel overrides for v2 pages */
body.page-home-v2 .glass-panel,
body.page-guests-v2 .glass-panel,
body.page-guest-v2 .glass-panel,
body.page-calendar-v2 .glass-panel,
body.page-services-v2 .glass-panel,
body.page-booking-v2 .glass-panel,
body.page-booking-public-v2 .glass-panel {
    border-color: var(--v2-border);
    background: var(--v2-white);
    box-shadow: var(--v2-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.page-home-v2 .glass-panel::before,
body.page-guests-v2 .glass-panel::before,
body.page-guest-v2 .glass-panel::before,
body.page-calendar-v2 .glass-panel::before,
body.page-services-v2 .glass-panel::before,
body.page-booking-v2 .glass-panel::before,
body.page-booking-public-v2 .glass-panel::before {
    display: none;
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL APP-PAGE OVERRIDES
   Ezek minden body.app-page elemre érvényesek — nincs szükség
   oldalanként hozzáadni a v2 CSS linket.
   ═══════════════════════════════════════════════════════════ */

body.app-page {
    --accent:          var(--v2-purple);
    --accent-hot:      #818cf8;
    --accent-soft:     var(--v2-purple-bg);
    --bg-deep:         var(--v2-bg);
    --bg-surface:      var(--v2-white);
    --bg-surface-soft: #f3f4f6;
    --text-main:       var(--v2-text);
    --text-muted:      var(--v2-muted);
    --text-faint:      #9ca3af;
    --glass-bg:        var(--v2-white);
    --glass-bg-strong: var(--v2-white);
    --glass-border:    var(--v2-border);
    --glass-highlight: transparent;
    --shadow-soft:     var(--v2-shadow);
    --shadow-accent:   0 8px 24px rgba(99,102,241,.2);
    color-scheme: light;
    background: var(--v2-bg);
}

body.app-page::before {
    display: none !important;
}

/* Header — display:contents flatten trick:
   The inner <div> is made "invisible" to the flex layout so its children
   (brand-line, h1, .lead) become direct flex items.
   Result: brand+icon on row 1, h1+subtitle on row 2 — no HTML changes needed. */
body.app-page .app-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    padding: 10px 0 6px;
}

body.app-page .app-header > div:first-child {
    display: contents;
}

body.app-page .brand-line {
    order: 0;
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--v2-text);
    font-size: 17px;
    font-weight: 700;
}

body.app-page .brand-line img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

body.app-page .app-header > a.icon-link,
body.app-page .app-header > a.icon-link-back {
    order: 1;
    flex: 0 0 auto;
}

body.app-page .app-header h1,
body.app-page .app-header .h1 {
    order: 2;
    flex: 0 0 100%;
    margin-top: 10px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--v2-text);
    line-height: 1.15;
}

body.app-page .app-header .lead,
body.app-page .app-header .lead.compact,
body.app-page .app-header .header-subline {
    order: 3;
    flex: 0 0 100%;
    margin-top: 4px;
    color: var(--v2-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

/* Icon links in header */
body.app-page .icon-link {
    width: 40px;
    height: 40px;
    border: 1px solid var(--v2-border);
    border-radius: 12px;
    background: var(--v2-white);
    color: var(--v2-purple);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.app-page .icon-link svg,
body.app-page .power-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Back link */
body.app-page .icon-link-back {
    color: var(--v2-muted);
}

/* Bottom nav */
body.app-page .bottom-menu {
    border-top: 1px solid var(--v2-border);
    background: rgba(255,255,255,.94);
    box-shadow: 0 -4px 16px rgba(17,24,39,.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.app-page .menu-item {
    color: var(--v2-muted);
    font-weight: 700;
    border-radius: 14px;
}

body.app-page .menu-item.active {
    color: var(--v2-purple);
    background: var(--v2-purple-bg);
}

body.app-page .menu-icon svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

/* Drawer nav */
body.app-page .app-nav-sheet {
    background: var(--v2-white);
    border-top-color: var(--v2-border);
}

body.app-page .app-menu-list a.active {
    background: var(--v2-purple-bg);
    color: var(--v2-purple);
}

/* Glass panels */
body.app-page .glass-panel {
    border-color: var(--v2-border);
    background: var(--v2-white);
    box-shadow: var(--v2-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.app-page .glass-panel::before {
    display: none;
}

/* Buttons */
body.app-page .btn-primary {
    background: linear-gradient(135deg, var(--v2-purple), #818cf8);
    box-shadow: 0 8px 24px rgba(99,102,241,.22);
}

body.app-page .btn-secondary {
    border-color: var(--v2-border);
    background: var(--v2-white);
    backdrop-filter: none;
}

/* Form elements */
body.app-page input[type="text"],
body.app-page input[type="email"],
body.app-page input[type="tel"],
body.app-page input[type="password"],
body.app-page input[type="number"],
body.app-page input[type="search"],
body.app-page input[type="time"],
body.app-page input[type="date"],
body.app-page textarea,
body.app-page select {
    border-color: var(--v2-border);
    background: var(--v2-white);
    color: var(--v2-text);
}

/* Alerts */
body.app-page .form-alert {
    border-color: var(--v2-purple-bd);
    color: var(--v2-purple-dk);
    background: var(--v2-purple-bg);
}

body.app-page .form-alert.success-alert {
    border-color: #bbf7d0;
    color: #166534;
    background: #f0fdf4;
}

/* Status pills */
body.app-page .status-pill {
    background: var(--v2-purple-bg);
    color: var(--v2-purple);
    border: 0;
}

/* Auth pages (belepes, regisztracio, 2FA) */
body.auth-screen,
body.auth-screen-v2 {
    --accent:       var(--v2-purple);
    --accent-hot:   #818cf8;
    --accent-soft:  var(--v2-purple-bg);
    --bg-deep:      var(--v2-bg);
    --bg-surface:   var(--v2-white);
    --text-main:    var(--v2-text);
    --text-muted:   var(--v2-muted);
    --glass-bg:     var(--v2-white);
    --glass-border: var(--v2-border);
    --shadow-soft:  var(--v2-shadow);
    color-scheme: light;
    background: var(--v2-bg);
}

body.auth-screen::before,
body.auth-screen-v2::before {
    display: none !important;
}

body.auth-screen .brand-block img.login-icon,
body.auth-screen-v2 .brand-block img.login-icon {
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(99,102,241,.18);
}

body.auth-screen .btn-primary,
body.auth-screen-v2 .btn-primary {
    background: linear-gradient(135deg, var(--v2-purple), #818cf8);
}

body.auth-screen .form-alert,
body.auth-screen-v2 .form-alert {
    border-color: var(--v2-purple-bd);
    color: var(--v2-purple-dk);
    background: var(--v2-purple-bg);
}

body.auth-screen .auth-register-panel,
body.auth-screen-v2 .auth-register-panel {
    border-color: var(--v2-border);
    background: var(--v2-white);
}

body.auth-screen .glass-panel,
body.auth-screen-v2 .glass-panel {
    border-color: var(--v2-border);
    background: var(--v2-white);
    box-shadow: var(--v2-shadow);
    backdrop-filter: none;
}

body.auth-screen .glass-panel::before,
body.auth-screen-v2 .glass-panel::before {
    display: none;
}

/* ── Capacitor native shell (iOS/Android WebView) ─────── */
html.naptic-native-app body.page-home-v2 .v2-topbar,
html.naptic-native-app body.page-guests-v2 .v2-topbar,
html.naptic-native-app body.page-guest-v2 .v2-topbar,
html.naptic-native-app body.page-calendar-v2 .v2-topbar,
html.naptic-native-app body.page-services-v2 .v2-topbar,
html.naptic-native-app body.page-booking-v2 .v2-topbar,
html.naptic-native-app body.page-booking-public-v2 .v2-topbar {
    padding-top: max(10px, env(safe-area-inset-top, 0px));
}

html.naptic-native-app body.app-page .bottom-menu {
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    height: calc(var(--bottom-nav-height, 64px) + env(safe-area-inset-bottom, 0px));
}

html.naptic-native-app body.auth-screen .auth-wrap,
html.naptic-native-app body.auth-screen-v2 .auth-wrap {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
