/* =========================
   THEME
========================= */
:root {
    --bg: #16263E;
    --card: rgba(255, 255, 255, .08);
    --card-2: rgba(255, 255, 255, .10);
    --text: rgba(255, 255, 255, .92);
    --muted: rgba(255, 255, 255, .65);
    --line: rgba(255, 255, 255, .14);

    --accent: #7FBD2B;
    --accent-2: rgba(127, 189, 43, .18);

    --danger: #ff5c5c;
    --success: #39d98a;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, .22);

    --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body.app-body {
    margin: 0;
    font-family: var(--font);
    background: #16263E;
    color: var(--text);
}

/* container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 18px 40px;
}

/* =========================
   TOPBAR
========================= */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, #16263E);
    padding: 12px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, .12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* BRAND (logo + nome) */
.topbar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* tamanho do globo */
.brand__logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

/* textos ao lado */
.brand__texts {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

/* nome principal */
.brand__title {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
}

/* subtitulo */
.brand__subtitle {
    font-size: 13px;
    color: #d7e6ff;
    font-weight: 500;
}

.topbar__nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar__link {
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 10px;
    transition: transform .12s ease, background .12s ease;
}

.topbar__link:hover {
    background: rgba(255, 255, 255, .35);
    transform: translateY(-1px);
}

/* pill */
.pill {
    padding: 7px 10px;
    border: 1px solid rgba(0, 0, 0, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .35);
    font-weight: 700;
}

/* =========================
   ALERTS
========================= */
.alert {
    margin: 14px 0 6px;
    padding: 12px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .06);
}

.alert--error {
    border-color: rgba(255, 92, 92, .5);
    background: rgba(255, 92, 92, .10);
}

.alert--success {
    border-color: rgba(57, 217, 138, .45);
    background: rgba(57, 217, 138, .10);
}

/* =========================
   KPI
========================= */
.kpi-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.kpi-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    min-width: 220px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .06));
    box-shadow: var(--shadow-soft);
}

.kpi-card__label {
    font-size: 12px;
    color: var(--muted);
}

.kpi-card__value {
    font-size: 24px;
    font-weight: 900;
    margin-top: 4px;
    color: #ffffff;
}

.kpi-card__hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

/* =========================
   valores KPIs
========================= */
.kpi-folgas {
    color: #7FBD2B;
}

.kpi-trabalhando {
    color: #d89417;
}

.kpi-pendentes {
    color: #ffe600;
}

/* divider */
.divider {
    margin: 18px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

/* =========================
   FILTER
========================= */
.filter {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .06);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field--actions {
    align-self: flex-end;
}

.label {
    font-size: 12px;
    color: var(--muted);
}

.select,
.input {
    width: 140px;
    max-width: 100%;
    padding: 10px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(0, 0, 0, .18);
    color: var(--text);
    outline: none;
}

.select {
    width: 100%;
}

.select:focus,
.input:focus {
    border-color: rgba(127, 189, 43, .8);
    box-shadow: 0 0 0 4px rgba(127, 189, 43, .18);
}

.input {
    width: 100%;
}

/* =========================
   TITLES
========================= */
.title {
    margin-top: 16px;
    margin-bottom: 6px;
    font-size: 20px;
    font-weight: 900;
}

.title--spaced {
    margin-top: 18px;
}

.subtitle {
    margin-top: 0;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, .62);
}

.empty {
    padding: 12px;
    border-radius: var(--radius);
    border: 1px dashed rgba(255, 255, 255, .22);
    color: rgba(255, 255, 255, .70);
    background: rgba(255, 255, 255, .04);
}

/* =========================
   BUTTONS (flat corporate)
========================= */

.btn {
    border: 1px solid rgba(255, 255, 255, .18);
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    transition: background .15s ease, border .15s ease, color .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: none;
    /* remove brilho */
}

/* principal (Carregar / Enviar / Entrar) */
.btn--primary {
    background: #7FBD2B;
    color: #f5f5f5;
    border: 1px solid #6aa61f;
}

/* hover sem glow */
.btn--primary:hover {
    background: #74ad26;
    border-color: #5f971c;
}

/* clicar */
.btn--primary:active {
    background: #5f971c;
}

/* secundário */
.btn--accent {
    background: rgba(127, 189, 43, .12);
    color: #eaffd5;
    border: 1px solid rgba(127, 189, 43, .35);
}

.btn--accent:hover {
    background: rgba(127, 189, 43, .20);
}

/* neutro */
.btn--ghost {
    background: rgba(255, 255, 255, .06);
    color: var(--text);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, .12);
}

/* sucesso */
.btn--success {
    background: rgba(57, 217, 138, .10);
    border: 1px solid rgba(57, 217, 138, .35);
    color: #d7ffef;
}

/* perigo */
.btn--danger {
    background: rgba(255, 92, 92, .10);
    border: 1px solid rgba(255, 92, 92, .35);
    color: #ffd7d7;
}


