/**
 * Ponto SeuSaude - Estilos compartilhados das telas do COLABORADOR.
 *
 * Unifica a experiencia das telas de autoatendimento (login, check-in,
 * meu ponto, preferencias, redefinir senha): mesma fonte (Inter), mesmo
 * tema CLARO (melhor para bater ponto a luz do dia) e a mesma paleta teal
 * que e a sub-marca do Ponto. Cada pagina ainda carrega seu <style> proprio
 * para particularidades; aqui ficam os tokens e componentes repetidos.
 */
:root {
    --c-teal: #141414;        /* grafite: superficie/topbar */
    --c-teal-dark: #000000;
    --c-teal-darker: #000000;
    --c-amber: #feb503;       /* ambar (marca) */
    --c-amber-strong: #e5a200;
    --c-amber-ink: #8a6100;   /* ambar p/ texto em fundo claro */
    --c-bg: #f6f4ef;
    --c-surface: #ffffff;
    --c-text: #1e293b;
    --c-text-2: #475569;   /* contraste >= 7:1 em #fff */
    --c-text-3: #64748b;   /* contraste >= 4.6:1 em #fff */
    --c-border: #e2e8f0;
    --c-border-soft: #f1f5f9;
    --c-radius: 12px;
    --c-radius-sm: 8px;
    --c-shadow: 0 2px 12px rgba(0,0,0,0.06);

    --c-success-bg: #ecfdf5; --c-success-fg: #065f46; --c-success-bd: #a7f3d0;
    --c-danger-bg: #fef2f2;  --c-danger-fg: #991b1b;  --c-danger-bd: #fecaca;
    --c-warn-bg: #fffbeb;    --c-warn-fg: #92400e;    --c-warn-bd: #fde68a;
    --c-info-bg: #f0f9ff;    --c-info-fg: #075985;    --c-info-bd: #bae6fd;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Sora', -apple-system, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    min-height: 100vh;
    line-height: 1.5;
}

/* Acessibilidade: rotulo so para leitor de tela. */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* Acessibilidade: foco visivel por teclado. */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--c-amber);
    outline-offset: 2px;
}

/* Card e alertas comuns. */
.c-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius);
    box-shadow: var(--c-shadow);
    padding: 24px;
    margin-bottom: 16px;
}
.c-alert { padding: 12px 14px; border-radius: var(--c-radius-sm); font-size: .88rem; margin-bottom: 14px; font-weight: 500; }
.c-alert-success { background: var(--c-success-bg); color: var(--c-success-fg); border: 1px solid var(--c-success-bd); }
.c-alert-danger  { background: var(--c-danger-bg);  color: var(--c-danger-fg);  border: 1px solid var(--c-danger-bd); }
.c-alert-warning { background: var(--c-warn-bg);    color: var(--c-warn-fg);    border: 1px solid var(--c-warn-bd); }
.c-alert-info    { background: var(--c-info-bg);    color: var(--c-info-fg);    border: 1px solid var(--c-info-bd); }

/* Botao primario teal com alvo de toque >= 44px. */
.c-btn {
    width: 100%; padding: 14px; min-height: 48px;
    background: var(--c-amber); color: #141414;
    border: none; border-radius: var(--c-radius-sm);
    font-size: .95rem; font-weight: 700; cursor: pointer;
    font-family: inherit;
}
.c-btn:hover { background: var(--c-amber-strong); }
.c-btn:active { background: #cc8f00; }

/* Inputs: font-size 16px evita zoom automatico no iOS. */
.c-input {
    width: 100%; padding: 13px 14px;
    border: 1px solid var(--c-border); border-radius: var(--c-radius-sm);
    font-size: 16px; font-family: inherit; outline: none; -webkit-appearance: none;
}
.c-input:focus { border-color: var(--c-amber); box-shadow: 0 0 0 3px rgba(254,181,3,0.28); }

/* =========================================================================
   TEMA ESCURO (dia/noite) - telas do colaborador.
   Ativado por data-tema="escuro" no <html> (assets/js/theme.js). Aditivo:
   sobrescreve apenas os tokens --c-*; a topbar teal e mantida como ancora de
   marca. Cada pagina complementa com overrides do seu <style> proprio.
   ========================================================================= */
:root[data-tema="escuro"] {
    --c-bg: #0f172a;
    --c-surface: #1b2436;
    --c-text: #e5ecf3;
    --c-text-2: #cbd5e1;
    --c-text-3: #94a3b8;
    --c-border: #2e3a4f;
    --c-border-soft: #24324a;
    --c-shadow: 0 2px 12px rgba(0,0,0,0.45);

    --c-success-bg: #0f2a20; --c-success-fg: #7bd6a4; --c-success-bd: #1f5540;
    --c-danger-bg:  #331417; --c-danger-fg:  #fca5a5; --c-danger-bd:  #7a2530;
    --c-warn-bg:    #332809; --c-warn-fg:    #f4cf7a; --c-warn-bd:    #6b5310;
    --c-info-bg:    #0e2740; --c-info-fg:    #93c5fd; --c-info-bd:    #1e4b7a;
}

/* ===== Botao de tema (sol/lua) nas telas do colaborador ===== */
.c-tema-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; padding: 0; margin-right: 4px;
    background: none; border: none; color: #fff; cursor: pointer;
    border-radius: 8px; opacity: .9;
}
.c-tema-btn:hover { opacity: 1; background: rgba(255,255,255,0.12); }
.c-tema-ic { width: 20px; height: 20px; }
.c-tema-ic-sol { display: none; }
.c-tema-ic-lua { display: inline-block; }
:root[data-tema="escuro"] .c-tema-ic-sol { display: inline-block; }
:root[data-tema="escuro"] .c-tema-ic-lua { display: none; }
/* Variante flutuante para telas sem topbar (login, redefinir senha). */
.c-tema-fixo {
    position: fixed; top: 12px; right: 12px; z-index: 50;
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--c-surface); border: 1px solid var(--c-border);
    color: var(--c-teal); box-shadow: var(--c-shadow);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.c-tema-fixo:hover { background: var(--c-border-soft); }
:root[data-tema="escuro"] .c-tema-fixo { color: #feb503; }
