/* =============================================================
 *  Backup SaaS — Custom Styles
 *  Layered on top of Bootstrap 5; keep this file small.
 * =============================================================*/

:root {
    --bs-body-bg: #f5f7fb;
    --sidebar-width: 250px;
    --sidebar-bg: #1f2937;
    --sidebar-fg: #e5e7eb;
    --sidebar-fg-muted: #9ca3af;
    --sidebar-active: #2563eb;
}

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

/* ---------- Auth layout ---------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
}
.auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

/* ---------- App layout ---------- */
.app-wrap { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-fg);
    flex-shrink: 0;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    overflow-y: auto;
    z-index: 1030;
}
.sidebar .brand {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar .nav-link {
    color: var(--sidebar-fg-muted);
    padding: .65rem 1.5rem;
    border-left: 3px solid transparent;
    font-size: .92rem;
}
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.sidebar .nav-link.active {
    color: #fff;
    background: rgba(37,99,235,.15);
    border-left-color: var(--sidebar-active);
}
.sidebar .nav-link i { width: 20px; display: inline-block; text-align: center; }

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
}
.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: .85rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.page-content { padding: 1.5rem; }

/* Mobile */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
}

/* ---------- Cards / stats ---------- */
.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}

/* ---------- File browser ---------- */
.file-tree {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    max-height: 500px;
    overflow-y: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .88rem;
}
.file-tree ul { list-style: none; padding-left: 1.25rem; margin: 0; }
.file-tree > ul { padding-left: 0; }
.file-tree li { padding: .15rem 0; }
.file-tree .toggle {
    cursor: pointer;
    display: inline-block;
    width: 16px;
    color: #6b7280;
}
.file-tree .icon { margin-right: 4px; }
.file-tree .icon.folder { color: #f59e0b; }
.file-tree .icon.file   { color: #6b7280; }

/* ---------- Status pills ---------- */
.status-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: .75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.status-pill.success { background: #d1fae5; color: #065f46; }
.status-pill.running { background: #dbeafe; color: #1e40af; }
.status-pill.queued  { background: #fef3c7; color: #92400e; }
.status-pill.failed  { background: #fee2e2; color: #991b1b; }
.status-pill.partial { background: #fef3c7; color: #92400e; }
.status-pill.cancelled { background: #e5e7eb; color: #374151; }

/* ---------- Progress ---------- */
.progress-thin { height: 6px; }

/* ---------- Utilities ---------- */
.cursor-pointer { cursor: pointer; }
.text-muted-sm  { color: #6b7280; font-size: .85rem; }