/* =========================
   SEXTA GRID (flat)
========================= */

.sexta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.sexta-card {
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    /* sem brilho */
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: background .12s ease, border .12s ease;
}

.sexta-card:hover {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .25);
}

/* selecionado */
.sexta-card.is-active {
    border-color: #7FBD2B;
    background: rgba(127, 189, 43, .08);
}

/* topo */
.sexta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sexta-dia {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    background: rgba(127, 189, 43, .10);
    border: 1px solid rgba(127, 189, 43, .35);
}

.sexta-data {
    font-weight: 700;
    color: rgba(255, 255, 255, .85);
}

/* parte inferior */
.sexta-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, .10);
    padding-top: 10px;
}

.sexta-icone {
    opacity: .85;
}

.sexta-badge {
    min-width: 34px;
    height: 26px;
    padding: 0 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: rgba(127, 189, 43, .12);
    border: 1px solid rgba(127, 189, 43, .35);
    color: #dfffc0;
}


/* =========================
   TABLE
========================= */
.table-wrap {
    margin-top: 10px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, .14);
    overflow: hidden;
    background: rgba(255, 255, 255, .06);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 10px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    vertical-align: top;
    text-align: left;
    font-size: 14px;
}

.table thead th {
    background: rgba(127, 189, 43, .12);
    border-bottom: 1px solid rgba(127, 189, 43, .28);
    color: #eaffd5;
    font-weight: 900;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, .04);
}

.table__actions {
    white-space: nowrap;
}

.inline-form {
    display: inline;
    margin: 0 6px 0 0;
}

/* status */
.status {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    font-weight: 900;
    font-size: 12px;
}

.status--pendente {
    border-color: rgba(255, 230, 0, .45);
    background: rgba(255, 230, 0, .20);
    color: #fffde1;
}

.status--aprovado {
    border-color: rgba(57, 217, 138, .45);
    background: rgba(57, 217, 138, .14);
    color: #d7ffef;
}

.status--recusado {
    border-color: rgba(255, 92, 92, .45);
    background: rgba(255, 92, 92, .14);
    color: #ffd7d7;
}

/* actions block */
.actions {
    margin: 10px 0 14px;
}

/* =========================
   MODALS
========================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 9998;
    padding: 18px;
}

.modal--top {
    z-index: 10000;
}

.modal__card {
    width: 520px;
    max-width: 100%;
    margin: 8% auto;
    background: rgba(22, 38, 62, .92);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 16px;
}

.modal__card--sm {
    width: 420px;
    margin: 10% auto;
}

.modal__title {
    margin: 0 0 6px;
    font-weight: 1000;
}

.modal__subtitle {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, .70);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 2px;
}

/* =========================
   SELECT DROPDOWN (tema azul)
========================= */

/* campo fechado */
.select {
    background: #0f1c33;
    color: #e6eeff;
    border: 1px solid rgba(255, 255, 255, .18);
}

/* hover */
.select:hover {
    border-color: rgba(127, 189, 43, .45);
}

/* quando abre */
.select:focus {
    background: #0f1c33;
    color: #ffffff;
}

/* opções da lista */
select option {
    background: #16263E;
    color: #e6eeff;
}

/* opção selecionada */
select option:checked {
    background: #7FBD2B;
    color: #0f1c33;
}

/* ao passar o mouse (alguns navegadores) */
select option:hover {
    background: #223a63;
}

/* =========================
   ALERT CENTERED POPUP
========================= */

/* fundo escurecido */
.alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    backdrop-filter: blur(2px);
}

/* caixa do alerta */
.alert {
    position: relative;
    max-width: 420px;
    width: calc(100% - 40px);
    padding: 18px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(22, 38, 62, .98);
    box-shadow: var(--shadow);
    text-align: center;
    font-size: 15px;
    animation: alertFade .18s ease;
}

.obs-cell {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* animação */
@keyframes alertFade {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* cores */
.alert--error {
    /* border-color: rgba(255, 92, 92, .45); */
    background: rgba(22, 38, 62, .98);
}

.alert--success {
    border-color: rgba(57, 217, 138, .45);
    background: rgba(22, 38, 62, .98);
}

/* =========================
   Modal exclusão (mesma aparência do alert, mas sem o botão OK automático)
========================= */

.confirm-box {
    position: relative;
    max-width: 420px;
    width: calc(100% - 40px);
    padding: 18px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(22, 38, 62, .98);
    box-shadow: var(--shadow);
    text-align: center;
    font-size: 15px;
    animation: alertFade .18s ease;
}

.confirm-box::after {
    content: none !important;
    display: none !important;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 640px) {
    .topbar {
        padding: 10px 12px;
    }

    .container {
        padding: 14px 12px 34px;
    }

    .select {
        width: 100%;
    }

    .filter {
        width: 100%;
    }

}

.filter .select {
    width: 120px;
}

.modal .field {
    width: 100%;
}

.modal .select,
.modal .input {
    width: 100%;
}