/* =====================================================================
   Letícia Malachoski Beauty Studio · Indicações
   Design system — refined feminine operational
   ===================================================================== */

:root {
    /* Paleta */
    --bone:        #FBF7F4;
    --bone-warm:   #F4ECE5;
    --ink:         #1F1A1B;
    --ink-soft:    #5C4F52;
    --ink-mute:    #8B7C80;

    --rose-deep:   #8D5D6B;
    --rose-mid:    #B48291;
    --rose-soft:   #E8DDD9;
    --rose-veil:   #F4E9E5;

    --champagne:   #C8A165;
    --champagne-soft: #E5D4AC;

    --sage:        #6B9B65;
    --sage-soft:   #DDEAD9;

    --crimson:     #A0364B;
    --crimson-soft:#F5DCE0;

    --amber:       #C58A2D;
    --amber-soft:  #F5E5C8;

    /* Sombras */
    --shadow-xs: 0 1px 2px rgba(31,26,27,.04);
    --shadow-sm: 0 2px 8px rgba(31,26,27,.05);
    --shadow-md: 0 8px 24px rgba(31,26,27,.06);
    --shadow-lg: 0 24px 60px rgba(31,26,27,.08);

    /* Raios */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 22px;
    --r-pill: 999px;

    /* Tipo */
    --display: 'Fraunces', 'Times New Roman', serif;
    --body:    'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--bone);
    color: var(--ink);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Background com textura sutil + gradiente warm */
body {
    background:
        radial-gradient(ellipse 800px 400px at 10% -10%, var(--rose-veil) 0%, transparent 60%),
        radial-gradient(ellipse 600px 600px at 100% 100%, var(--champagne-soft) 0%, transparent 50%),
        var(--bone);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Tipografia */
.display { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; }
.display-italic { font-family: var(--display); font-weight: 400; font-style: italic; letter-spacing: -.02em; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
.eyebrow {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--ink-mute);
}

/* Layout principal */
.shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 28px 20px 96px;
}
@media (min-width: 768px) { .shell { padding: 40px 28px; } }

/* Header — branding */
.brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.brand-mark {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.brand-mark .name {
    font-family: var(--display);
    font-style: italic;
    font-weight: 500;
    font-size: 1.4rem;
    color: var(--rose-deep);
    letter-spacing: -.02em;
}
.brand-mark .sub {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .25em;
    color: var(--ink-mute);
    margin-top: 4px;
}
.brand-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--rose-mid), var(--rose-deep));
    border-radius: 14px;
    display: grid; place-items: center;
    color: white;
    font-family: var(--display);
    font-style: italic;
    font-size: 1.4rem;
    box-shadow: var(--shadow-sm);
}
.brand-actions { display: flex; gap: 10px; align-items: center; font-size: .85rem; }
.brand-actions a { color: var(--ink-mute); text-decoration: none; }
.brand-actions a:hover { color: var(--rose-deep); }

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: var(--r-md);
    font-family: var(--body);
    font-weight: 500;
    font-size: .95rem;
    line-height: 1;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform .15s, box-shadow .2s, background .2s;
    white-space: nowrap;
}
.btn-primary {
    background: var(--ink);
    color: var(--bone);
}
.btn-primary:hover { background: var(--rose-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-rose {
    background: linear-gradient(135deg, var(--rose-mid), var(--rose-deep));
    color: white;
    box-shadow: 0 4px 16px rgba(141, 93, 107, .25);
}
.btn-rose:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(141, 93, 107, .35); }
.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 1px solid var(--rose-soft);
}
.btn-ghost:hover { background: var(--rose-veil); color: var(--rose-deep); }
.btn-sage  { background: var(--sage); color: white; }
.btn-sage:hover { filter: brightness(.92); }
.btn-crimson  { background: var(--crimson); color: white; }
.btn-crimson:hover { filter: brightness(.92); }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 18px 28px; font-size: 1.05rem; border-radius: var(--r-lg); }

/* Cards */
.card {
    background: white;
    border: 1px solid var(--rose-soft);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.card-pad { padding: 24px; }
.card-head {
    padding: 18px 24px;
    border-bottom: 1px solid var(--rose-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title {
    font-family: var(--display);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--ink);
}

/* Big action cards (home) */
.action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 24px 0 32px;
}
@media (min-width: 768px) {
    .action-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
.action-card {
    display: block;
    padding: 26px 24px;
    border-radius: var(--r-lg);
    text-decoration: none;
    color: var(--ink);
    transition: transform .2s, box-shadow .25s;
    background: white;
    border: 1px solid var(--rose-soft);
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}
.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--rose-mid);
}
.action-card .ico {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: grid; place-items: center;
    margin-bottom: 18px;
    font-size: 28px;
}
.action-card .ico.rose      { background: var(--rose-veil);    color: var(--rose-deep); }
.action-card .ico.champagne { background: var(--champagne-soft); color: var(--champagne); }
.action-card .ico.sage      { background: var(--sage-soft);    color: var(--sage); }
.action-card .title {
    font-family: var(--display);
    font-weight: 500;
    font-size: 1.5rem;
    line-height: 1.1;
    margin-bottom: 6px;
    letter-spacing: -.02em;
}
.action-card .desc {
    color: var(--ink-mute);
    font-size: .92rem;
}
.action-card .arrow {
    position: absolute;
    top: 24px; right: 22px;
    color: var(--rose-mid);
    opacity: 0;
    transition: opacity .25s, transform .25s;
}
.action-card:hover .arrow { opacity: 1; transform: translateX(2px); }

