/* ===== VARIÁVEIS GLOBAIS - STOP & DEGUSTE ===== */
:root {
    --cor-primaria: #FF6B35;       /* Laranja Churros */
    --cor-secundaria: #004E89;     /* Azul Profundo */
    --cor-fundo: #F8F9FA;          /* Fundo suave */
    --cor-card: #FFFFFF;
    --cor-texto: #2D3748;
    --cor-texto-suave: #718096;
    --cor-sucesso: #38A169;
    --cor-erro: #E53E3E;
    --cor-aviso: #DD6B20;
    --cor-borda: #E2E8F0;
    
    --fonte-principal: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --raio-borda: 8px;
    --sombra: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--fonte-principal);
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    line-height: 1.5;
}

/* ===== TELA DE LOGIN ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #FF6B35 0%, #1A365D 100%);
    padding: 16px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--cor-card);
    border-radius: 12px;
    padding: 36px 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-card h1 {
    font-size: 26px;
    color: var(--cor-primaria);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 14px;
    color: var(--cor-texto-suave);
}

.form-step {
    display: none;
    text-align: left;
}

.form-step.active {
    display: block;
}

/* ===== CAMPOS DE FORMULÁRIO ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cor-texto);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--cor-borda);
    border-radius: var(--raio-borda);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #FAFAFA;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    background-color: #FFFFFF;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

/* ===== BOTÕES ===== */
.btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: var(--raio-borda);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--cor-primaria);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: #E05A28;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--cor-secundaria);
    color: #FFFFFF;
}

.btn-secondary:hover {
    background-color: #003B68;
}

.btn-link {
    background: transparent;
    color: var(--cor-primaria);
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== MENSAGENS E FEEDBACK ===== */
.error-message {
    color: var(--cor-erro);
    font-size: 13px;
    display: block;
    margin-top: 4px;
}

.timer {
    text-align: center;
    font-size: 13px;
    color: var(--cor-texto-suave);
    margin: 14px 0;
}

#countdown {
    font-weight: 700;
    color: var(--cor-aviso);
}

.loading {
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    color: var(--cor-texto-suave);
}

/* ===== COMPONENTES GLOBAIS: CARDS E MODAIS ===== */
.card {
    background: var(--cor-card);
    border-radius: 10px;
    padding: 24px;
    box-shadow: var(--sombra);
    border: 1px solid var(--cor-borda);
    margin-bottom: 24px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.modal-box {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 28px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--cor-borda);
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== TABELAS COMPACTAS (STOP & DEGUSTE COLOR SCHEME) ===== */
.table-card {
    width: 100%;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--cor-borda);
    overflow-x: auto;
}

.custom-table, .tabela-resgates {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
    font-size: 13px;
}

/* Cabeçalho da Tabela */
.custom-table thead tr, .tabela-resgates thead tr {
    background: linear-gradient(90deg, #1A365D 0%, #004E89 100%);
    height: 42px;
}

.custom-table th, .tabela-resgates th {
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 14px;
    letter-spacing: 0.6px;
    white-space: nowrap;
    border: none;
}

.custom-table thead tr th:first-child, .tabela-resgates thead tr th:first-child {
    border-top-left-radius: 9px;
}
.custom-table thead tr th:last-child, .tabela-resgates thead tr th:last-child {
    border-top-right-radius: 9px;
}

/* Linhas do Corpo da Tabela */
.custom-table tbody tr, .tabela-resgates tbody tr {
    height: 40px;
    transition: background-color 0.15s ease-in-out;
}

.custom-table tbody tr:nth-child(even), .tabela-resgates tbody tr:nth-child(even) {
    background-color: #F8FAFC;
}

.custom-table tbody tr:hover, .tabela-resgates tbody tr:hover {
    background-color: #FFF5EE;
}

.custom-table td, .tabela-resgates td {
    color: var(--cor-texto);
    font-size: 13px;
    padding: 9px 14px;
    border-bottom: 1px solid #E2E8F0;
    white-space: nowrap;
    vertical-align: middle;
}

.custom-table tbody tr:last-child td, .tabela-resgates tbody tr:last-child td {
    border-bottom: none;
}

/* Badges e Tags */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.badge-pendente {
    background-color: #FEFCBF;
    color: #975A16;
    border: 1px solid #ECC94B;
}

.badge-confirmado, .badge-sucesso {
    background-color: #C6F6D5;
    color: #22543D;
    border: 1px solid #9AE6B4;
}

.badge-admin {
    background-color: #EBF8FF;
    color: #2B6CB0;
    border: 1px solid #BEE3F8;
}

.badge-operador {
    background-color: #EDF2F7;
    color: #4A5568;
    border: 1px solid #CBD5E0;
}

.badge-erro {
    background-color: #FED7D7;
    color: #9B2C2C;
    border: 1px solid #FEB2B2;
}

/* Utilitários de Alinhamento */
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }
