/* ═══════════════════════════════════════════════════════════
   ULTRA MODERN — glass, mesh, minimal, 2025+
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@8..144,400;8..144,500;8..144,600;8..144,700&family=Syne:wght@600;700;800&display=swap');

:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Syne', 'Inter', sans-serif;

    --ink: #FAFAFA;
    --ink-muted: #A1A1AA;
    --ink-faint: #71717A;
    --bg: #09090B;
    --bg-elevated: #111113;
    --bg-card: rgba(24, 24, 27, 0.65);
    --bg-glass: rgba(24, 24, 27, 0.55);

    --accent: #818CF8;
    --accent-bright: #A5B4FC;
    --accent-glow: rgba(129, 140, 248, 0.45);
    --accent-soft: rgba(129, 140, 248, 0.12);
    --accent-2: #38BDF8;

    --gradient: linear-gradient(135deg, #6366F1 0%, #818CF8 50%, #38BDF8 100%);
    --gradient-mesh: radial-gradient(ellipse 80% 60% at 20% 0%, rgba(99, 102, 241, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 90% 20%, rgba(56, 189, 248, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(129, 140, 248, 0.15) 0%, transparent 50%);

    --surface: var(--bg);
    --surface-card: var(--bg-elevated);
    --surface-2: #18181B;
    --surface-glass: var(--bg-glass);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.14);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--accent-glow);
    --shadow-nav: 0 -1px 0 var(--border);

    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-full: 999px;

    --tg-bg-color: var(--bg);
    --tg-text-color: var(--ink);
    --tg-hint-color: var(--ink-muted);
    --primary: var(--accent);
    --success: #34D399;
    --warning: #FBBF24;
    --danger: #F87171;
}

body.modern-theme {
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

body.modern-theme::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--gradient-mesh);
    pointer-events: none;
    z-index: 0;
}

body.modern-theme::after {
    display: none;
}

/* ─── Hero ─── */
body.modern-theme .profile-hero {
    margin: 0 -16px 24px;
    padding: 0 0 32px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    overflow: visible;
}

body.modern-theme .profile-hero::after {
    display: none;
}

.hero-mesh {
    position: absolute;
    inset: -20px -16px 0;
    background: var(--gradient-mesh);
    border-radius: 0 0 40px 40px;
    mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb--1 {
    width: 180px;
    height: 180px;
    background: rgba(99, 102, 241, 0.35);
    top: -40px;
    right: -20px;
}

.hero-orb--2 {
    width: 140px;
    height: 140px;
    background: rgba(56, 189, 248, 0.2);
    top: 60px;
    left: -30px;
    animation-delay: -4s;
}

.barber-pole,
.hero-starburst,
.hero-grain,
.hero-glow,
.hero-decor {
    display: none !important;
}

body.modern-theme .profile-hero-inner {
    padding: 28px 4px 0;
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-bright);
    background: var(--accent-soft);
    border: 1px solid rgba(129, 140, 248, 0.25);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeInDown 0.5s ease backwards;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s ease infinite;
}

body.modern-theme .profile-avatar-wrap {
    width: 96px;
    height: 96px;
    margin: 0 auto 18px;
    padding: 2px;
    background: var(--gradient);
    border-radius: 50%;
    box-shadow: var(--shadow-glow);
    animation: avatarReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

body.modern-theme .profile-avatar {
    border-radius: 50%;
    background: var(--bg-elevated);
}

body.modern-theme .profile-name {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-shadow: none;
    -webkit-text-fill-color: unset;
    background: none;
    animation: fadeInUp 0.5s ease 0.08s backwards;
    line-height: 1.1;
}

body.modern-theme .profile-tagline {
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink-muted);
    font-weight: 400;
    text-shadow: none;
    margin-top: 6px;
    animation: fadeInUp 0.5s ease 0.14s backwards;
}

body.modern-theme .profile-stats-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    animation: fadeInUp 0.5s ease 0.2s backwards;
}

body.modern-theme .stat-chip {
    flex: 1;
    max-width: 110px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, transform 0.2s;
}

body.modern-theme .stat-chip:active {
    transform: scale(0.97);
    border-color: var(--border-hover);
    box-shadow: none;
}

body.modern-theme .stat-chip .stat-value {
    font-family: var(--font);
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
}

body.modern-theme .stat-chip .stat-label {
    font-size: 11px;
    color: var(--ink-faint);
    opacity: 1;
    margin-top: 2px;
}

.btn-hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding: 16px 32px;
    width: 100%;
    max-width: 320px;
    background: var(--ink);
    color: var(--bg);
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(255, 255, 255, 0.12);
    animation: fadeInUp 0.5s ease 0.26s backwards;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero-cta:active {
    transform: scale(0.98);
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.08);
}

