/* Nailora — Premium Salon */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --font-body: "Inter", system-ui, sans-serif;
    --font-display: "Fraunces", Georgia, serif;

    --ivory: #faf7f5;
    --surface: #ffffff;
    --surface-2: #f5f1ee;
    --charcoal: #1c1418;
    --charcoal-soft: #3d3238;
    --text: #1c1418;
    --text-muted: #6b5e63;
    --border: #e8e0dc;
    --border-strong: #d9cfc8;

    --accent: #e8a0b4;
    --accent-strong: #d4849a;
    --accent-deep: #b86b82;
    --accent-soft: rgba(232, 160, 180, 0.18);
    --accent-glow: rgba(232, 160, 180, 0.35);

    --success: #2d6a4f;
    --success-bg: #edf7f1;
    --danger: #c1124a;
    --danger-bg: #fff0f4;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --shadow-sm: 0 4px 20px rgba(28, 20, 24, 0.06);
    --shadow-md: 0 16px 40px rgba(28, 20, 24, 0.08);
    --shadow-lg: 0 28px 70px rgba(28, 20, 24, 0.12);

    --sidebar-w: 260px;
    --topbar-h: 64px;
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--ivory);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.85rem, 3vw, 2.6rem); margin: 0 0 0.65rem; }
h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin: 1.25rem 0 0.65rem; }
p { margin: 0 0 1rem; color: var(--text-muted); }

a { color: var(--accent-deep); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--charcoal); }

/* ── Public header ── */
.theme-public { display: flex; flex-direction: column; min-height: 100vh; }

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem clamp(1rem, 3vw, 2rem);
    background: rgba(250, 247, 245, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--charcoal);
    text-decoration: none;
}

.header .nav-center { flex: 1; display: flex; justify-content: center; }
.header .nav-links { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: center; }
.header .nav-right { flex-shrink: 0; }

