/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem 2.25rem 1rem 2.25rem;
    /* Added padding to match layout */
    border-bottom: 1px solid #e2e8f0;
    background: #fef2f2;
    /* Ensure background matches body if sticky header issues arise */
}

.details-content {
    padding: 0 2.25rem 2rem 2.25rem;
    /* Added padding to match layout */
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.status-active {
    background-color: #dcfce7;
    color: #166534;
}

/* Metric Cards */
.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    height: 100%;
    border: 1px solid #f1f5f9;
}

.metric-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.metric-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.metric-trend {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trend-up {
    color: #10b981;
}

.trend-down {
    color: #ef4444;
}

/* Chart Containers */
.chart-container-view {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    border: 1px solid #f1f5f9;
    height: 400px;
    /* Fixed height for consistency */
}

/* Logs Panel */
.logs-panel {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
    overflow: hidden;
}

.logs-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Method Badges */
.badge-method {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-POST {
    background-color: #dbeafe;
    color: #1e40af;
}

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

.badge-DELETE {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Configuration List */
.config-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.config-list .item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
}

.config-list .item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.config-list .key {
    color: #64748b;
    font-weight: 500;
}


/* --- Design 56: Clean & Modern Card --- */
.stat-card-design-a {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    height: 100%;
}

.stat-card-design-a:hover {
    transform: translateY(-2px);
}

.design-a-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.design-a-content {
    flex-grow: 1;
}

.design-a-label {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.design-a-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.25rem 0;
}

.design-a-change {
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.design-a-change.pos {
    color: #10b981;
}

.design-a-change.neg {
    color: #ef4444;
}


/* --- Design 57: Vibrant Gradient Card --- */
.stat-card-design-b {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    height: 100%;
}

.stat-card-design-b::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.design-b-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.design-b-icon {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.design-b-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.design-b-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.design-b-pill {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* --- Design 58: Glassmorphism Border Card --- */
.stat-card-design-c {
    background: white;
    /* Adapted for light theme */
    border-radius: 12px;
    padding: 1.25rem;
    border-left: 5px solid #3b82f6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    border: 1px solid #e2e8f0;
    border-left-width: 5px;
}

.design-c-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.design-c-title {
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
}

.design-c-icon {
    color: #94a3b8;
    font-size: 1.1rem;
}

.design-c-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.design-c-num {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.design-c-trend {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

/* --- Design 60: Dark Tech Card --- */
.stat-card-design-e {
    background: #0f172a;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    color: #e2e8f0;
    border: 1px solid #1e293b;
    height: 100%;
}

.stat-card-design-e::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 0 0 8px 8px;
}

.design-e-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.design-e-label {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.design-e-val {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-top: 0.5rem;
    display: block;
}

.design-e-icon-box {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 1.2rem;
}

.design-e-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    color: #64748b;
}

/* --- Design 62: Circle Progress Card (Design G) --- */
.stat-card-design-g {
    background: white;
    /* Adapted for light theme */
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    height: 100%;
}

.design-g-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid #f1f5f9;
    /* Light gray base */
    border-top-color: #ef4444;
    /* Default to red/error for this specific usage */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
}

.design-g-content h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.design-g-content div {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0.25rem;
}

/* Header Design: Modern Left Accent (Design 4 Adapted) */
.header-design-modern {
    background: #ffffff;
    border-left: 5px solid #10b981;
    /* Green accent for 'Operational' feel */
    padding: 1.5rem 2rem;
    border-radius: 0 12px 12px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    border: 1px solid #f1f5f9;
    border-left-width: 5px;
}

.header-design-modern h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.header-design-modern .status-text {
    color: #64748b;
    margin-top: 0.4rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.header-design-modern .status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.header-btn-group {
    display: flex;
    gap: 1rem;
}

.btn-modern-light {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
}

.btn-modern-light:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-modern-primary {
    background: #0f172a;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
}

.btn-modern-primary:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
     /* Loading Overlay */
        .page-loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            transition: opacity 0.5s ease, visibility 0.5s ease;
        }

        .page-loading-overlay.hidden {
            opacity: 0;
            visibility: hidden;
        }

        .loading-content {
            text-align: center;
            color: #333;
        }

        .logo-container {
            margin-bottom: 3rem;
        }

        .logo-container img {
            max-width: 200px;
            height: auto;
        }

        /* Modern Spinner */
        .modern-spinner {
            position: relative;
            width: 60px;
            height: 60px;
            margin: 0 auto 2rem auto;
        }

        .spinner-ring {
            position: absolute;
            width: 100%;
            height: 100%;
            border: 3px solid transparent;
            border-top: 3px solid #dc3545;
            border-radius: 50%;
            animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
        }

        .spinner-ring:nth-child(1) {
            animation-delay: -0.45s;
            border-top-color: #dc3545;
        }

        .spinner-ring:nth-child(2) {
            animation-delay: -0.3s;
            border-top-color: #28a745;
            width: 80%;
            height: 80%;
            top: 10%;
            left: 10%;
        }

        .spinner-ring:nth-child(3) {
            animation-delay: -0.15s;
            border-top-color: #007bff;
            width: 60%;
            height: 60%;
            top: 20%;
            left: 20%;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .loading-content h4 {
            font-size: 1.5rem;
            color: #333;
            margin-bottom: 0.5rem;
            font-weight: 600;
        }