/* ─── Typography ─── */
body.modern-theme .section-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
}

body.modern-theme .section-subtitle {
    color: var(--ink-muted);
    font-size: 15px;
}

body.modern-theme .section-header h3 {
    font-family: var(--font);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ─── Glass cards ─── */
body.modern-theme .glass-card,
body.modern-theme .action-tile,
body.modern-theme .service-card,
body.modern-theme .cart-item,
body.modern-theme .booking-card,
body.modern-theme .review-card,
body.modern-theme .menu-item {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, transform 0.2s;
}

body.modern-theme .glass-card:hover,
body.modern-theme .service-card:active,
body.modern-theme .action-tile:active {
    border-color: var(--border-hover);
}

body.modern-theme .card-label {
    color: var(--ink-faint);
    letter-spacing: 0.1em;
    font-size: 10px;
}

/* ─── Bento actions ─── */
body.modern-theme .action-grid {
    gap: 12px;
}

body.modern-theme .action-tile {
    border-radius: var(--radius-md);
    padding: 20px 12px;
}

body.modern-theme .action-tile-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    border: 1px solid rgba(129, 140, 248, 0.15);
}

body.modern-theme .action-tile-icon svg {
    stroke: var(--accent-bright);
    stroke-width: 1.5;
}

body.modern-theme .action-tile span {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-muted);
}

body.modern-theme .info-row {
    border-color: var(--border);
    color: var(--ink-muted);
}

body.modern-theme .info-row svg {
    stroke: var(--accent);
}

/* ─── Catalog ─── */
body.modern-theme .chip {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--ink-muted);
    font-weight: 500;
    backdrop-filter: blur(12px);
}

body.modern-theme .chip.active {
    background: var(--ink);
    color: var(--bg);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

body.modern-theme .service-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    border: 1px solid rgba(129, 140, 248, 0.12);
    font-size: 20px;
}

body.modern-theme .service-info h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

body.modern-theme .service-duration {
    color: var(--accent-bright);
    font-weight: 500;
}

body.modern-theme .service-price {
    background: none;
    -webkit-text-fill-color: var(--ink);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.modern-theme .btn-add {
    width: 40px;
    height: 40px;
    background: var(--ink);
    color: var(--bg);
    font-size: 20px;
    font-weight: 400;
    border: none;
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.1);
}

body.modern-theme .btn-add:active {
    transform: scale(0.92);
}

/* ─── Buttons ─── */
body.modern-theme .btn-primary {
    background: var(--ink);
    color: var(--bg);
    border: none;
    font-weight: 600;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
    animation: none;
}

body.modern-theme .btn-primary:active {
    transform: scale(0.98);
    box-shadow: none;
}

body.modern-theme .btn-secondary {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--ink);
    backdrop-filter: blur(12px);
}

body.modern-theme .btn-ghost {
    color: var(--accent-bright);
    font-weight: 500;
}

body.modern-theme .btn-ghost:active {
    background: var(--accent-soft);
}

/* ─── Navigation — floating island ─── */
body.modern-theme .bottom-nav {
    padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--bg) 40%, transparent);
}

body.modern-theme .nav-pill {
    background: rgba(24, 24, 27, 0.85);
    border: 1px solid var(--border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-lg);
    padding: 8px 10px;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.modern-theme .nav-item {
    color: var(--ink-faint);
    font-weight: 500;
    font-size: 10px;
}

body.modern-theme .nav-item.active {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
}

body.modern-theme .nav-item.active svg {
    stroke: var(--ink);
}

body.modern-theme .nav-badge {
    background: var(--gradient);
    border: none;
    font-weight: 700;
}

/* ─── Bookings ─── */
body.modern-theme .booking-card {
    border-left: 2px solid var(--accent);
    border-radius: var(--radius-md);
}

body.modern-theme .booking-card.completed {
    border-left-color: var(--success);
}

body.modern-theme .booking-card.cancelled {
    border-left-color: var(--danger);
    opacity: 0.65;
}

body.modern-theme .status-pill {
    background: var(--accent-soft);
    color: var(--accent-bright);
    border: none;
    font-weight: 600;
}

body.modern-theme .status-pill.confirmed {
    background: rgba(52, 211, 153, 0.12);
    color: var(--success);
}

body.modern-theme .btn-pay {
    background: var(--ink);
    color: var(--bg);
    border: none;
    font-weight: 600;
}

body.modern-theme .btn-cancel {
    background: rgba(248, 113, 113, 0.1);
    color: var(--danger);
    border: none;
}

/* ─── Reviews ─── */
body.modern-theme .reviews-score-card {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

body.modern-theme .score-number {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 800;
    color: var(--ink);
    text-shadow: none;
    letter-spacing: -0.04em;
}

body.modern-theme .review-stars {
    color: var(--warning);
}

body.modern-theme .review-text {
    color: var(--ink-muted);
}

body.modern-theme .review-reply {
    border-top: 1px solid var(--border);
    color: var(--ink-faint);
}

/* ─── Cart ─── */
body.modern-theme .cart-footer {
    background: rgba(17, 17, 19, 0.92);
    border: 1px solid var(--border);
    backdrop-filter: blur(24px);
    border-radius: var(--radius-lg);
}

body.modern-theme .promocode-input {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--ink);
}

body.modern-theme .promocode-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

body.modern-theme .btn-apply-promo {
    background: var(--accent-soft);
    color: var(--accent-bright);
    border: none;
    font-weight: 600;
}

body.modern-theme .btn-remove {
    background: rgba(248, 113, 113, 0.1);
}

/* ─── Modals ─── */
body.modern-theme .modal {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

body.modern-theme .modal-content {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-md);
}

body.modern-theme .modal-handle {
    background: rgba(255, 255, 255, 0.15);
}

body.modern-theme .modal-close {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--ink-muted);
}

