/**
 * Promo Check-In - Sistema visual do painel administrativo
 *
 * Os tokens do tema claro vêm do layout de referência (Modernização Promo Check-In).
 * O tema escuro é o equivalente desta paleta, aplicado pela classe .dark no <html>.
 */

:root {
    --pc-bg: #f5f6f8;
    --pc-bg-grad: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #f1f3f6 70%);

    --pc-surface: #ffffff;
    --pc-surface-2: #fafbfc;
    --pc-surface-3: #f8f9fb;
    --pc-surface-sunken: #eef0f4;

    --pc-border: #e9ecf1;
    --pc-border-strong: #c3cad4;
    --pc-border-soft: #eef0f4;
    --pc-divider: #f2f4f7;

    --pc-ink: #16202f;
    --pc-ink-2: #45505f;
    --pc-ink-3: #6b7787;
    --pc-muted: #8d97a4;
    --pc-muted-2: #98a2ae;
    --pc-placeholder: #a6aeba;

    --pc-brand: #c8123c;
    --pc-brand-hover: #ab0f33;
    --pc-brand-tint: #fdeef2;
    --pc-brand-tint-2: #fff7f9;
    --pc-brand-border: #f3c8d3;
    --pc-brand-grad: linear-gradient(160deg, #d8194a, #b60e33);
    --pc-brand-ring: rgba(200, 18, 60, .08);
    --pc-brand-shadow: 0 12px 24px -14px rgba(200, 18, 60, .8);

    --pc-ok: #12855a;
    --pc-ok-bg: #e8f6ef;
    --pc-ok-border: #cbead9;

    --pc-warn: #9a6b06;
    --pc-warn-bg: #fdf5e3;
    --pc-warn-border: #f0e0b6;

    --pc-info: #2c4fa8;
    --pc-info-bg: #eaf0fd;
    --pc-info-border: #d7e2fb;

    --pc-danger: #c8123c;
    --pc-danger-bg: #fff5f8;
    --pc-danger-border: #f3c8d3;

    --pc-track: #dfe3e9;

    --pc-shadow-card: 0 20px 40px -34px rgba(22, 32, 47, .45);
    --pc-shadow-stat: 0 12px 26px -24px rgba(22, 32, 47, .5);
    --pc-shadow-float: 0 24px 48px -32px rgba(22, 32, 47, .28);
    --pc-header-bg: rgba(255, 255, 255, .88);

    --pc-thumb-bg: #f3f5f8;
}

.dark {
    --pc-bg: #0d131c;
    --pc-bg-grad: radial-gradient(120% 90% at 50% 0%, #16202f 0%, #0d131c 70%);

    --pc-surface: #151d29;
    --pc-surface-2: #111925;
    --pc-surface-3: #1a2331;
    --pc-surface-sunken: #0f1621;

    --pc-border: #26303f;
    --pc-border-strong: #3b4759;
    --pc-border-soft: #202a38;
    --pc-divider: #1e2734;

    --pc-ink: #eef2f7;
    --pc-ink-2: #c3ccd8;
    --pc-ink-3: #9aa6b6;
    --pc-muted: #7d8a9b;
    --pc-muted-2: #6f7d8f;
    --pc-placeholder: #5d6a7c;

    --pc-brand: #ff5d7d;
    --pc-brand-hover: #ff7d95;
    --pc-brand-tint: rgba(200, 18, 60, .22);
    --pc-brand-tint-2: rgba(200, 18, 60, .14);
    --pc-brand-border: rgba(255, 93, 125, .35);
    --pc-brand-grad: linear-gradient(160deg, #d8194a, #8e0d2b);
    --pc-brand-ring: rgba(255, 93, 125, .16);
    --pc-brand-shadow: 0 12px 24px -14px rgba(200, 18, 60, .9);

    --pc-ok: #34d399;
    --pc-ok-bg: rgba(18, 133, 90, .18);
    --pc-ok-border: rgba(52, 211, 153, .28);

    --pc-warn: #fbbf24;
    --pc-warn-bg: rgba(154, 107, 6, .2);
    --pc-warn-border: rgba(251, 191, 36, .28);

    --pc-info: #8ab0ff;
    --pc-info-bg: rgba(44, 79, 168, .22);
    --pc-info-border: rgba(138, 176, 255, .26);

    --pc-danger: #ff5d7d;
    --pc-danger-bg: rgba(200, 18, 60, .16);
    --pc-danger-border: rgba(255, 93, 125, .3);

    --pc-track: #33404f;

    --pc-shadow-card: 0 20px 40px -34px rgba(0, 0, 0, .8);
    --pc-shadow-stat: 0 12px 26px -24px rgba(0, 0, 0, .9);
    --pc-shadow-float: 0 24px 48px -32px rgba(0, 0, 0, .9);
    --pc-header-bg: rgba(21, 29, 41, .86);

    --pc-thumb-bg: #1a2331;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

.pc-body {
    margin: 0;
    min-height: 100vh;
    background: var(--pc-bg);
    color: var(--pc-ink);
    font-family: Inter, system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    transition: background-color .2s, color .2s;
}

.pc-body-centered {
    background: var(--pc-bg-grad);
}

.pc-display {
    font-family: Poppins, Inter, system-ui, sans-serif;
}

.pc-body input,
.pc-body button,
.pc-body select,
.pc-body textarea {
    font-family: inherit;
}

.pc-body ::placeholder {
    color: var(--pc-placeholder);
}

@keyframes pcFade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

.pc-fade {
    animation: pcFade .3s ease both;
}

.pc-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 28px 72px;
}

.pc-main-narrow {
    max-width: 900px;
}

.pc-main-form {
    max-width: 640px;
}

@media (max-width: 640px) {
    .pc-main { padding: 24px 16px 56px; }
}

/* ---------- Cabeçalho ---------- */

.pc-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--pc-header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--pc-border);
    min-height: 68px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 18px;
}

.pc-header-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 0 1 auto;
    min-width: 0;
}