/* Action card primária (resgatar — destaque) */
.action-card.primary {
    background: linear-gradient(135deg, #2d2025 0%, var(--rose-deep) 100%);
    color: white;
    border-color: var(--rose-deep);
}
.action-card.primary .ico {
    background: rgba(255,255,255,.12);
    color: var(--champagne-soft);
}
.action-card.primary .desc { color: rgba(255,255,255,.7); }
.action-card.primary .arrow { color: var(--champagne-soft); opacity: .8; }

/* KPIs */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}
@media (min-width: 768px) { .kpi-row { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.kpi {
    background: white;
    border: 1px solid var(--rose-soft);
    border-radius: var(--r-md);
    padding: 16px 18px;
}
.kpi .label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--ink-mute);
    margin-bottom: 8px;
    font-weight: 600;
}
.kpi .value {
    font-family: var(--display);
    font-size: 1.65rem;
    font-weight: 500;
    line-height: 1;
    color: var(--ink);
}
.kpi.accent .value { color: var(--rose-deep); }
.kpi.warn .value { color: var(--amber); }
.kpi.success .value { color: var(--sage); }

/* Forms */
.field { margin-bottom: 16px; }
.field-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 8px;
}
.field-label.optional::after {
    content: ' (opcional)';
    font-weight: 400;
    color: var(--ink-mute);
    font-size: .75rem;
}
.input, .select, .textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--rose-soft);
    border-radius: var(--r-md);
    background: white;
    font-family: var(--body);
    font-size: 1rem;
    color: var(--ink);
    transition: border .15s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--rose-mid);
    box-shadow: 0 0 0 4px var(--rose-veil);
}
.input.input-hero {
    font-size: 1.5rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    text-align: center;
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: 22px;
    border-width: 2px;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.badge-sage    { background: var(--sage-soft);    color: var(--sage); }
.badge-rose    { background: var(--rose-veil);    color: var(--rose-deep); }
.badge-amber   { background: var(--amber-soft);   color: var(--amber); }
.badge-crimson { background: var(--crimson-soft); color: var(--crimson); }
.badge-mute    { background: #ECE5E2; color: var(--ink-mute); }

/* Tabelas refinadas */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}
.table thead th {
    text-align: left;
    padding: 12px 18px;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ink-mute);
    background: var(--bone-warm);
}
.table tbody td {
    padding: 16px 18px;
    border-top: 1px solid var(--rose-soft);
    vertical-align: top;
}
.table tbody tr:hover { background: var(--rose-veil); }
.code {
    font-family: 'JetBrains Mono', monospace;
    font-size: .85rem;
    background: var(--bone-warm);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: .05em;
}