.header .nav-link {
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.header .nav-link:hover { background: var(--surface-2); color: var(--charcoal); }
.header .nav-link.active { background: var(--charcoal); color: #fff; }
.header .nav-link.nav-link--muted { font-size: 0.85rem; }

/* ── Main (public) ── */
.main {
    flex: 1;
    width: min(100%, 920px);
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 2rem);
}

.main--public { width: min(100%, 760px); }
.main--landing {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
}

.page-intro {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.page-intro p:last-child { margin-bottom: 0; }

.app-footer {
    padding: 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Hero landing ── */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 72px);
    align-items: center;
    gap: 2rem;
    padding: clamp(1.5rem, 4vw, 4rem) clamp(1rem, 5vw, 5rem);
}

.hero__visual {
    position: relative;
    min-height: 420px;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, #fff 0%, #f3ebe6 100%);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.55;
}

.hero__orb--1 {
    width: 220px; height: 220px;
    top: -40px; right: -20px;
    background: var(--accent);
}

.hero__orb--2 {
    width: 180px; height: 180px;
    bottom: 20px; left: -30px;
    background: #dcc4b8;
}

.hero__art {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero__art svg { width: min(100%, 320px); height: auto; }

.hero__content { max-width: 520px; }

.hero__eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero__title {
    margin: 0 0 1rem;
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    line-height: 1.05;
}

.hero__title em {
    font-style: italic;
    color: var(--accent-deep);
}

.hero__lead {
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 2rem;
    max-width: 42ch;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 2.5rem;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
}

.feature-card {
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.feature-card__title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
}

.feature-card__text {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

/* ── Master shell (sidebar) ── */
.theme-master { min-height: 100vh; background: var(--ivory); }

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1rem;
    background: var(--charcoal);
    color: #fff;
    overflow-y: auto;
}

.sidebar__logo {
    display: block;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.sidebar__logo span { color: var(--accent); }

.sidebar__group {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__group:last-of-type { border-bottom: none; }

.sidebar__label {
    padding: 0 0.65rem;
    margin-bottom: 0.5rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.15rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.sidebar__link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar__link.active { background: rgba(232, 160, 180, 0.2); color: #fff; }

.sidebar__icon {
    width: 1.1rem;
    text-align: center;
    opacity: 0.85;
    font-size: 0.95rem;
}

.sidebar__footer { margin-top: auto; padding-top: 1rem; }

.app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--topbar-h);
    padding: 0 1.5rem;
    background: rgba(250, 247, 245, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.topbar__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
}

.topbar__actions { display: flex; gap: 0.5rem; align-items: center; }

.main--master {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1.5rem clamp(1rem, 2.5vw, 2rem) 2rem;
}

.sidebar-toggle {
    display: none;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    font: inherit;
}

/* ── Buttons ── */
.btn, .btn-primary, .btn-secondary, .btn-danger, .btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.6rem 1.1rem;
    margin: 0 0.35rem 0.35rem 0;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow var(--transition), background var(--transition), color var(--transition);
}

.btn:active, .btn-primary:active { transform: scale(0.98); }

.btn, .btn-secondary {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--charcoal);
}

.btn:hover, .btn-secondary:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
}

.btn-primary {
    background: var(--charcoal);
    color: #fff;
    box-shadow: 0 8px 24px rgba(28, 20, 24, 0.18);
}

.btn-primary:hover {
    background: var(--charcoal-soft);
    color: #fff;
    box-shadow: 0 12px 28px rgba(28, 20, 24, 0.22);
}

.btn-accent {
    background: var(--accent);
    color: var(--charcoal);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-accent:hover { background: var(--accent-strong); color: var(--charcoal); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-small { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn:disabled, .btn-primary:disabled { opacity: 0.5; pointer-events: none; }

.btn-link { color: var(--accent-deep); font-weight: 600; }
.btn-ghost { background: transparent; border-color: var(--border); }

.btn-landing {
    display: inline-flex;
    min-width: 180px;
    padding: 0.95rem 1.5rem;
    font-size: 0.95rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
}

.btn-landing--client { background: var(--charcoal); color: #fff; }
.btn-landing--client:hover { background: var(--charcoal-soft); color: #fff; }

.btn-landing--master {
    background: transparent;
    color: var(--charcoal);
    border: 1px solid var(--border-strong);
}

.btn-landing--master:hover { background: var(--surface); }

/* ── Wizard (booking) ── */
.wizard-shell {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.wizard-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.wizard-progress__step {
    padding: 1rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

.wizard-progress__step.is-active { color: var(--charcoal); border-bottom-color: var(--accent); }
.wizard-progress__step.is-done { color: var(--accent-deep); }

.wizard-body { padding: 1.5rem; }

.wizard-panel { display: none; animation: fadeUp 0.35s ease; }
.wizard-panel.is-active { display: block; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.85rem;
}

.service-card {
    padding: 1rem;
    text-align: left;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition), transform 0.12s ease;
    font: inherit;
    color: inherit;
}

.service-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.service-card.is-selected { border-color: var(--charcoal); box-shadow: 0 0 0 3px var(--accent-soft); }

.service-card__name { display: block; font-weight: 600; color: var(--charcoal); margin-bottom: 0.35rem; }
.service-card__meta { font-size: 0.82rem; color: var(--text-muted); }

/* ── Auth card ── */
.auth-card {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* ── Stats & dashboard ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 0 0 1.5rem;
}

.stat-card {
    display: block;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: inherit;
}

.stat-card__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.stat-card__value {
    margin-top: 0.5rem;
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1;
}

.stat-card__hint {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: var(--accent-deep);
    font-weight: 600;
}

.finance-panel {
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.finance-panel h2 { margin-top: 0; }

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

/* ── Card list (clients etc) ── */
.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.card-list { display: flex; flex-direction: column; gap: 0.65rem; }

.card-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition), box-shadow var(--transition), transform 0.12s ease;
}

.card-row:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
    color: inherit;
}

.avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-weight: 700;
    font-size: 0.95rem;
}

.card-row__body { flex: 1; min-width: 0; }
.card-row__title { font-weight: 600; color: var(--charcoal); margin-bottom: 0.15rem; }
.card-row__meta { font-size: 0.85rem; color: var(--text-muted); }
.card-row__arrow { color: var(--text-muted); font-size: 1.1rem; }

.empty-state {
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

/* ── Alerts ── */
.alert {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-error { background: var(--danger-bg); border-color: #ffc9d4; color: var(--danger); }
.alert-success { background: var(--success-bg); border-color: #b8ebd6; color: var(--success); }

/* ── Forms ── */
.form label {
    display: block;
    margin-bottom: 0.85rem;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--charcoal-soft);
}

.form input, .form select, .form textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 0.35rem;
    padding: 0.65rem 0.85rem;
    min-height: 2.75rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font: inherit;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form input:focus, .form select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form--public .form input { width: 100%; }
.public-form-wrap { max-width: 100%; }

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0;
}

.search-form input {
    flex: 1;
    min-width: 180px;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    font: inherit;
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; margin: 1rem 0; }

.report-table {
    width: 100%;
    min-width: 280px;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.report-table th, .report-table td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.report-table th {
    background: var(--surface-2);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.report-table tbody tr:hover { background: #fdfbfa; }
.report-table tbody tr:last-child td { border-bottom: none; }
.report-table tr.stock-low { background: #fff8eb; }
.report-table tr.stock-out { background: var(--danger-bg); }

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-created { background: #c4b5bc; color: #fff; }
.badge-confirmed { background: var(--accent-deep); color: #fff; }
.badge-done { background: var(--success); color: #fff; }
.badge-cancelled { background: var(--danger); color: #fff; }
.badge-active { background: var(--success); color: #fff; }
.badge-inactive { background: #9ca3af; color: #fff; }

.stock-warning { color: var(--danger); font-weight: 600; font-size: 0.85rem; }
.stock-warning-low { color: #b45309; }

/* ── Lists (legacy) ── */
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.dashboard-links { list-style: none; padding: 0; margin: 0; }
.dashboard-links li { margin: 0.4rem 0; }

/* ── Calendar ── */
.view-toggle { margin-bottom: 1rem; }
.calendar-wrap { overflow-x: auto; margin-bottom: 1.5rem; }

.calendar-grid {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.calendar-grid th, .calendar-grid td {
    border: 1px solid var(--border);
    padding: 0.35rem 0.55rem;
    vertical-align: top;
}

.calendar-grid th { background: var(--surface-2); font-weight: 600; }
.calendar-time { width: 4rem; color: var(--text-muted); white-space: nowrap; }
.calendar-cell { min-width: 8rem; min-height: 2.75rem; }
.calendar-cell.day-today { background: #fdf8f6; }
.calendar-grid th.day-today { background: var(--accent-soft); }
.calendar-grid th.day-off { background: var(--surface-2); color: var(--text-muted); }
.day-off-msg { color: var(--text-muted); }

.calendar-card {
    display: block;
    padding: 0.45rem 0.55rem;
    margin: 0.2rem 0;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-deep);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.calendar-card.calendar-card-cancelled { border-left-color: var(--danger); background: var(--danger-bg); }
.calendar-card-time { font-size: 0.75rem; color: var(--text-muted); }
.calendar-card-client { font-weight: 600; }
.calendar-card-service { font-size: 0.82rem; color: var(--text-muted); }
.calendar-card-actions { margin-top: 0.35rem; }
.calendar-card-actions form { display: inline; }

/* ── Slots ── */
.availability-block {
    padding: 1.15rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.availability-block h2 { margin-top: 0; font-size: 1.1rem; }
.slots-grid { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.65rem; }

.slot {
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: default;
}

.slot-free {
    background: var(--success-bg);
    color: var(--success);
    border-color: #b8e6cc;
    cursor: pointer;
}

.slot-free:hover { background: #dff5ea; }
.slot-busy { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
.slot-selected { background: var(--charcoal); color: #fff; }
.slot-hint, .slots-no-free { color: var(--text-muted); font-size: 0.9rem; }
.slot-error { color: var(--danger); }

.service-preview img {
    max-width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero__visual { min-height: 280px; order: -1; }
    .feature-cards { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        left: 0; top: 0;
        z-index: 200;
        width: min(var(--sidebar-w), 85vw);
        transform: translateX(-100%);
        transition: transform var(--transition);
    }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 199;
        background: rgba(28, 20, 24, 0.45);
    }
    .sidebar-backdrop.is-open { display: block; }
    .sidebar-toggle { display: inline-flex; }
}

@media (max-width: 640px) {
    .hero__actions { flex-direction: column; }
    .btn-landing { width: 100%; justify-content: center; }
    .wizard-progress__step { font-size: 0.65rem; padding: 0.75rem 0.35rem; }
    .service-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─────────────────────────────────────────────────────────────
   Nailora Atelier — refined visual system
   ───────────────────────────────────────────────────────────── */
:root {
    --ivory: #f7f4f0;
    --surface: #fffdfb;
    --surface-2: #f0ebe6;
    --charcoal: #20191d;
    --charcoal-soft: #382c33;
    --text: #241c21;
    --text-muted: #776b71;
    --border: rgba(67, 46, 56, 0.11);
    --border-strong: rgba(67, 46, 56, 0.2);
    --accent: #d7a0a7;
    --accent-strong: #c78690;
    --accent-deep: #9f5f6b;
    --accent-soft: rgba(199, 134, 144, 0.13);
    --accent-glow: rgba(178, 105, 118, 0.22);
    --plum: #37232f;
    --plum-2: #4c2f3e;
    --champagne: #d9c29d;
    --shadow-sm: 0 8px 30px rgba(43, 29, 36, 0.055);
    --shadow-md: 0 22px 60px rgba(43, 29, 36, 0.095);
    --shadow-lg: 0 36px 100px rgba(43, 29, 36, 0.15);
}

body {
    background:
        radial-gradient(circle at 85% 10%, rgba(215, 160, 167, 0.09), transparent 28rem),
        var(--ivory);
}

::selection { background: rgba(199, 134, 144, 0.3); color: var(--charcoal); }

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Brand */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.logo__mark,
.sidebar__logo-mark {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50% 50% 46% 54%;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 700;
    line-height: 1;
}

.logo__mark {
    color: #fff;
    background: linear-gradient(145deg, var(--plum-2), var(--plum));
    box-shadow: 0 6px 18px rgba(55, 35, 47, 0.2);
}

.logo__word { letter-spacing: -0.04em; }

.header {
    min-height: 72px;
    padding-inline: clamp(1rem, 4vw, 4rem);
    background: rgba(247, 244, 240, 0.78);
    border-bottom-color: rgba(67, 46, 56, 0.08);
}

.header .nav-link { letter-spacing: 0.01em; }
.header .nav-link.active {
    background: var(--plum);
    box-shadow: 0 7px 18px rgba(55, 35, 47, 0.16);
}

/* Editorial landing */
.hero {
    min-height: calc(100vh - 72px);
    grid-template-columns: minmax(340px, 0.92fr) minmax(400px, 1.08fr);
    gap: clamp(3rem, 7vw, 8rem);
    max-width: 1500px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 5.5rem);
}

.hero__visual {
    min-height: min(660px, calc(100vh - 150px));
    border: 0;
    border-radius: 220px 220px 32px 32px;
    background:
        linear-gradient(160deg, rgba(255,255,255,.75), transparent 45%),
        linear-gradient(145deg, #eadbd6, #c99da4 58%, #8f606d);
    box-shadow: 0 45px 100px rgba(69, 42, 55, 0.22);
    isolation: isolate;
}

.hero__visual::before {
    content: "";
    position: absolute;
    inset: 14px;
    z-index: 1;
    border: 1px solid rgba(255,255,255,.42);
    border-radius: 210px 210px 24px 24px;
    pointer-events: none;
}

.hero__visual-label {
    position: absolute;
    top: 2.6rem;
    left: 50%;
    z-index: 3;
    transform: translateX(-50%);
    color: rgba(255,255,255,.8);
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .22em;
    white-space: nowrap;
}

.hero__orb { z-index: -1; filter: blur(55px); }
.hero__orb--1 { background: #fff3ed; opacity: .7; }
.hero__orb--2 { background: #794959; opacity: .55; }

.polish-display {
    position: relative;
    width: 260px;
    height: 390px;
}

.polish-display__bottle {
    position: absolute;
    inset: 25px 35px 20px;
    filter: drop-shadow(0 30px 22px rgba(56, 26, 41, .26));
}

.polish-display__cap {
    position: absolute;
    top: 0;
    left: 50%;
    width: 80px;
    height: 135px;
    transform: translateX(-50%);
    border-radius: 18px 18px 8px 8px;
    background: linear-gradient(90deg, #21191d, #49343f 55%, #1e171b);
}

.polish-display__cap::after {
    content: "";
    position: absolute;
    inset: 14px 10px;
    border-left: 1px solid rgba(255,255,255,.1);
    border-right: 1px solid rgba(255,255,255,.06);
}

.polish-display__glass {
    position: absolute;
    left: 50%;
    bottom: 0;
    display: grid;
    place-items: center;
    width: 188px;
    height: 240px;
    transform: translateX(-50%);
    border: 2px solid rgba(255,255,255,.55);
    border-radius: 42px 42px 62px 62px;
    background:
        linear-gradient(110deg, rgba(255,255,255,.35), transparent 25%),
        linear-gradient(145deg, rgba(95,51,69,.85), rgba(45,25,35,.96));
    box-shadow: inset 0 0 40px rgba(255,255,255,.08);
}

.polish-display__glass b {
    font-family: var(--font-display);
    font-size: 5rem;
    font-style: italic;
    font-weight: 600;
    color: rgba(236, 214, 204, .88);
}

.polish-display__ring {
    position: absolute;
    right: -10px;
    bottom: 35px;
    width: 74px;
    height: 74px;
    border: 7px solid rgba(225, 197, 153, .82);
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(75,45,56,.18), inset 0 0 0 2px rgba(255,255,255,.5);
    transform: rotate(-18deg);
}

.polish-display__spark {
    position: absolute;
    color: rgba(255,255,255,.82);
    text-shadow: 0 0 20px rgba(255,255,255,.5);
}
.polish-display__spark--1 { top: 80px; right: 5px; font-size: 2rem; }
.polish-display__spark--2 { bottom: 95px; left: 0; font-size: 1.5rem; }

.hero__floating-card {
    position: absolute;
    right: -2rem;
    bottom: 3rem;
    z-index: 5;
    min-width: 210px;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 16px;
    background: rgba(255,253,251,.88);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 50px rgba(54,32,43,.18);
}

.hero__floating-card span {
    display: block;
    margin-bottom: .2rem;
    color: var(--text-muted);
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.hero__floating-card strong { font-family: var(--font-display); color: var(--plum); }

.hero__content { max-width: 610px; }
.hero__eyebrow { background: transparent; padding: 0; color: var(--accent-deep); }
.hero__eyebrow i {
    display: inline-block;
    width: 28px;
    height: 1px;
    margin-right: .65rem;
    vertical-align: middle;
    background: currentColor;
}
.hero__title {
    font-size: clamp(3.25rem, 6.6vw, 6.5rem);
    letter-spacing: -.055em;
    line-height: .94;
    margin-bottom: 1.5rem;
}
.hero__title em { color: var(--accent-deep); font-weight: 600; }
.hero__lead { max-width: 48ch; font-size: 1.08rem; }

.btn-landing { min-width: 190px; padding: 1rem 1.5rem; }
.btn-landing--client { background: var(--plum); box-shadow: 0 14px 35px rgba(55,35,47,.22); }
.btn-landing--client:hover { background: var(--plum-2); transform: translateY(-2px); }
.btn-landing--client span { margin-left: .4rem; transition: transform var(--transition); }
.btn-landing--client:hover span { transform: translateX(4px); }

.feature-cards { gap: 0; border-top: 1px solid var(--border-strong); padding-top: 1.4rem; }
.feature-card {
    position: relative;
    padding: .5rem 1.25rem .5rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.feature-card + .feature-card { padding-left: 1.25rem; border-left: 1px solid var(--border); }
.feature-card__number { display: block; color: var(--accent-deep); font-size: .66rem; letter-spacing: .1em; }
.feature-card__title { margin: .2rem 0; font-size: 1rem; }

/* Master workspace */
.sidebar {
    background:
        radial-gradient(circle at 10% 0%, rgba(199,134,144,.2), transparent 22rem),
        linear-gradient(175deg, #37232f, #241820 65%);
    box-shadow: 12px 0 45px rgba(41, 25, 34, .12);
}

.sidebar__logo { display: flex; align-items: center; gap: .7rem; }
.sidebar__logo em { color: var(--accent); font-style: normal; }
.sidebar__logo-mark {
    flex: 0 0 auto;
    color: var(--plum);
    background: linear-gradient(145deg, #f3dfd6, #d5a6aa);
    box-shadow: 0 8px 20px rgba(0,0,0,.16);
}

.sidebar__link { border: 1px solid transparent; }
.sidebar__link:hover { background: rgba(255,255,255,.07); }
.sidebar__link.active {
    border-color: rgba(255,255,255,.08);
    background: linear-gradient(90deg, rgba(215,160,167,.22), rgba(215,160,167,.08));
    box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar__icon { font-size: 1rem; color: var(--accent); }

.topbar {
    background: rgba(247,244,240,.84);
    backdrop-filter: blur(20px);
}
.studio-status {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,.55);
    color: var(--text-muted);
    font-size: .72rem;
}
.studio-status i {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #4f9a73;
    box-shadow: 0 0 0 4px rgba(79,154,115,.12);
}

.page-intro { position: relative; }
.page-intro::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 72px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-deep), transparent);
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 1.45rem;
    background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(255,253,251,.72));
}
.stat-card::after {
    content: "";
    position: absolute;
    right: -28px; top: -28px;
    width: 80px; height: 80px;
    border: 1px solid var(--accent-soft);
    border-radius: 50%;
    background: var(--accent-soft);
}
.stat-card__value { color: var(--plum); }
.stat-card:hover { border-color: rgba(199,134,144,.35); }

.finance-panel, .wizard-shell, .auth-card {
    background: rgba(255,253,251,.88);
    backdrop-filter: blur(12px);
}

.report-table { border-collapse: separate; border-spacing: 0; }
.report-table th { background: #eee8e4; }
.report-table tbody tr { transition: background var(--transition); }

.form input, .form select, .form textarea, .search-form input {
    background: rgba(255,255,255,.78);
}

.service-card { position: relative; overflow: hidden; }
.service-card.is-selected::after {
    content: "✓";
    position: absolute;
    top: .65rem; right: .7rem;
    display: grid; place-items: center;
    width: 1.4rem; height: 1.4rem;
    border-radius: 50%;
    background: var(--plum);
    color: #fff;
    font-size: .72rem;
}

@media (max-width: 960px) {
    .hero {
        grid-template-columns: 1fr;
        max-width: 780px;
        gap: 3rem;
    }
    .hero__visual { min-height: 480px; border-radius: 180px 180px 28px 28px; }
    .hero__visual::before { border-radius: 170px 170px 20px 20px; }
    .hero__content { max-width: none; }
    .hero__title { font-size: clamp(3.2rem, 11vw, 5.4rem); }
}

@media (max-width: 640px) {
    .header { min-height: 64px; }
    .logo__word { display: none; }
    .header .nav-link { padding: .45rem .62rem; font-size: .8rem; }
    .header .nav-right { display: none; }
    .hero { padding: 1.2rem 1rem 3rem; gap: 2.3rem; }
    .hero__visual { min-height: 390px; border-radius: 140px 140px 24px 24px; }
    .hero__visual::before { border-radius: 130px 130px 18px 18px; }
    .polish-display { transform: scale(.78); }
    .hero__floating-card { right: .6rem; bottom: 1.2rem; min-width: 180px; }
    .hero__title { font-size: clamp(3rem, 16vw, 4.5rem); }
    .feature-cards { grid-template-columns: 1fr; }
    .feature-card + .feature-card { padding-left: 0; border-left: 0; }
    .feature-card { padding: .65rem 0; border-bottom: 1px solid var(--border); }
    .studio-status { display: none; }
}