.pc-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--pc-brand-grad);
    display: grid;
    place-items: center;
    flex: none;
}

.pc-logo-lg {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    box-shadow: 0 12px 28px -10px rgba(200, 18, 60, .55);
}

.pc-wordmark {
    font-family: Poppins, Inter, sans-serif;
    font-weight: 700;
    font-size: 16.5px;
    letter-spacing: -.01em;
    line-height: 1.2;
    white-space: nowrap;
}

.pc-wordmark-sub {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--pc-brand);
    white-space: nowrap;
}

.pc-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.pc-nav::-webkit-scrollbar { display: none; }

.pc-nav-item {
    border: 0;
    background: transparent;
    color: var(--pc-ink-2);
    font-size: 14px;
    font-weight: 500;
    padding: 9px 13px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}

.pc-nav-item:hover {
    background: var(--pc-divider);
    color: var(--pc-ink);
}

.pc-nav-item.is-active,
.pc-nav-item.is-active:hover {
    background: var(--pc-brand-tint);
    color: var(--pc-brand);
    font-weight: 600;
}

.pc-header-actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    align-items: center;
}

.pc-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--pc-ink);
    color: var(--pc-surface);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 600;
    flex: none;
}

.pc-icon-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--pc-border);
    background: var(--pc-surface);
    color: var(--pc-ink-2);
    cursor: pointer;
    flex: none;
    transition: border-color .15s, color .15s;
}

.pc-icon-btn:hover {
    border-color: var(--pc-border-strong);
    color: var(--pc-ink);
}

@media (max-width: 900px) {
    .pc-header {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
    }
    .pc-nav { order: 3; flex-basis: 100%; justify-content: flex-start; }
    .pc-header-actions { flex: 1 1 auto; }
}

/* ---------- Títulos ---------- */

.pc-page-title {
    font-family: Poppins, Inter, sans-serif;
    font-size: 27px;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--pc-ink);
}

.pc-page-sub {
    font-size: 14.5px;
    color: var(--pc-ink-3);
    margin-top: 4px;
}

.pc-section-title {
    font-family: Poppins, Inter, sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--pc-ink);
}

.pc-card-title {
    font-family: Poppins, Inter, sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--pc-ink);
}

.pc-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    color: var(--pc-muted);
    text-transform: uppercase;
}

/* ---------- Cartões ---------- */

.pc-card {
    background: var(--pc-surface);
    border: 1px solid var(--pc-border);
    border-radius: 18px;
    box-shadow: var(--pc-shadow-card);
}

.pc-card-sm {
    border-radius: 16px;
    box-shadow: var(--pc-shadow-stat);
}

.pc-card-head {
    padding: 20px 22px;
    border-bottom: 1px solid var(--pc-border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.pc-card-body {
    padding: 22px;
}

.pc-row {
    border-bottom: 1px solid var(--pc-divider);
}

.pc-row:last-child { border-bottom: 0; }

.pc-tile {
    background: var(--pc-surface-3);
    border: 1px solid var(--pc-border-soft);
    border-radius: 12px;
    padding: 14px 16px;
}

/* ---------- Formulários ---------- */

.pc-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--pc-ink-2);
}

.pc-input {
    width: 100%;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--pc-border);
    background: var(--pc-surface-3);
    padding: 0 14px;
    font-size: 15px;
    color: var(--pc-ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

textarea.pc-input {
    height: auto;
    padding: 12px 14px;
    line-height: 1.6;
    resize: vertical;
}

.pc-input:focus {
    border-color: var(--pc-brand);
    background: var(--pc-surface);
    box-shadow: 0 0 0 4px var(--pc-brand-ring);
}

.pc-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.pc-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--pc-surface);
    border: 1px solid var(--pc-border);
    border-radius: 12px;
    padding: 0 14px;
    height: 46px;
    min-width: 300px;
}

