/* ---------------------------------------------------------------------------
   Shozap Status - estilos da pagina publica
   --------------------------------------------------------------------------- */

:root {
    --bg: #faf9f5;
    --surface: #ffffff;
    --border: #e6e3db;
    --border-soft: #efece5;
    --text: #1f1e1c;
    --text-muted: #6b6a65;
    --text-soft: #8d8b84;
    --brand: #d97757;

    --green: #83b93f;
    --green-dark: #6f9e2f;
    --amber: #f2a93b;
    --orange: #ef8f2c;
    --red: #e35b52;
    --blue: #4b8fd4;
    --bar-empty: #e4e1d9;

    --radius: 4px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: ui-serif, Georgia, "Times New Roman", Times, serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

/* ------------------------------------------------------------------ cabecalho */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 58px 0 42px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.brand-mark {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    color: var(--brand);
}

.brand-mark img { width: 100%; height: 100%; object-fit: contain; }

.brand-name {
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1;
}

.btn {
    display: inline-block;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    border-radius: 2px;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn-dark {
    background: #16150f;
    color: #ffffff;
    padding: 15px 24px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    white-space: nowrap;
}

.btn-dark:hover { background: #33322b; }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius);
}

.btn-outline:hover { background: #f2efe8; }

/* ---------------------------------------------------------------------- faixa */

.status-banner {
    border-radius: var(--radius);
    color: #ffffff;
    padding: 25px 28px;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.005em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.status-banner .banner-meta {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.85;
}

.banner-spacer { height: 72px; }

/* ----------------------------------------------------------------- componentes */

.uptime-note {
    text-align: right;
    font-size: 13px;
    color: var(--text-soft);
    margin: 0 0 12px;
}

.uptime-note a {
    color: #4a4945;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.component-group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    padding: 16px 24px 0;
}

.component {
    padding: 22px 24px 20px;
    border-top: 1px solid var(--border-soft);
}

.component:first-child,
.component-group-title + .component { border-top: 0; }

.component-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.component-name {
    font-size: 16px;
    color: #2b2a27;
    font-weight: 500;
}

.component-description {
    display: block;
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 400;
    margin-top: 3px;
}

.component-status {
    font-size: 14px;
    white-space: nowrap;
}

/* ------------------------------------------------------------ barras de uptime */

.bars {
    display: flex;
    gap: 2px;
    height: 34px;
    align-items: stretch;
}

.bar {
    flex: 1 1 0;
    min-width: 0;
    border-radius: 1px;
    background: var(--bar-empty);
    transition: opacity 0.12s ease;
}

.bar:hover { opacity: 0.72; }

.bar--operational { background: var(--green); }
.bar--degraded_performance { background: var(--amber); }
.bar--partial_outage { background: var(--orange); }
.bar--major_outage { background: var(--red); }
.bar--under_maintenance { background: var(--blue); }

.bar-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 9px;
    font-size: 12px;
    color: var(--text-soft);
}

.bar-legend .legend-line {
    flex: 1 1 auto;
    height: 1px;
    background: #e8e5dd;
}

.bar-legend .legend-value { white-space: nowrap; }

/* Dica exibida ao passar o mouse sobre uma barra. */
.bar-tooltip {
    position: absolute;
    z-index: 40;
    background: #26251f;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.45;
    padding: 8px 11px;
    border-radius: var(--radius);
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -100%);
    transition: opacity 0.12s ease;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(31, 30, 28, 0.18);
}

.bar-tooltip.is-visible { opacity: 1; }
.bar-tooltip strong { display: block; font-weight: 600; }
.bar-tooltip span { color: #cfcdc4; }

/* ------------------------------------------------------------------ incidentes */

.section {
    margin-top: 52px;
}

.section-title {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}

.incident-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 14px;
}

.incident-card.is-open { border-left: 3px solid var(--red); }
.incident-card.is-maintenance { border-left: 3px solid var(--blue); }

.incident-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.incident-title a { text-decoration: none; }
.incident-title a:hover { text-decoration: underline; }

.incident-meta {
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    color: #ffffff;
}

.badge-soft {
    background: #f1eee7;
    color: var(--text-muted);
}

.incident-update {
    padding: 12px 0;
    border-top: 1px solid var(--border-soft);
}

.incident-update:first-of-type { border-top: 0; }

.incident-update-head {
    font-size: 13px;
    margin-bottom: 4px;
}

.incident-update-head strong { font-weight: 600; }

.incident-update-time {
    color: var(--text-soft);
    font-size: 12.5px;
}

.incident-body {
    font-size: 14.5px;
    color: #3a3934;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.incident-components {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--text-soft);
}

/* Historico por dia */
.history-day {
    padding: 20px 0 24px;
    border-top: 1px solid var(--border);
}

.history-day:first-child { border-top: 0; }

.history-date {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #34332e;
}

.history-empty {
    color: var(--text-soft);
    font-size: 14px;
}

/* ---------------------------------------------------------------------- forms */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.field { margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #3a3934;
}

.input {
    width: 100%;
    padding: 11px 13px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    border: 1px solid #dcd8ce;
    border-radius: var(--radius);
}

.input:focus {
    outline: none;
    border-color: #b9b4a7;
    box-shadow: 0 0 0 3px rgba(185, 180, 167, 0.22);
}

.alert {
    border-radius: var(--radius);
    padding: 13px 16px;
    font-size: 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert-success { background: #f0f7e6; border-color: #d6e8bd; color: #4a6b1f; }
.alert-error { background: #fdf0ef; border-color: #f4d3d0; color: #a8352c; }
.alert-info { background: #eef4fb; border-color: #d3e2f2; color: #2f5f92; }

/* --------------------------------------------------------------------- rodape */

.site-footer {
    margin: 64px 0 48px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-soft);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.text-muted { color: var(--text-soft); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* -------------------------------------------------------------------- celular */

@media (max-width: 720px) {
    .site-header { padding: 34px 0 26px; flex-wrap: wrap; }
    .brand-name { font-size: 25px; }
    .btn-dark { padding: 12px 18px; font-size: 11px; }
    .status-banner { font-size: 17px; padding: 20px 20px; }
    /* A data de atualização é ruído numa tela estreita. */
    .status-banner .banner-meta { display: none; }
    .banner-spacer { height: 44px; }
    .section { margin-top: 38px; }
    .component { padding: 18px 16px; }
    .component-group-title { padding: 14px 16px 0; }
    /* Mostra apenas os 45 dias mais recentes em telas estreitas. */
    .bars .bar:nth-child(-n+45) { display: none; }
}

@media (max-width: 420px) {
    .bars .bar:nth-child(-n+60) { display: none; }
    .component-head { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* Incidente exibido dentro do historico, sem moldura propria. */
.incident-card--plain {
    border: 0;
    border-left: 0;
    background: transparent;
    padding: 0;
    margin: 0 0 22px;
}

.incident-card--plain:last-child { margin-bottom: 0; }
