@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #197fe6;
    /* Azul Cemol */
    --primary-light: #4ea2f1;
    --primary-dark: #125ba5;
    --bg-light: #f6f7f8;
    /* Fundo do site Cemol */
    --text-main: #1e293b;
    --text-soft: #64748b;
    --white: #ffffff;
    --success: #22C55E;
    /* Verde Whatsapp do site */
    --shadow-soft: 0 10px 25px rgba(25, 127, 230, 0.08);
    --shadow-hover: 0 15px 40px rgba(25, 127, 230, 0.15);
    --radius-lg: 16px;
    --radius-md: 10px;
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

h1 {
    text-align: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

h2 {
    font-weight: 600;
    color: var(--primary-dark);
    margin-top: 0;
}

/* Cards do Painel e Admin */
.painel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.baia-card {
    position: relative;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.baia-card.ocupada {
    border-left: 6px solid var(--primary);
}

.baia-card .status {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--text-soft);
    font-weight: 700;
    text-transform: uppercase;
}

.baia-card.ocupada .status {
    background: #dcfce7;
    color: var(--success);
}

.baia-card .baia-nome {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 4px;
}

.baia-card .medico {
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 12px;
}

.baia-card .senha {
    font-size: 4rem;
    color: var(--primary);
    font-weight: 800;
    text-align: center;
    margin: 15px 0;
    line-height: 1;
}

/* Botões e Inputs - Azul Cemol */
button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

input[type="text"],
input[type="tel"],
input[type="password"],
select {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-size: 1rem;
    background-color: var(--white);
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Audio Overlay */
#audio-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    text-align: center;
}

#audio-overlay h2 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 8px;
}

#audio-overlay button {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* Animação de Chamada */
@keyframes pulse-call {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 127, 230, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(25, 127, 230, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(25, 127, 230, 0);
    }
}

.chamando {
    border: 2px solid var(--primary) !important;
    animation: pulse-call 1.5s infinite;
}

@media (max-width: 600px) {
    .painel-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.6rem;
    }

    .baia-card .senha {
        font-size: 3rem;
    }
}

/* Estilo Tabelas (Admin) */
td {
    background: white !important;
}

th {
    color: var(--primary-dark) !important;
    font-size: 0.85rem;
}

.config-card {
    border: 1px solid #e2e8f0;
}

/* Totem: Grid e Passos */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botões Estilo Card (Totem) */
button.card {
    background: var(--white);
    color: var(--text-main);
    border: 1.5px solid #e2e8f0;
    box-shadow: var(--shadow-soft);
    padding: 24px;
    height: auto;
    text-align: center;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

button.card:hover {
    border-color: var(--primary);
    background: #f0f9ff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.senha-grande {
    font-size: 6rem;
    color: var(--primary);
    font-weight: 800;
    text-shadow: 4px 4px 0px rgba(25, 127, 230, 0.05);
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}

.dashboard-hero,
.dashboard-panel {
    position: relative;
}

.dashboard-hero > div,
.dashboard-panel {
    background:
        radial-gradient(circle at top left, rgba(78, 162, 241, 0.25), transparent 35%),
        linear-gradient(135deg, #fefefe 0%, #f5f9ff 52%, #eef6ff 100%);
    border: 1px solid rgba(25, 127, 230, 0.12);
    border-radius: 24px;
    box-shadow: 0 22px 60px rgba(18, 91, 165, 0.08);
}

.dashboard-hero > div:first-child {
    padding: 30px;
}

.dashboard-hero h2 {
    font-size: 2rem;
    line-height: 1.05;
    margin: 10px 0 12px;
    letter-spacing: -0.04em;
}

.dashboard-hero p {
    margin: 0;
    color: var(--text-soft);
    max-width: 52ch;
}

.eyebrow,
.panel-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--primary-dark);
    font-weight: 700;
}

.hero-badge {
    padding: 26px;
    color: white;
    background:
        linear-gradient(145deg, #0d2744 0%, #197fe6 48%, #38bdf8 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    overflow: hidden;
}

.hero-badge span,
.hero-badge small {
    opacity: 0.85;
}

.hero-badge strong {
    display: block;
    font-size: 1.75rem;
    line-height: 1;
    margin: 8px 0;
}

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.metric-card {
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(25, 127, 230, 0.08);
    box-shadow: 0 14px 32px rgba(18, 91, 165, 0.08);
}

.metric-label {
    color: var(--text-soft);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.metric-value {
    display: block;
    font-size: 2rem;
    line-height: 1;
    color: var(--primary-dark);
    margin: 12px 0 10px;
    letter-spacing: -0.04em;
}

.metric-footnote {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
    gap: 24px;
}

.dashboard-side-column {
    display: grid;
    gap: 24px;
}

.dashboard-panel {
    padding: 24px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}

.panel-header h3 {
    margin: 6px 0 0;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.panel-pill {
    background: rgba(25, 127, 230, 0.1);
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
}

.attendant-list,
.specialty-list,
.timeline-list {
    display: grid;
    gap: 14px;
}

.attendant-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(25, 127, 230, 0.08);
    border-radius: 20px;
}

.attendant-rank {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--primary-dark);
    background: linear-gradient(145deg, #d7ecff 0%, #f7fbff 100%);
}

.attendant-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.attendant-meta,
.specialty-meta,
.timeline-meta {
    color: var(--text-soft);
    font-size: 0.9rem;
}

.attendant-stats {
    text-align: right;
}

.attendant-stats strong {
    display: block;
    font-size: 1.4rem;
    color: var(--primary-dark);
    line-height: 1;
}

.specialty-item,
.timeline-item {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(25, 127, 230, 0.08);
}

.specialty-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(25, 127, 230, 0.08);
    overflow: hidden;
    margin-top: 10px;
}

.specialty-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #197fe6 0%, #38bdf8 100%);
}

.empty-state {
    padding: 28px;
    text-align: center;
    color: var(--text-soft);
    border: 1px dashed rgba(25, 127, 230, 0.24);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.6);
}

@media (max-width: 980px) {
    .dashboard-hero,
    .dashboard-main-grid,
    .dashboard-summary-grid {
        grid-template-columns: 1fr;
    }
}
