/* ============================================================
   LSNC BACKUP CENTER — MODERN DASHBOARD
   ============================================================ */

:root {
    --lsnc-navy: #10283f;
    --lsnc-navy-light: #173d56;
    --lsnc-teal: #087e89;
    --lsnc-blue: #2563eb;
    --lsnc-green: #16a34a;
    --lsnc-orange: #f59e0b;
    --lsnc-red: #dc2626;
    --lsnc-bg: #f2f6fb;
    --lsnc-radius: 18px;
}

body {
    background: var(--lsnc-bg);
}

/* Sidebar */

.sidebar {
    background: linear-gradient(
        180deg,
        #10283f 0%,
        #12384f 65%,
        #0b2337 100%
    );
    box-shadow: 5px 0 25px rgba(16, 40, 63, .08);
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    border-radius: 12px;
    transition:
        background .25s ease,
        color .25s ease,
        transform .25s ease;
}

.sidebar .nav-link:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
    transform: translateX(4px);
}

.sidebar .nav-link.active {
    background: linear-gradient(
        110deg,
        #087e89,
        #17677b
    );
    box-shadow: 0 5px 15px rgba(0,0,0,.12);
}

/* Main heading */

.brand {
    font-weight: 800;
    letter-spacing: -.5px;
}

/* Cards */

.metric {
    border: 1px solid rgba(16,40,63,.05);
    border-radius: var(--lsnc-radius);
    background: #fff;
    box-shadow: 0 8px 28px rgba(16,40,63,.055);
    transition:
        transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
    animation: lsncFadeUp .5s ease both;
}

.metric:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 35px rgba(16,40,63,.12);
    border-color: rgba(8,126,137,.18);
}

.metric .value {
    font-weight: 800;
    letter-spacing: -.4px;
}

/* Icon containers */

.lsnc-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #e9f4f6;
    color: #087e89;
}

.lsnc-icon.database {
    background: #eaf0ff;
    color: #2563eb;
}

.lsnc-icon.websites {
    background: #e5f7f3;
    color: #059669;
}

.lsnc-icon.server {
    background: #f1ebff;
    color: #7c3aed;
}

.lsnc-icon.scheduler {
    background: #fff3e5;
    color: #d97706;
}

/* Status indicators */

.lsnc-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border-radius: 30px;
    font-size: .76rem;
    font-weight: 700;
}

.lsnc-status.current {
    background: #e8f8ef;
    color: #147d43;
}

.lsnc-status.overdue {
    background: #fef0f0;
    color: #b91c1c;
}

.lsnc-status.missing {
    background: #fff5db;
    color: #92400e;
}

.lsnc-status.unknown {
    background: #eef1f5;
    color: #475569;
}

.lsnc-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.lsnc-status.current .lsnc-status-dot {
    animation: lsncPulse 2.5s ease-in-out infinite;
}

/* Freshness progress bars */

.lsnc-progress {
    height: 8px;
    border-radius: 20px;
    overflow: hidden;
    background: #e8eef5;
}

.lsnc-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg,#087e89,#26b5aa);
    transition: width .7s ease;
}

.lsnc-progress-fill.warning {
    background: linear-gradient(90deg,#f59e0b,#f97316);
}

.lsnc-progress-fill.danger {
    background: linear-gradient(90deg,#ef4444,#b91c1c);
}

/* Table improvements */

.table {
    --bs-table-bg: transparent;
}

.table thead th {
    color: #526477;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 15px 12px;
}

.table tbody td {
    padding: 15px 12px;
}

.table tbody tr {
    transition: background .2s ease;
}

.table tbody tr:hover {
    background: #f0f7fa;
}

/* Buttons */

.btn {
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Animations */

@keyframes lsncFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lsncPulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(22,163,74,.22);
    }
    50% {
        opacity: .65;
        box-shadow: 0 0 0 6px rgba(22,163,74,0);
    }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Responsive */

@media (max-width: 767px) {
    .metric:hover {
        transform: none;
    }

    .sidebar .nav-link:hover {
        transform: none;
    }
}

/* ============================================================
   SYSTEM HEALTH OVERVIEW
   ============================================================ */

.lsnc-health-tile {
    height: 100%;
    padding: 22px;
    border: 1px solid #e5edf4;
    border-radius: 16px;
    background: linear-gradient(145deg,#fff,#f8fbfe);
    transition: transform .25s ease, box-shadow .25s ease;
}

.lsnc-health-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(16,40,63,.08);
}

.lsnc-health-label {
    margin-top: 17px;
    font-size: .79rem;
    font-weight: 600;
    color: #66788b;
}

.lsnc-health-value {
    margin-top: 5px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #10283f;
}

.lsnc-health-detail {
    margin-top: 6px;
    font-size: .78rem;
    color: #6b7b8b;
}

.lsnc-health-footer {
    padding: 15px 18px;
    border-radius: 12px;
    background: #f1f7fb;
    color: #536b7e;
    font-size: .82rem;
    line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
    .lsnc-health-tile {
        transition: none;
    }
}


/* ============================================================
   BACKUP HISTORY REDESIGN
   ============================================================ */

.lsnc-history-stat {
    height: 100%;
    padding: 21px;
    border: 1px solid #e5edf4;
    border-radius: 16px;
    background: linear-gradient(145deg,#fff,#f8fbfe);
    transition: transform .25s ease, box-shadow .25s ease;
}

.lsnc-history-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(16,40,63,.08);
}

.lsnc-history-stat-label {
    margin-top: 13px;
    font-size: .8rem;
    font-weight: 600;
    color: #66788b;
}

.lsnc-history-stat-value {
    margin-top: 4px;
    font-size: 1.7rem;
    font-weight: 800;
    color: #10283f;
}

.lsnc-history-stat-value.lsnc-history-access {
    font-size: 1.3rem;
    color: #087e89;
}

.lsnc-history-stat-detail {
    margin-top: 4px;
    font-size: .78rem;
    color: #718096;
}

.lsnc-history-filters {
    padding: 19px;
    margin-bottom: 24px;
    border: 1px solid #e5edf4;
    border-radius: 14px;
    background: #f7fafc;
}

.lsnc-history-filters .form-control,
.lsnc-history-filters .form-select {
    border-radius: 10px;
    padding: 11px 13px;
}

.lsnc-history-filters .form-control:focus,
.lsnc-history-filters .form-select:focus {
    border-color: #087e89;
    box-shadow: 0 0 0 3px rgba(8,126,137,.12);
}

.lsnc-history-table {
    border: 1px solid #e5edf4;
    border-radius: 13px;
    overflow: hidden;
}

.lsnc-history-table .table {
    margin-bottom: 0;
}

.lsnc-history-table tbody tr {
    transition: background .2s ease;
}

.lsnc-history-table tbody tr:hover {
    background: #eef8fa;
}

.lsnc-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: .77rem;
    font-weight: 700;
    white-space: nowrap;
}

.lsnc-category-badge.database {
    background: #eaf0ff;
    color: #2563eb;
}

.lsnc-category-badge.websites {
    background: #e5f7f3;
    color: #059669;
}

.lsnc-category-badge.server {
    background: #f1ebff;
    color: #7c3aed;
}

.lsnc-category-badge.other {
    background: #edf1f5;
    color: #475569;
}

.lsnc-snapshot-id {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #b42365;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .lsnc-history-stat,
    .lsnc-history-table tbody tr {
        transition: none;
    }
}