/* Flash messages */
.flash {
    padding: 16px 20px;
    border-radius: var(--r-md);
    margin-bottom: 16px;
    font-size: .92rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.flash-sucesso { background: var(--sage-soft);    color: #2D5C28; border: 1px solid #BFD9BB; }
.flash-erro    { background: var(--crimson-soft); color: var(--crimson); border: 1px solid #E5B5BC; }
.flash-aviso   { background: var(--amber-soft);   color: #8B5E15; border: 1px solid #DCC78F; }
.flash-icon { font-size: 1.3rem; }

/* Hero — voucher resgate */
.hero {
    background: white;
    border: 1px solid var(--rose-soft);
    border-radius: var(--r-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% -20%, var(--rose-veil) 0%, transparent 60%);
    pointer-events: none;
}
.hero > * { position: relative; }
.hero .eyebrow { margin-bottom: 12px; }
.hero h1 { font-size: 1.8rem; margin-bottom: 8px; }
.hero .lead { color: var(--ink-mute); font-size: 1rem; max-width: 420px; margin: 0 auto 28px; }

/* Voucher resultado — encontrado */
.voucher-found {
    background: linear-gradient(135deg, #FFFBF5 0%, var(--rose-veil) 100%);
    border: 1.5px solid var(--rose-mid);
    border-radius: var(--r-lg);
    padding: 24px;
    margin-top: 20px;
    text-align: center;
    position: relative;
}
.voucher-found .vc-codigo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: .15em;
    color: var(--rose-deep);
    margin-bottom: 10px;
}
.voucher-found .vc-valor {
    font-family: var(--display);
    font-size: 3rem;
    font-weight: 600;
    line-height: 1;
    color: var(--ink);
    margin: 8px 0;
}
.voucher-found .vc-cliente {
    font-size: 1.05rem;
    color: var(--ink-soft);
    margin-bottom: 8px;
}
.voucher-found .vc-vence {
    font-size: .85rem;
    color: var(--ink-mute);
}

/* Indicação — par cards */
.par-card {
    background: white;
    border: 1px solid var(--rose-soft);
    border-radius: var(--r-md);
    padding: 18px 20px;
    margin-bottom: 12px;
    transition: border .2s;
}
.par-card:hover { border-color: var(--rose-mid); }
.par-flow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 1.02rem;
}
.par-flow .arrow { color: var(--rose-mid); font-weight: 600; font-size: 1.2rem; }
.par-name { font-weight: 600; color: var(--ink); }
.par-meta { color: var(--ink-mute); font-size: .85rem; margin-top: 6px; }

/* Lista clientes (cards stacked) */
.cliente-card {
    background: white;
    border: 1px solid var(--rose-soft);
    border-radius: var(--r-md);
    padding: 18px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border .2s, transform .2s;
    text-decoration: none;
    color: var(--ink);
}
.cliente-card:hover { border-color: var(--rose-mid); transform: translateX(2px); }
.cliente-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--rose-veil);
    color: var(--rose-deep);
    display: grid; place-items: center;
    font-family: var(--display);
    font-style: italic;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.cliente-info { flex: 1; min-width: 0; }
.cliente-name { font-weight: 600; font-size: 1rem; color: var(--ink); }
.cliente-meta { font-size: .85rem; color: var(--ink-mute); margin-top: 2px; }
.cliente-stats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

/* Wizard step */
.steps {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    align-items: center;
    color: var(--ink-mute);
    font-size: .85rem;
}
.step-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--rose-soft);
    color: var(--ink-mute);
    display: grid; place-items: center;
    font-weight: 600;
    font-size: .85rem;
}
.step-dot.active { background: var(--rose-deep); color: white; }
.step-dot.done { background: var(--sage); color: white; }

/* Empty state */
.empty {
    text-align: center;
    padding: 40px 24px;
    color: var(--ink-mute);
}
.empty .ico {
    font-size: 3rem;
    opacity: .35;
    margin-bottom: 12px;
    font-family: var(--display);
}

/* Search bar */
.search {
    display: flex;
    gap: 8px;
    align-items: center;
    background: white;
    border: 1.5px solid var(--rose-soft);
    border-radius: var(--r-pill);
    padding: 6px 6px 6px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-xs);
}
.search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--body);
    font-size: .95rem;
    color: var(--ink);
    padding: 8px 0;
}
.search input::placeholder { color: var(--ink-mute); }
.search button {
    background: var(--ink);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: var(--r-pill);
    font-family: var(--body);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
}

/* Filter pills */
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
    padding: 7px 14px;
    border-radius: var(--r-pill);
    background: white;
    border: 1px solid var(--rose-soft);
    color: var(--ink-mute);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 500;
    transition: all .15s;
}
.pill:hover { border-color: var(--rose-mid); color: var(--rose-deep); }
.pill.active { background: var(--ink); color: white; border-color: var(--ink); }

/* Mobile bottom nav */
.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 16px; right: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    background: rgba(31,26,27,.95);
    backdrop-filter: blur(12px);
    border-radius: var(--r-pill);
    padding: 6px;
    box-shadow: 0 12px 40px rgba(31,26,27,.18);
    z-index: 50;
}
@media (min-width: 768px) { .bottom-nav { display: none; } }
.bottom-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 6px;
    border-radius: var(--r-pill);
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 500;
    transition: all .2s;
}
.bottom-nav a.active {
    background: white;
    color: var(--ink);
}

/* Top nav (desktop) */
.top-nav {
    display: none;
    gap: 4px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rose-soft);
}
@media (min-width: 768px) { .top-nav { display: flex; } }
.top-nav a {
    padding: 8px 16px;
    border-radius: var(--r-pill);
    color: var(--ink-mute);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: all .15s;
}
.top-nav a:hover { color: var(--rose-deep); }
.top-nav a.active { background: var(--ink); color: white; }

/* Utility */
.muted { color: var(--ink-mute); }
.text-rose { color: var(--rose-deep); }
.text-sage { color: var(--sage); }
.text-crimson { color: var(--crimson); }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.hidden { display: none; }

/* Dialog/expand inline */
[x-cloak] { display: none !important; }
.expand-panel {
    margin-top: 14px;
    padding: 16px;
    background: var(--rose-veil);
    border-radius: var(--r-md);
}

/* Print only voucher PDF preview area */
@media print {
    .no-print { display: none !important; }
}

/* Cleanup mobile bottom space */
.shell { padding-bottom: 110px; }
@media (min-width: 768px) { .shell { padding-bottom: 60px; } }
