/* ============================= */
/* PAGE HEADER */
/* ============================= */

.page-header {
    margin-bottom: 24px;
}

.page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.page-subtitle {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}


/* ============================= */
/* DASHBOARD */
/* ============================= */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-card h4 {
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 12px;
    margin-top: 0;
}

.metric-card h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px 0;
}

.metric-card .sub {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

.metric-card .sub .positive {
    color: #16a34a;
    font-weight: 500;
}

.metric-card .sub .negative {
    color: #dc2626;
    font-weight: 500;
}


/* ============================= */
/* CHARTS & HEALTH SECTIONS */
/* ============================= */

.chart-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

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

.chart-filters {
    display: flex;
    background-color: #f3f4f6;
    border-radius: 6px;
    padding: 2px;
}

.chart-filters button {
    background: transparent;
    border: none;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-radius: 4px;
}

.chart-filters button.active {
    background-color: #fff;
    color: #ea580c;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chart-legend {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    font-size: 12px;
    color: #6b7280;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.health-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.health-list li {
    display: grid;
    grid-template-columns: 60px 50px 1fr 60px;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #4b5563;
}

.health-list .health-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-align: center;
    font-weight: 600;
}

.health-badge.success {
    background-color: #dcfce7;
    color: #166534;
}

.health-badge.warning {
    background-color: #fefce8;
    color: #854d0e;
}

.health-badge.error {
    background-color: #fdf2f8;
    color: #be185d;
}

.health-list .progress {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.health-list .progress-bar {
    height: 100%;
}

.health-list .progress-bar.success {
    background-color: #374151;
}

.health-list .progress-bar.warning {
    background-color: #92400e;
}

.health-list .progress-bar.error {
    background-color: #9d174d;
}

.mno-sla-footer {
    margin-top: 24px;
    font-size: 12px;
    color: #9ca3af;
}

/* ============================= */
/* ESCALATIONS PAGE */
/* ============================= */

.escalations-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.bottom-card-title {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 30px;
    color: #111827;
}

.mno-progress-item {
    margin-bottom: 20px;
}

.mno-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #4b5563;
}

.resolved-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.resolved-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
}

.resolved-footer {
    display: flex;
    justify-content: space-between;
    padding: 16px 0 0 0;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

/* ============================= */
/* REVERSALS PAGE */
/* ============================= */

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 180px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
    margin-bottom: 16px;
    margin-top: 20px;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.bar-value {
    width: 60%;
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
}

.bar-label {
    margin-top: 12px;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

.chart-footer-text {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    margin-top: 16px;
}

.switch-credits-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================= */
/* MNO SUPPRESSIONS PAGE */
/* ============================= */

.hero-alert-banner {
    background-color: #fdf2f8;
    border: 1px solid #fbcfe8;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.hero-alert-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.hero-alert-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.hero-alert-columns {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    align-items: center;
}

.hero-alert-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.col-label {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

.col-value {
    font-size: 13px;
    color: #111827;
}

.hero-alert-actions {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    align-self: flex-end;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 24px;
}

.table-search {
    margin-bottom: 16px;
}

.table-search input {
    width: 280px;
}



/* ============================= */
/* DETAIL PAGE */
/* ============================= */

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-grid .card {
    min-height: 180px;
}

.detail-grid h3 {
    margin-bottom: 16px;
}


/* ============================= */
/* TIMELINE (AUDIT TRAIL) */
/* ============================= */

.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 20px;
    border-left: 2px solid #e5e7eb;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 6px;
    width: 10px;
    height: 10px;
    background: #ff6b00;
    border-radius: 50%;
}

.timeline .time {
    font-size: 12px;
    color: #6b7280;
    display: block;
    margin-bottom: 4px;
}

.timeline .label {
    font-weight: 600;
}


/* ============================= */
/* REVERSALS PAGE */
/* ============================= */

.reversal-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.reversal-summary .card {
    flex: 1;
    text-align: center;
}

.reversal-summary h2 {
    font-size: 24px;
    margin-bottom: 6px;
}


/* ============================= */
/* EMPTY STATE */
/* ============================= */

.empty-state {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}


/* ============================= */
/* MNO MANAGEMENT PAGE */
/* ============================= */

.card-mno-live {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.card-mno-degraded {
    background-color: #fffbeb;
    border: 1px solid #fef08a;
}

.card-mno-suppressed {
    background-color: #fdf2f8;
    border: 1px solid #fbcfe8;
}

.mno-stat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mno-stat-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 11px;
}

.mno-stat-label {
    color: #6b7280;
}

.mno-stat-value {
    color: #111827;
    font-weight: 700;
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 1024px) {

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {

    .reversal-summary {
        flex-direction: column;
    }

    .topbar-search input {
        width: 160px;
    }
}