.pc-search input {
    border: 0;
    background: transparent;
    outline: none;
    font-size: 14.5px;
    flex: 1;
    color: var(--pc-ink);
    min-width: 0;
}

.pc-date-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--pc-surface);
    border: 1px solid var(--pc-border);
    border-radius: 12px;
    padding: 8px 12px;
}

.pc-date-box input,
.pc-date-box select {
    border: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--pc-ink);
    outline: none;
}

.pc-date-box select {
    cursor: pointer;
}

/* Lista suspensa legível também no tema escuro */
.pc-date-box select option {
    background: var(--pc-surface);
    color: var(--pc-ink);
}

.dark .pc-date-box input::-webkit-calendar-picker-indicator,
.dark .pc-input::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(.6);
}

/* ---------- Botões ---------- */

.pc-btn {
    height: 42px;
    padding: 0 16px;
    border-radius: 11px;
    border: 1px solid var(--pc-border);
    background: var(--pc-surface);
    color: var(--pc-ink-2);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s, background-color .15s, color .15s;
}

.pc-btn:hover {
    border-color: var(--pc-border-strong);
    color: var(--pc-ink);
}

.pc-btn-sm {
    height: 36px;
    padding: 0 13px;
    font-size: 13px;
    border-radius: 9px;
}

.pc-btn-lg {
    height: 50px;
    padding: 0 24px;
    font-size: 15px;
    border-radius: 12px;
}

.pc-btn-primary {
    border-color: transparent;
    background: var(--pc-brand);
    color: #fff;
    box-shadow: var(--pc-brand-shadow);
}

.pc-btn-primary:hover {
    background: var(--pc-brand-hover);
    border-color: transparent;
    color: #fff;
}

.pc-btn-danger {
    border-color: var(--pc-danger-border);
    background: var(--pc-danger-bg);
    color: var(--pc-danger);
}

.pc-btn-danger:hover {
    border-color: var(--pc-danger);
    color: var(--pc-danger);
}

.pc-btn-brand-ghost {
    color: var(--pc-brand);
}

.pc-btn-brand-ghost:hover {
    border-color: var(--pc-brand-border);
    background: var(--pc-brand-tint-2);
    color: var(--pc-brand);
}

.pc-link {
    color: var(--pc-brand);
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    font-size: inherit;
    cursor: pointer;
}

.pc-link:hover { color: var(--pc-brand-hover); }

/* ---------- Selos ---------- */

.pc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 999px;
    padding: 4px 11px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.pc-badge-ok {
    color: var(--pc-ok);
    background: var(--pc-ok-bg);
    border-color: var(--pc-ok-border);
}

.pc-badge-warn {
    color: var(--pc-warn);
    background: var(--pc-warn-bg);
    border-color: var(--pc-warn-border);
}

.pc-badge-danger {
    color: var(--pc-danger);
    background: var(--pc-danger-bg);
    border-color: var(--pc-danger-border);
}

.pc-badge-info {
    color: var(--pc-info);
    background: var(--pc-info-bg);
    border-color: var(--pc-info-border);
}

.pc-badge-neutral {
    color: var(--pc-ink-2);
    background: var(--pc-divider);
    font-size: 12px;
    padding: 5px 11px;
}

.pc-tag {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--pc-brand);
    background: var(--pc-brand-tint);
    border-radius: 6px;
    padding: 3px 6px;
    display: inline-block;
}

.pc-tag-muted {
    color: var(--pc-muted-2);
    background: var(--pc-divider);
}

/* ---------- Alertas ---------- */

.pc-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 14px;
    border: 1px solid;
    padding: 14px 16px;
    font-size: 14px;
}

.pc-alert-ok {
    color: var(--pc-ok);
    background: var(--pc-ok-bg);
    border-color: var(--pc-ok-border);
}

.pc-alert-error {
    color: var(--pc-danger);
    background: var(--pc-danger-bg);
    border-color: var(--pc-danger-border);
}

.pc-alert-warn {
    color: var(--pc-warn);
    background: var(--pc-warn-bg);
    border-color: var(--pc-warn-border);
}

/* ---------- Indicadores ---------- */

.pc-stat {
    background: var(--pc-surface);
    border: 1px solid var(--pc-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--pc-shadow-stat);
}

.pc-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    flex: none;
}

.pc-stat-value {
    font-family: Poppins, Inter, sans-serif;
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.1;
}

.pc-progress {
    width: 96px;
    height: 6px;
    border-radius: 999px;
    background: var(--pc-border-soft);
    overflow: hidden;
    flex: none;
}

