:root {
    --color-attention: #fd7e14;
}

body {
    background-color: #f5f7fa;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.stat-card {
    border-radius: 14px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: none;
    overflow: hidden;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15) !important;
}

.stat-card-total {
    background: linear-gradient(135deg, #001f3f 0%, #003366 100%);
    color: #ffffff;
}

.stat-card-healthy {
    background: linear-gradient(135deg, #0f7a4e 0%, #14a76c 100%);
    color: #ffffff;
}

.stat-card-attention {
    background: linear-gradient(135deg, #9c4b00 0%, #fd7e14 100%);
    color: #ffffff;
}

.stat-card-critical {
    background: linear-gradient(135deg, #842029 0%, #dc3545 100%);
    color: #ffffff;
}

.stat-card-body {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-card-total .stat-icon {
    color: #ffffff;
}

.stat-card-healthy .stat-icon {
    color: #ffffff;
}

.stat-card-attention .stat-icon {
    color: #ffffff;
}

.stat-card-critical .stat-icon {
    color: #ffffff;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 0.15rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.text-attention {
    color: var(--color-attention) !important;
}

.card {
    border-radius: 12px;
}

.table {
    font-size: 0.92rem;
}

.table thead th {
    font-weight: 600;
    color: #495057;
    border-top: none;
    white-space: nowrap;
}

.table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: #eef2f7;
}

.badge {
    font-size: 0.8rem;
    padding: 0.45em 0.8em;
    border-radius: 20px;
}

.badge-status-healthy {
    background-color: #d1f2e6;
    color: #0f7a4e;
}

.badge-status-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-status-attention {
    background-color: #ffe5d1;
    color: #9c4b00;
}

.badge-status-critical {
    background-color: #f8d7da;
    color: #842029;
}

.badge-status-expired {
    background-color: #f5c6cb;
    color: #721c24;
}

.badge-status-failed {
    background-color: #dc3545;
    color: #ffffff;
}

.days-remaining {
    font-weight: 600;
}

.days-healthy {
    color: #0f7a4e;
}

.days-warning {
    color: #856404;
}

.days-attention {
    color: #9c4b00;
}

.days-critical {
    color: #842029;
}

.days-expired {
    color: #721c24;
}

.days-failed {
    color: #6c757d;
}

.badge-status-stopped {
    background-color: #6c757d;
    color: #ffffff;
}

.days-stopped {
    color: #6c757d;
}

.form-select,
.form-control {
    border-radius: 8px;
}

.input-group-text {
    border-radius: 8px 0 0 8px;
}

.btn {
    border-radius: 8px;
}

.btn-primary {
    background-color: #001f3f;
    border-color: #001f3f;
}

.bg-navy {
    background-color: #001f3f !important;
}

.text-navy {
    color: #001f3f !important;
}

.btn-navy {
    background-color: #001f3f;
    border-color: #001f3f;
    color: #ffffff;
}

.btn-navy:hover,
.btn-navy:focus,
.btn-navy:active {
    background-color: #001635;
    border-color: #001635;
    color: #ffffff;
}

.btn-outline-navy {
    color: #001f3f;
    border-color: #001f3f;
}

.btn-outline-navy:hover,
.btn-outline-navy:focus,
.btn-outline-navy:active {
    background-color: #001f3f;
    border-color: #001f3f;
    color: #ffffff;
}

#refreshBtn i.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.detail-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    height: 100%;
}

.detail-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.detail-value {
    display: block;
    font-size: 0.9rem;
    word-break: break-word;
}

.chain-list {
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.chain-list li {
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}

.empty-state {
    padding: 3rem;
    text-align: center;
    color: #6c757d;
}

@media (max-width: 768px) {
    .stat-value {
        font-size: 1.4rem;
    }

    .table {
        font-size: 0.85rem;
    }
}
