/* ============================================================
   Agenda de Atendimento — Tema "Dark Premium / Violeta"
   ============================================================ */

:root {
    --bg:        #0a0a12;
    --bg-soft:   #0e0e1a;
    --surface:   #14141f;
    --surface-2: #1a1a28;
    --surface-3: #20203200;
    --line:      #272740;
    --line-2:    #34344f;

    --txt:       #f3f3fb;
    --muted:     #9a9ac0;
    --muted-2:   #6c6c8e;

    --violet:    #8b5cf6;
    --violet-2:  #6366f1;
    --violet-br: #c084fc;
    --grad:      linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
    --grad-soft: linear-gradient(135deg, rgba(124,58,237,.18), rgba(99,102,241,.18));
    --grad-txt:  linear-gradient(90deg, #c4b5fd, #a5b4fc);

    --green:     #34d399;
    --green-bg:  rgba(52,211,153,.12);
    --red:       #fb7185;
    --red-bg:    rgba(251,113,133,.12);
    --amber:     #fbbf24;
    --amber-bg:  rgba(251,191,36,.12);
    --blue-bg:   rgba(99,102,241,.14);

    --r:    16px;
    --r-sm: 12px;
    --r-lg: 22px;
    --glow: 0 14px 34px rgba(124,58,237,.40);
    --shadow: 0 18px 50px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--txt);
    background: var(--bg);
    background-image:
        radial-gradient(900px 500px at 50% -10%, rgba(124,58,237,.22), transparent 60%),
        radial-gradient(700px 400px at 100% 0%, rgba(99,102,241,.14), transparent 55%);
    background-attachment: fixed;
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--violet-br); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(124,58,237,.35); }

/* ---------- Layout publico ---------- */
.container { max-width: 480px; margin: 0 auto; padding: 16px 18px 40px; }