.pc-progress > span {
    display: block;
    height: 100%;
    background: var(--pc-brand);
    border-radius: 999px;
}

/* ---------- Grade de fotos ---------- */

.pc-photo-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 1100px) {
    .pc-photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .pc-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.pc-photo {
    border: 1px solid var(--pc-border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--pc-surface);
    display: flex;
    flex-direction: column;
}

.pc-photo-pending {
    background: var(--pc-surface-2);
    border-style: dashed;
}

.pc-photo-thumb {
    aspect-ratio: 3 / 4;
    background: var(--pc-thumb-bg);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.pc-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.pc-photo-thumb:hover img { transform: scale(1.05); }

.pc-photo-meta {
    padding: 9px 10px 11px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pc-photo-time {
    font-size: 11px;
    color: var(--pc-muted);
    font-variant-numeric: tabular-nums;
}

.pc-photo-gps {
    font-size: 10.5px;
    color: var(--pc-muted-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

a.pc-photo-gps:hover { color: var(--pc-brand); }

/* ---------- Tabela / listagem ---------- */

.pc-table-head {
    display: grid;
    gap: 16px;
    padding: 14px 22px;
    background: var(--pc-surface-2);
    border-bottom: 1px solid var(--pc-border-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    color: var(--pc-muted);
    text-transform: uppercase;
}

.pc-table-row {
    display: grid;
    gap: 16px;
    align-items: center;
    padding: 15px 22px;
    border-bottom: 1px solid var(--pc-divider);
    transition: background-color .15s;
}

.pc-table-row:last-child { border-bottom: 0; }
.pc-table-row:hover { background: var(--pc-surface-2); }

.pc-initial {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--pc-brand-tint);
    color: var(--pc-brand);
    display: grid;
    place-items: center;
    font-family: Poppins, Inter, sans-serif;
    font-weight: 600;
    font-size: 14px;
    flex: none;
}

.pc-initial-lg {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: var(--pc-brand-grad);
    color: #fff;
    font-size: 26px;
}

/* ---------- Interruptor ---------- */

.pc-toggle {
    width: 48px;
    height: 28px;
    border-radius: 999px;
    border: 0;
    background: var(--pc-track);
    cursor: pointer;
    padding: 3px;
    display: flex;
    justify-content: flex-start;
    flex: none;
    transition: background-color .18s;
}

.pc-toggle.is-on {
    background: var(--pc-brand);
    justify-content: flex-end;
}

.pc-toggle > span {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(22, 32, 47, .28);
}

/* ---------- Acordeão de jornadas ---------- */

.pc-journey summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.pc-journey summary::-webkit-details-marker { display: none; }
.pc-journey summary:hover { background: var(--pc-surface-2); }

.pc-journey-date {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    line-height: 1.1;
    flex: none;
    border: 1px solid;
}

.pc-chevron { transition: transform .2s ease; }
.pc-journey[open] .pc-chevron { transform: rotate(180deg); }

.pc-journey-body {
    border-top: 1px solid var(--pc-border-soft);
    padding: 20px 22px;
    background: var(--pc-surface-2);
}

/* ---------- Diversos ---------- */

.pc-log-console {
    background: var(--pc-surface-3);
    border: 1px solid var(--pc-border);
    border-radius: 14px;
    padding: 18px 20px;
    max-height: 450px;
    overflow-y: auto;
    font-size: 12.5px;
    line-height: 1.6;
}

.pc-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pc-modal {
    position: fixed;
    inset: 0;
    background: rgba(13, 19, 28, .55);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    z-index: 50;
    padding: 16px;
}

.pc-preview-frame {
    width: 600px;
    max-width: 100%;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 50px -30px rgba(22, 32, 47, .4);
    display: block;
}

/* ---------- Utilitários de layout ---------- */

.pc-stack { display: flex; flex-direction: column; gap: 22px; }
.pc-stack-sm { display: flex; flex-direction: column; gap: 14px; }
.pc-inline { display: flex; align-items: center; gap: 10px; }
.pc-inline-sm { display: flex; align-items: center; gap: 7px; }
.pc-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.pc-between-end { align-items: flex-end; }
.pc-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pc-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pc-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pc-fill { flex: 1; min-width: 0; }
.pc-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-num { font-variant-numeric: tabular-nums; }
.pc-muted { color: var(--pc-muted); }
.pc-dim { color: var(--pc-ink-3); }
.pc-empty {
    padding: 48px 22px;
    text-align: center;
    color: var(--pc-muted);
    font-size: 14px;
}

@media (max-width: 1000px) {
    .pc-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pc-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .pc-grid-4,
    .pc-grid-3,
    .pc-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .pc-search { min-width: 0; width: 100%; }
}
