/* ===========================
   STATUS PAGE - Layout
   =========================== */
.st-wrapper {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.25rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===========================
   HEADER
   =========================== */
.st-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
}

.st-logo {
    height: 26px;
    width: auto;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.st-logo-link:hover .st-logo {
    opacity: 1;
}

.st-header-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.st-refresh-timer {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 28px;
    text-align: right;
}

/* ===========================
   HERO
   =========================== */
.st-hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.st-title {
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0.9rem 0 0.4rem;
    letter-spacing: -0.02em;
}

.st-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.st-updated {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.65rem;
}

/* ===========================
   GLOBAL STATUS PILL
   =========================== */
.st-global-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.25s ease, color 0.25s ease;
}

.st-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: stPulse 2s ease-in-out infinite;
}

@keyframes stPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.st-global-ok {
    background: rgba(46, 160, 67, 0.12);
    color: #56d364;
}
.st-global-ok .st-pulse { background: #56d364; }

.st-global-issue {
    background: rgba(220, 53, 69, 0.14);
    color: #ff7b85;
}
.st-global-issue .st-pulse { background: #ff7b85; }

.st-global-unknown {
    background: var(--badge-bg);
    color: var(--text-muted);
}
.st-global-unknown .st-pulse { background: var(--text-muted); }

/* ===========================
   SERVICE CARDS
   =========================== */
.st-services {
    display: flex;
    gap: 0.9rem;
    flex: 1;
    padding-bottom: 2rem;
    align-items: flex-start;
    justify-content: center;
}

.st-services-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

a.st-card {
    text-decoration: none;
    color: inherit;
}

.st-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    overflow: hidden;
}

.st-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(167, 139, 250, 0.25);
}

.st-card-top {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
}

/* Status indicator */
.st-card-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 105px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.st-card-status i {
    font-size: 1rem;
}

.st-card-up .st-card-status { color: #56d364; }
.st-card-down .st-card-status { color: #ff7b85; }
.st-card-unknown .st-card-status { color: var(--text-muted); }

/* Body */
.st-card-body {
    flex: 1;
    min-width: 0;
}

.st-card-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-external-icon {
    font-size: 0.65rem;
    opacity: 0;
    margin-left: 0.2rem;
    transition: opacity 0.15s ease;
    vertical-align: middle;
}

.st-card:hover .st-external-icon {
    opacity: 0.5;
}

.st-card-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Meta */
.st-card-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.st-meta-latency {
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* ===========================
   UPTIME BARS
   =========================== */
.st-uptime {
    padding: 0.5rem 1.15rem 0.75rem;
    border-top: 1px solid var(--border-color);
}

.st-uptime-bars {
    display: flex;
    gap: 1px;
    height: 28px;
    align-items: stretch;
}

.st-bar {
    flex: 1;
    border-radius: 2px;
    min-width: 0;
    transition: opacity 0.12s ease;
}

.st-bar:hover {
    opacity: 0.7;
}

.st-bar-up      { background: #2ea043; }
.st-bar-down    { background: #da3633; }
.st-bar-partial { background: #d29922; }
.st-bar-none    { background: var(--border-color); }

.st-uptime-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.35rem;
}

.st-uptime-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.st-uptime-pct {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* ===========================
   SKELETON LOADING
   =========================== */
.st-card-skeleton {
    pointer-events: none;
}

.st-card-skeleton .st-card-top {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.sk-pill {
    width: 90px;
    height: 18px;
    border-radius: 6px;
    background: var(--border-color);
    animation: skPulse 1.1s ease-in-out infinite;
}

.sk-body { flex: 1; }

.sk-line {
    height: 12px;
    border-radius: 4px;
    background: var(--border-color);
    animation: skPulse 1.1s ease-in-out infinite;
}

.sk-line.w-50 { width: 50%; }
.sk-line.w-75 { width: 75%; }
.sk-line.mt-1 { margin-top: 6px; animation-delay: 0.15s; }

@keyframes skPulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.7; }
}

/* Skeleton para barras de uptime */
.sk-bar {
    animation: skPulse 1.1s ease-in-out infinite;
}

/* ===========================
   FOOTER
   =========================== */
.st-footer {
    margin-top: auto;
    padding: 1.5rem 0 2rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

.st-footer a {
    color: var(--text-link);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.st-footer a:hover {
    opacity: 0.75;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 576px) {
    .st-hero { padding: 2rem 0 1.5rem; }
    .st-title { font-size: 1.7rem; }

    .st-services {
        flex-direction: column;
    }

    .st-card-top {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.85rem 0.95rem;
    }

    .st-card-status {
        min-width: auto;
    }

    .st-card-meta {
        flex-direction: row;
        gap: 0.6rem;
        width: 100%;
        align-items: center;
        justify-content: flex-start;
    }

    .st-uptime {
        padding: 0.4rem 0.95rem 0.65rem;
    }

    .st-uptime-bars {
        height: 22px;
    }
}