.topo { text-align: center; padding: 30px 16px 6px; }
.marca-logo {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 20px; letter-spacing: -.01em;
}
.marca-logo .selo {
    width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
    display: grid; place-items: center; box-shadow: var(--glow); flex: 0 0 auto;
}
.marca-logo .selo svg { width: 18px; height: 18px; color: #fff; }
.marca-logo .nome {
    background: var(--grad-txt); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.topo .tagline { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

.cartao {
    background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0)) , var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 24px;
    margin: 16px 0;
    box-shadow: var(--shadow);
    animation: surgir .45s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes surgir { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

h1 { font-size: 22px; margin: 0; }
h2 { font-size: 19px; margin: 0 0 6px; letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 0; }
.subtitulo { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

/* ---------- Formularios ---------- */
label { display: block; font-weight: 600; font-size: 13px; margin: 16px 0 7px; color: #d7d7ec; }

input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=url], input[type=number], input[type=date], input[type=time], select, textarea {
    width: 100%; padding: 13px 15px;
    background: var(--bg-soft);
    border: 1px solid var(--line-2);
    border-radius: var(--r-sm);
    font-size: 16px; font-family: inherit; color: var(--txt);
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(139,92,246,.25);
}
textarea { min-height: 120px; resize: vertical; }
select { appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a9ac0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}

/* ---------- Botoes ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    background: var(--grad); color: #fff; border: 0;
    padding: 14px 22px; border-radius: var(--r-sm);
    font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer;
    text-decoration: none; box-shadow: var(--glow);
    transition: transform .12s ease, box-shadow .15s, filter .15s;
}
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(124,58,237,.5); text-decoration: none; filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-bloco { width: 100%; }
.btn-secundario { background: var(--surface-2); color: var(--txt); border: 1px solid var(--line-2); box-shadow: none; }
.btn-secundario:hover { background: #23233a; box-shadow: none; }
.btn-perigo { background: linear-gradient(135deg,#f43f5e,#e11d48); box-shadow: 0 12px 28px rgba(244,63,94,.35); }
.btn-verde { background: linear-gradient(135deg,#10b981,#059669); box-shadow: 0 12px 28px rgba(16,185,129,.3); }
.btn-pequeno { padding: 9px 14px; font-size: 13.5px; border-radius: 10px; }

/* ---------- Alertas ---------- */
.alerta { padding: 13px 15px; border-radius: var(--r-sm); margin: 12px 0; font-size: 14px; border: 1px solid transparent; }
.alerta-sucesso { background: var(--green-bg); border-color: rgba(52,211,153,.3); color: #6ee7b7; }
.alerta-erro    { background: var(--red-bg);   border-color: rgba(251,113,133,.3); color: #fda4af; }
.alerta-info    { background: var(--blue-bg);  border-color: rgba(99,102,241,.3); color: #c7d2fe; }
.alerta-aviso   { background: var(--amber-bg); border-color: rgba(251,191,36,.3); color: #fcd34d; }

/* ---------- Passos (progresso do agendamento) ---------- */
.passos { display: flex; gap: 7px; justify-content: center; margin: 0 0 18px; }
.passos i { width: 30px; height: 5px; border-radius: 3px; background: var(--line-2); display: block; transition: background .3s; }
.passos i.on { background: var(--grad); }

/* ---------- Opcoes (tipo / atendente) ---------- */
.opcoes { display: grid; gap: 11px; margin: 6px 0; }
.opcao {
    display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
    background: var(--surface-2); border: 1px solid var(--line-2);
    border-radius: var(--r); padding: 16px; cursor: pointer; color: var(--txt);
    font-size: 16px; font-weight: 600; font-family: inherit;
    transition: transform .12s, border-color .15s, background .15s, box-shadow .15s;
}
.opcao:hover { transform: translateY(-2px); border-color: var(--violet); background: #20203a; box-shadow: 0 12px 26px rgba(124,58,237,.22); }
.opcao .ic {
    width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto;
    background: var(--grad-soft); border: 1px solid rgba(139,92,246,.3);
    display: grid; place-items: center; color: var(--violet-br);
}
.opcao .ic svg { width: 21px; height: 21px; }
.opcao .seta { margin-left: auto; color: var(--muted); font-size: 18px; }
.opcao small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ---------- Dias e horarios ---------- */
.dias { display: flex; gap: 9px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 12px; scrollbar-width: thin; }
.dias::-webkit-scrollbar { height: 5px; }
.dias::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.dia {
    flex: 0 0 auto; border: 1px solid var(--line-2); border-radius: 14px; padding: 11px 15px;
    text-align: center; text-decoration: none; color: var(--txt); font-size: 14px; font-weight: 600;
    background: var(--surface-2); transition: transform .12s, border-color .15s;
}
.dia:hover { transform: translateY(-2px); border-color: var(--violet); text-decoration: none; }
.dia.ativo { background: var(--grad); border-color: transparent; box-shadow: var(--glow); }
.dia small { display: block; opacity: .8; font-weight: 500; font-size: 11px; margin-top: 2px; }

.grade-horarios { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; margin-top: 6px; }
.slot {
    border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 13px;
    padding: 14px 0; font-size: 16px; font-weight: 700; cursor: pointer; color: var(--txt);
    font-family: inherit; transition: transform .12s, border-color .15s, background .15s, box-shadow .15s;
}
.slot:hover { transform: translateY(-2px); border-color: var(--violet); background: #20203a; box-shadow: 0 10px 22px rgba(124,58,237,.25); }

/* ---------- Confirmacao / estados ---------- */
.centro { text-align: center; }
.mt { margin-top: 18px; }
.selo-grande {
    width: 84px; height: 84px; border-radius: 50%; margin: 6px auto 4px;
    display: grid; place-items: center; background: var(--grad); box-shadow: var(--glow);
    animation: pop .5s cubic-bezier(.2,1.4,.5,1) both;
}
.selo-grande svg { width: 42px; height: 42px; color: #fff; }
.selo-grande.neutro { background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: none; }
.selo-grande.neutro svg { color: var(--violet-br); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.resumo { text-align: left; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 16px 18px; margin: 16px auto 0; max-width: 360px; }
.dado { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 15px; }
.dado + .dado { border-top: 1px solid var(--line); }
.dado .rot { color: var(--muted); min-width: 86px; font-size: 13px; }
.dado .val { font-weight: 600; }

.rodape { text-align: center; color: var(--muted-2); font-size: 12.5px; padding: 22px; }
.muted { color: var(--muted); font-size: 13px; }

/* ============================================================
   PAINEL ADMIN
   ============================================================ */
body.admin { background-image: radial-gradient(1100px 500px at 80% -15%, rgba(124,58,237,.16), transparent 60%); }

.admin-topo {
    position: sticky; top: 0; z-index: 30;
    background: rgba(13,13,22,.82); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.admin-topo .barra { max-width: 1140px; margin: 0 auto; padding: 11px 18px; display: flex; align-items: center; gap: 14px; }
.admin-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.admin-topo .marca-logo { font-size: 16px; margin-right: 4px; }
.admin-topo .marca-logo .selo { width: 28px; height: 28px; border-radius: 8px; }
.admin-topo a.item { color: var(--muted); font-size: 14px; font-weight: 600; padding: 7px 12px; border-radius: 10px; transition: background .15s, color .15s; }
.admin-topo a.item:hover { background: var(--surface-2); color: var(--txt); text-decoration: none; }
.admin-topo a.item.ativo { color: #fff; background: var(--grad); box-shadow: 0 8px 20px rgba(124,58,237,.35); }
.admin-topo .sair { margin-left: auto; }
.admin-wrap { max-width: 1140px; margin: 0 auto; padding: 22px 18px 50px; }

.cartoes-num { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; margin-bottom: 18px; }
.cartao-num {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px;
    display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow);
}
.cartao-num .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--grad-soft); border: 1px solid rgba(139,92,246,.3); display: grid; place-items: center; color: var(--violet-br); flex: 0 0 auto; }
.cartao-num .ic svg { width: 22px; height: 22px; }
.cartao-num .n { font-size: 26px; font-weight: 800; line-height: 1; background: var(--grad-txt); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cartao-num .r { color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.tabela { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.tabela th, .tabela td { padding: 12px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
.tabela th { background: rgba(255,255,255,.02); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tbody tr:hover td { background: rgba(124,58,237,.06); }

.etiqueta { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.etiqueta-ok        { background: var(--green-bg); color: #6ee7b7; }
.etiqueta-vencido   { background: var(--red-bg); color: #fda4af; }
.etiqueta-bloqueado { background: var(--surface-3); color: var(--muted); border: 1px solid var(--line-2); }

.copiavel { background: #07070e; color: #d7d7f0; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 15px; font-family: ui-monospace, "Cascadia Code", "Courier New", monospace; font-size: 13px; white-space: pre-wrap; line-height: 1.65; }
.bloco-copia { margin: 14px 0; }
.bloco-copia .cabecalho { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bloco-copia .cabecalho h3 { color: var(--violet-br); }

.filtros { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filtros > div { flex: 1; min-width: 130px; }
.linha-form { display: flex; gap: 12px; flex-wrap: wrap; }
.linha-form > div { flex: 1; min-width: 130px; }
.acoes-linha { display: flex; gap: 7px; flex-wrap: wrap; }
form.inline { display: inline; }
.secao-titulo { margin: 22px 0 4px; color: var(--violet-br); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }

/* ---------- Home do membro (app shell) ---------- */
.hero { text-align: center; padding: 4px 0 2px; }
.hero .ola { font-size: 23px; font-weight: 800; letter-spacing: -.01em; }
.hero .sub { color: var(--muted); font-size: 14px; margin-top: 3px; }

.install-banner { display: none; align-items: center; gap: 12px; background: var(--grad-soft);
    border: 1px solid rgba(139,92,246,.35); border-radius: var(--r); padding: 12px 14px; margin: 14px 0; }
.install-banner .ic { color: var(--violet-br); flex: 0 0 auto; } .install-banner .ic svg { width: 22px; height: 22px; }
.install-banner .txt { font-size: 13.5px; line-height: 1.4; }
.install-banner .fechar { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; padding: 0 2px; line-height: 1; }

.acoes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 4px; }
.acao-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--r); padding: 16px; color: var(--txt); text-decoration: none;
    box-shadow: var(--shadow); transition: transform .12s, border-color .15s; }
.acao-card:hover { transform: translateY(-2px); border-color: var(--violet); text-decoration: none; }
.acao-card.destaque { grid-column: 1 / -1; background: var(--grad); border: 0; box-shadow: var(--glow); }
.acao-card .ic { width: 40px; height: 40px; border-radius: 11px; background: var(--grad-soft);
    border: 1px solid rgba(139,92,246,.3); display: grid; place-items: center; color: var(--violet-br); }
.acao-card.destaque .ic { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.25); color: #fff; }
.acao-card .ic svg { width: 20px; height: 20px; }
.acao-card .t { font-weight: 700; font-size: 15px; }
.acao-card .d { font-size: 12.5px; color: var(--muted); }
.acao-card.destaque .d { color: rgba(255,255,255,.88); }

.secao-cab { display: flex; align-items: center; gap: 9px; margin: 22px 4px 12px; }
.secao-cab h2 { margin: 0; font-size: 17px; }
.secao-cab .ic { color: var(--violet-br); display: grid; place-items: center; } .secao-cab .ic svg { width: 19px; height: 19px; }

.aviso-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 11px; box-shadow: var(--shadow); }
.aviso-card .top { display: flex; align-items: center; gap: 8px; }
.aviso-card .pin { color: var(--violet-br); display: grid; place-items: center; } .aviso-card .pin svg { width: 16px; height: 16px; }
.aviso-card h3 { font-size: 15.5px; }
.aviso-card .quando { color: var(--muted-2); font-size: 12px; margin-left: auto; white-space: nowrap; }
.aviso-card .corpo { margin: 8px 0 0; color: #d3d3ec; font-size: 14px; white-space: pre-line; }
.aviso-card .maislink { display: inline-flex; align-items: center; gap: 5px; margin-top: 11px; font-weight: 600; font-size: 13.5px; }

.prox-item { display: flex; align-items: center; gap: 13px; padding: 13px 0; }
.prox-item + .prox-item { border-top: 1px solid var(--line); }
.prox-item .qd { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 0; width: 56px; text-align: center; flex: 0 0 auto; }
.prox-item .qd .dia { font-size: 19px; font-weight: 800; line-height: 1; }
.prox-item .qd .mes { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.prox-item .info .h { font-weight: 700; }
.prox-item .info .s { color: var(--muted); font-size: 13px; }

@media (max-width: 600px) {
    .cartao { padding: 20px; }
    .admin-topo .barra { gap: 10px; }
    .admin-topo a.item { padding: 6px 10px; font-size: 13px; }
}
