
      * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            font-family: Arial, Helvetica, sans-serif;
            background: #f4f6f9;
            color: #1f2937;
        }

        /* =========================
           LOGIN
        ========================= */

        #loginPage {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f4f6f9;
        }

        .login-card {
            width: 380px;
            background: white;
            padding: 35px;
            border-radius: 12px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.08);
        }

        .login-card h1 {
            margin: 0 0 8px;
            text-align: center;
            font-size: 24px;
        }

        .login-card p {
            text-align: center;
            color: #6b7280;
            margin-bottom: 30px;
        }

        .form-group {
            margin-bottom: 18px;
        }

        .form-group label {
            display: block;
            margin-bottom: 7px;
            font-weight: 600;
            font-size: 14px;
        }

        .form-group input {
            width: 100%;
            padding: 12px;
            border: 1px solid #d1d5db;
            border-radius: 7px;
            font-size: 15px;
        }

        .form-group input:focus {
            outline: none;
            border-color: #2563eb;
        }

        .login-button {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 7px;
            background: #2563eb;
            color: white;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
        }

        .login-button:hover {
            background: #1d4ed8;
        }

        .login-error {
            color: #dc2626;
            background: #fee2e2;
            padding: 10px;
            border-radius: 6px;
            margin-bottom: 15px;
            display: none;
            font-size: 14px;
        }

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

        #dashboardPage {
            display: none;
        }

        .header {
            background: white;
            border-bottom: 1px solid #e5e7eb;
            padding: 15px 30px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .header-title {
            font-size: 21px;
            font-weight: 700;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .status {
            display: flex;
            align-items: center;
            gap: 7px;
            font-size: 14px;
        }

        .status-dot {
            width: 9px;
            height: 9px;
            background: #16a34a;
            border-radius: 50%;
        }

        .logout-button {
            border: none;
            background: #ef4444;
            color: white;
            padding: 8px 15px;
            border-radius: 6px;
            cursor: pointer;
        }

        .container {
            max-width: 1400px;
            margin: auto;
            padding: 25px;
        }

        /* =========================
           CARDS
        ========================= */

        .summary {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 18px;
            margin-bottom: 25px;
        }

        .summary-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        .summary-card .label {
            color: #6b7280;
            font-size: 14px;
            margin-bottom: 8px;
        }

        .summary-card .value {
            font-size: 27px;
            font-weight: 700;
        }

        /* =========================
           TOOLBAR
        ========================= */

        .toolbar {
            background: white;
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 15px;
        }

        .search {
            flex: 1;
        }

        .search input {
            width: 100%;
            padding: 11px;
            border: 1px solid #d1d5db;
            border-radius: 7px;
        }

        .refresh-button {
            border: none;
            background: #2563eb;
            color: white;
            padding: 10px 18px;
            border-radius: 7px;
            cursor: pointer;
        }

        /* =========================
           FOLDERS
        ========================= */

        .folder {
            background: white;
            border-radius: 10px;
            margin-bottom: 15px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        .folder-header {
            padding: 17px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
        }

        .folder-header:hover {
            background: #f9fafb;
        }

        .folder-name {
            font-weight: 700;
            font-size: 16px;
        }

        .folder-count {
            background: #e5e7eb;
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 12px;
        }

        .folder-content {
            display: none;
            overflow-x: auto;
        }

        .folder-content.open {
            display: block;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th {
            text-align: left;
            background: #f9fafb;
            padding: 12px 15px;
            font-size: 13px;
            color: #6b7280;
        }

        td {
            padding: 12px 15px;
            border-top: 1px solid #f0f0f0;
            font-size: 13px;
        }

        .file-name {
            font-weight: 600;
        }

        .backup-good {
            color: #15803d;
            font-weight: 600;
        }

        .backup-old {
            color: #dc2626;
            font-weight: 600;
        }

        .loading {
            text-align: center;
            padding: 50px;
            color: #6b7280;
        }

        .last-refresh {
            font-size: 12px;
            color: #6b7280;
        }

        /* =========================
           DATE FOLDERS
        ========================= */

/* =========================================
   DATE & STATUS STYLING
========================================= */

.date-cell {
    white-space: nowrap;
    font-weight: 600;
}

.backup-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.backup-date::before {
    content: "📅";
    font-size: 14px;
}


/* =========================================
   BACKUP STATUS BADGES
========================================= */

.backup-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.backup-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}


/* Healthy */

.backup-good {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

.backup-good::before {
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}


/* Old */

.backup-old {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.backup-old::before {
    background: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}


/* Warning */

.backup-warning {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
}

.backup-warning::before {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}


/* Unknown */

.backup-unknown {
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
}

.backup-unknown::before {
    background: #64748b;
}


/* =========================================
   TABLE DATE COLUMN
========================================= */

.backup-table td.date-cell {
    min-width: 150px;
}

.backup-table td.status-cell {
    min-width: 130px;
}


/* =========================================
   DATE SORT BUTTON
========================================= */

.date-sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid #dbe3ec;
    border-radius: 7px;
    background: white;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-sort:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.date-sort.active {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}


/* =========================================
   DATE FILTER
========================================= */

.date-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-filter label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.date-filter select {
    padding: 9px 32px 9px 11px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    background: white;
    color: #334155;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease;
}

.date-filter select:hover {
    border-color: #94a3b8;
}

.date-filter select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}


/* =========================================
   DATE GROUP HEADER
========================================= */

.date-group {
    margin-bottom: 20px;
}

.date-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 9px;
    background: linear-gradient(
        135deg,
        #f8fafc,
        #eef2f7
    );
    border: 1px solid #e2e8f0;
}

.date-group-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.date-group-title::before {
    content: "📅";
    font-size: 16px;
}

.date-group-count {
    padding: 4px 9px;
    border-radius: 12px;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
}


/* =========================================
   RECENT DATE HIGHLIGHT
========================================= */

.date-today {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.date-yesterday {
    background: #f8fafc;
    border-color: #cbd5e1;
}


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

@media (max-width: 700px) {

    .backup-date {
        padding: 5px 8px;
        font-size: 12px;
    }

    .backup-status {
        padding: 5px 9px;
        font-size: 11px;
    }

    .date-filter {
        width: 100%;
    }

    .date-filter select {
        flex: 1;
    }

    .date-group-header {
        padding: 10px 12px;
    }

}

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

        @media(max-width: 900px) {

            .summary {
                grid-template-columns: repeat(2, 1fr);
            }

            .header {
                padding: 15px;
            }

            .container {
                padding: 15px;
            }
        }

        @media(max-width: 600px) {

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

            .toolbar {
                flex-direction: column;
                align-items: stretch;
            }

            .header-title {
                font-size: 17px;
            }
        }
  
