/* FlockWatch dashboard – namespaced with fw- to avoid collisions */

.fw-body {
    background: #05070b;
    color: #f5f7fb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    margin: 0;
}

/* Header */

.fw-header {
    border-bottom: 1px solid #1a1f2a;
    background: #05070b;
    position: sticky;
    top: 0;
    z-index: 10;
}

.fw-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.fw-logo {
    font-weight: 700;
    font-size: 20px;
}

.fw-nav {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.fw-nav a {
    color: #d4d8e5;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

.fw-nav a:hover {
    border-bottom-color: #8ab4ff;
}

.fw-nav-active {
    border-bottom-color: #8ab4ff !important;
    color: #ffffff !important;
}

.fw-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #9aa1bc;
}

.fw-toggle-switch {
    width: 38px;
    height: 20px;
    border-radius: 999px;
    background: #151927;
    padding: 2px;
    display: flex;
    align-items: center;
}

.fw-toggle-knob {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #8ab4ff;
    transform: translateX(18px);
}

/* Main layout */

.fw-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

.fw-hero {
    margin-bottom: 10px;
}

.fw-hero h1 {
    font-size: 32px;
    margin: 0 0 8px;
}

.fw-hero p {
    margin: 0 0 20px;
    color: #a4aac3;
}

.fw-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 10px 0 16px;
}

.fw-stat {
    padding: 10px 12px;
    border-radius: 12px;
    background: #0b0f1a;
    border: 1px solid #151927;
    box-shadow: inset 0 0 0 1px rgba(138, 180, 255, 0.05);
}

.fw-stat-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #7b8198;
    margin-bottom: 4px;
}

.fw-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #f5f7fb;
    font-variant-numeric: tabular-nums;
}

.fw-search-wrapper {
    margin-top: 12px;
}

/* Summary totals (green pill at the top) */
.fw-totals {
    margin: 12px 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fw-total-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #022c22;
    border: 1px solid #064e3b;
    box-shadow: 0 0 0 1px rgba(5, 46, 22, 0.6);
}

.fw-total-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
    color: #6ee7b7;
}

.fw-total-value {
    font-weight: 600;
    font-size: 14px;
    color: #ecfdf5;
}

/* FlockWatch button */

.fw-button {
    display: inline-block;
    margin-top: 12px;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: #8ab4ff;
    color: #05070b;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.fw-button:hover {
    background: #a5c4ff;
}

#fw-search {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #1a1f2a;
    background: #05070b;
    color: #f5f7fb;
    font-size: 14px;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(138, 180, 255, 0.06);
}

#fw-search::placeholder {
    color: #5d6378;
}

#fw-search:focus {
    border-color: #8ab4ff;
}

/* Cards */

.fw-list {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fw-card {
    background: #0b0f1a;
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid #151927;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fw-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.fw-card-title,
.fw-agency-name {
    font-weight: 700;
    font-size: 16px;
    margin: 0;
}

/* ========= STATUS PILLS ========= */

.fw-status-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border: 1px solid transparent;
    text-transform: none;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.3);
}

/* ✅ green Active */
.fw-status-active {
    background: #14532d;
    color: #ecfdf5;
    border-color: #166534;
    box-shadow: 0 0 0 1px rgba(22, 101, 52, 0.35);
}

/* 🔴 Temporarily disabled 🎉 */
.fw-status-disabled {
    background: #3a0f15;
    color: #fee2e2;
    border-color: #7f1d1d;
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.2);
}

/* ⚪ neutral / unknown */
.fw-status-unknown {
    background: #020617;
    color: #e5e7eb;
    border-color: #111827;
}

/* ========= METRIC COLUMNS ========= */

.fw-metrics {
    margin-top: 6px;
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    column-gap: 24px;
    row-gap: 12px;
    font-size: 13px;
    color: #a4aac3;
}

.fw-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.fw-metric-label {
    display: block;
    font-size: 12px;
    color: #7b8198;
}

.fw-metric-value {
    font-weight: 600;
    color: #f5f7fb;
    font-variant-numeric: tabular-nums;
    text-align: left;
}

/* Meta row under the metrics */

.fw-meta-row {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: #a4aac3;
}

.fw-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fw-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6b7280;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.fw-dot--alert {
    background: #f87171;
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35);
}

.fw-share-icon {
    font-size: 14px;
}

.fw-card-footer {
    margin-top: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fw-card-footer a {
    color: #8ab4ff;
    text-decoration: none;
}

.fw-card-footer a:hover {
    text-decoration: underline;
}

.fw-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #111827;
    border: 1px solid #1f2937;
    color: #e5e7eb;
    font-size: 12px;
}

.fw-tag--warning {
    border-color: #7f1d1d;
    color: #fecdd3;
}

.fw-link {
    color: #8ab4ff;
    font-weight: 600;
}

.fw-link:hover {
    text-decoration: underline;
}

.fw-footnote {
    margin-top: 16px;
    color: #7b8198;
    font-size: 12px;
}

/* Loading / error */

.fw-loading,
.fw-error {
    font-size: 14px;
    color: #a4aac3;
}

.fw-empty {
    font-size: 14px;
    color: #a4aac3;
}

/* Small screens */

@media (max-width: 640px) {
    .fw-header-inner {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 12px;
    }
    .fw-main {
        padding-inline: 14px;
    }
    .fw-card {
        padding-inline: 14px;
    }
}

@media (max-width: 900px) {
    .fw-metrics {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}

@media (max-width: 540px) {
    .fw-metrics {
        grid-template-columns: minmax(0, 1fr);
    }
    .fw-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .fw-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    #fw-search {
        width: 100%;
    }
}