body.modern-theme .slot-date-btn,
body.modern-theme .slot-time-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--ink);
    font-weight: 500;
}

body.modern-theme .slot-date-btn.active,
body.modern-theme .slot-time-btn.active {
    background: var(--ink);
    color: var(--bg);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.08);
}

body.modern-theme .qr-container {
    background: #fff;
    border-radius: var(--radius-md);
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
}

body.modern-theme .qr-image {
    width: 180px;
    max-width: 100%;
}

/* ─── Loader ─── */
body.modern-theme .app-loader {
    background: var(--bg);
}

body.modern-theme .loader-spinner.barber-loader {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    background: none;
    box-shadow: none;
    animation: spin 0.8s linear infinite;
}

body.modern-theme .loader-spinner.barber-loader::before,
body.modern-theme .loader-spinner.barber-loader::after {
    display: none;
}

body.modern-theme .app-loader p {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-muted);
    letter-spacing: 0;
    text-transform: none;
}

body.modern-theme .loader,
body.modern-theme .empty-hint {
    color: var(--ink-faint);
}

/* ─── Toast & menu ─── */
body.modern-theme .toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--ink);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    font-weight: 500;
}

body.modern-theme .toast.success {
    border-color: rgba(52, 211, 153, 0.3);
    color: var(--success);
}

body.modern-theme .toast.error {
    border-color: rgba(248, 113, 113, 0.35);
    color: var(--danger);
}

body.modern-theme .menu-icon-wrap {
    background: var(--accent-soft);
    border: 1px solid rgba(129, 140, 248, 0.12);
    border-radius: var(--radius-sm);
}

body.modern-theme .menu-icon-wrap svg {
    stroke: var(--accent-bright);
}

body.modern-theme .empty-icon-wrap {
    background: var(--accent-soft);
    border: 1px solid var(--border);
}

body.modern-theme .empty-icon-wrap svg {
    stroke: var(--accent);
}

body.modern-theme .btn-icon {
    background: var(--bg-glass);
    border: 1px solid var(--border);
}

body.modern-theme .btn-icon svg {
    stroke: var(--ink-muted);
}

/* ─── Admin & pricing ─── */
body.modern-theme .admin-hero {
    background: var(--gradient-mesh);
    border-bottom: 1px solid var(--border);
}

body.modern-theme .admin-hero h1 {
    font-family: var(--font-display);
    text-shadow: none;
    letter-spacing: -0.03em;
}

body.modern-theme .admin-card {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
}

body.modern-theme .admin-form button,
body.modern-theme .admin-card button {
    background: var(--ink);
    color: var(--bg);
    border: none;
    font-family: var(--font);
    font-weight: 600;
}

body.modern-theme .admin-form input {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--ink);
}

body.modern-theme .admin-list .badge {
    background: var(--accent-soft);
    color: var(--accent-bright);
}

body.modern-theme .pricing-card {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
}

body.modern-theme .pricing-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 32px var(--accent-glow);
}

body.modern-theme .pricing-card .btn-plan {
    background: var(--ink);
    color: var(--bg);
    border: none;
}

body.modern-theme .pricing-back {
    color: var(--accent-bright);
}

body.modern-theme .current-plan-chip {
    background: var(--accent-soft);
    color: var(--accent-bright);
    border: 1px solid rgba(129, 140, 248, 0.2);
}

body.modern-theme .admin-page,
body.modern-theme .pricing-page {
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
}

body.modern-theme .back-link {
    color: var(--ink-muted);
}
