:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(22, 28, 45, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #6366f1;
    --accent-secondary: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    --success-bg: rgba(16, 185, 129, 0.15);
    --success-text: #a7f3d0;
    --success-border: rgba(16, 185, 129, 0.3);
    --error-bg: rgba(239, 68, 68, 0.15);
    --error-text: #fca5a5;
    --error-border: rgba(239, 68, 68, 0.3);
    --info-bg: rgba(59, 130, 246, 0.15);
    --info-text: #bfdbfe;
    --info-border: rgba(59, 130, 246, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
}

/* --- Login Page specific styles --- */
body.login-page {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.login-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 3rem 2.5rem;
    border-radius: 1.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.6s ease-out;
}

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

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
    text-align: center;
    direction: ltr;
}

.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.btn-submit {
    width: 100%;
    background: var(--accent-gradient);
    border: none;
    border-radius: 0.75rem;
    padding: 0.875rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    margin-top: 1rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.alert.error {
    background-color: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
    animation: shake 0.4s ease-in-out;
}

.alert.normal {
    background-color: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* --- Dashboard Page specific styles --- */
body.dashboard-page {
    padding-bottom: 3rem;
}

.navbar {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-logo-img {
    height: 48px;
    width: 48px;
    object-fit: contain;
    display: inline-block;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.dashboard-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.dashboard-title p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.btn-trigger {
    background: var(--accent-gradient);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-trigger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-trigger:active:not(:disabled) {
    transform: translateY(0);
}

.btn-trigger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.alert-banner {
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.4s ease-out;
    border-right: 4px solid transparent;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-banner.success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: #10b981;
    border-right: 4px solid #10b981;
}

.alert-banner.error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: #ef4444;
    border-right: 4px solid #ef4444;
}

.alert-banner.info {
    background: var(--info-bg);
    color: var(--info-text);
    border-color: #3b82f6;
    border-right: 4px solid #3b82f6;
}

.table-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

th {
    background: rgba(15, 23, 42, 0.4);
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1.25rem 1.5rem;
    font-size: 0.925rem;
    border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

.file-name {
    font-weight: 500;
    font-family: monospace !important;
    color: var(--text-primary);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.775rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.date-cell {
    color: var(--text-secondary);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.4rem 0.875rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.825rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-download:hover {
    background: rgba(16, 185, 129, 0.25);
    color: white;
    border-color: #10b981;
    transform: translateY(-1px);
}

.btn-restore {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
    padding: 0.4rem 0.875rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.825rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-restore:hover {
    background: rgba(59, 130, 246, 0.25);
    color: white;
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.btn-delete {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 0.4rem 0.875rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.825rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.25);
    color: white;
    border-color: #ef4444;
    transform: translateY(-1px);
}

.btn-unban {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(249, 115, 22, 0.1);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.25);
    padding: 0.4rem 0.875rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.825rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-unban:hover {
    background: rgba(249, 115, 22, 0.25);
    color: white;
    border-color: #f97316;
    transform: translateY(-1px);
}

.no-backups {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.no-backups-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 15, 25, 0.9);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: rgba(22, 28, 45, 0.95);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 1.5rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.progress-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
    height: 12px;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
}

.progress-bar {
    background: var(--accent-gradient);
    height: 100%;
    width: 0%;
    transition: width 0.2s ease;
}

.progress-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-secondary);
    margin-bottom: 1rem;
}

.restore-error-msg {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    margin-top: 1rem;
    text-align: right;
    direction: rtl;
}

/* Mobile View Fixes */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .container {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .btn-trigger {
        width: 100%;
        justify-content: center;
    }
    .table-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        min-width: 600px; /* Force scrollable table instead of squishing it */
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stat-card {
        padding: 1rem;
    }
    .modal-content {
        padding: 1.5rem;
    }
}

/* ── Schedule Settings Card ─────────────────────────────────── */
.schedule-settings-card {
    background: linear-gradient(145deg, rgba(22, 28, 50, 0.85), rgba(15, 22, 40, 0.9));
    border: 1px solid rgba(99, 102, 241, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.35),
        0 2px 8px rgba(99, 102, 241, 0.08);
    animation: fadeIn 0.5s ease-out;
}

/* Card Header */
.schedule-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.schedule-card-icon {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(59, 130, 246, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 0.875rem;
    width: 3.25rem;
    height: 3.25rem;
    flex-shrink: 0;
}

.schedule-card-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.schedule-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.schedule-card-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ── Inline Toast ────────────────────────────────────────────── */
.settings-toast {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin-bottom 0.3s ease;
    margin-bottom: 0;
}

.settings-toast.show {
    max-height: 80px;
    opacity: 1;
    margin-bottom: 1.25rem;
}

.settings-toast-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    border-radius: 0.875rem;
    font-size: 0.9rem;
    font-weight: 600;
    direction: rtl;
}

.settings-toast-inner.success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

.settings-toast-inner.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* ── Settings Row ────────────────────────────────────────────── */
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 0;
    flex-wrap: wrap;
}

.settings-row-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex: 1;
    min-width: 0;
}

.settings-row-icon {
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 0.625rem;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
}

.settings-row-label {
    font-size: 0.975rem;
    font-weight: 600;
    color: var(--text-primary);
    direction: rtl;
}

.settings-row-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
    direction: rtl;
    line-height: 1.4;
}

.settings-row-control {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-shrink: 0;
}

.settings-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0;
}

/* ── Material 3 Switch ──────────────────────────────────────── */
.m3-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.m3-switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.m3-switch-track {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 52px;
    height: 28px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
    border: 2px solid rgba(148, 163, 184, 0.4);
    transition: background 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.m3-switch-thumb {
    position: absolute;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.15s ease, background 0.3s ease, box-shadow 0.3s ease;
    will-change: left;
}

.m3-switch-input:checked ~ .m3-switch-track {
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    border-color: transparent;
}

.m3-switch-input:checked ~ .m3-switch-track .m3-switch-thumb {
    left: 27px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.m3-switch-track:hover .m3-switch-thumb {
    box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.12);
}

/* ── Status Pill ─────────────────────────────────────────────── */
.m3-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.8rem;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.m3-status-pill::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.m3-status-pill.enabled {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

.m3-status-pill.enabled::before {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
    animation: pulse-green 2s infinite;
}

.m3-status-pill.disabled {
    background: rgba(100, 116, 139, 0.12);
    border: 1px solid rgba(100, 116, 139, 0.25);
    color: var(--text-secondary);
}

.m3-status-pill.disabled::before {
    background: var(--text-secondary);
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 4px #10b981; }
    50% { box-shadow: 0 0 10px #10b981; }
}

/* ── Time Select ─────────────────────────────────────────────── */
.time-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.m3-select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(15, 23, 42, 0.6);
    border: 1.5px solid rgba(99, 102, 241, 0.25);
    border-radius: 0.875rem;
    padding: 0.65rem 2.5rem 0.65rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    outline: none;
    direction: rtl;
    cursor: pointer;
    min-width: 160px;
    text-align: right;
}

.m3-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(15, 23, 42, 0.85);
}

.time-select-chevron {
    position: absolute;
    left: 0.75rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    pointer-events: none;
    transform: rotate(90deg);
    line-height: 1;
}

/* ── Save Button ─────────────────────────────────────────────── */
.settings-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-save-settings {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.75rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    position: relative;
    overflow: hidden;
}

.btn-save-settings::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.2s ease;
}

.btn-save-settings:hover:not(:disabled)::before {
    background: rgba(255, 255, 255, 0.08);
}

.btn-save-settings:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(99, 102, 241, 0.45);
}

.btn-save-settings:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
}

.btn-save-settings:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Keep old classes for remaining elements */
.status-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-block;
    transition: all 0.2s ease;
}

.status-badge.enabled {
    background-color: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.status-badge.disabled {
    background-color: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .schedule-settings-card {
        padding: 1.4rem;
        border-radius: 1.25rem;
    }
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .settings-row-control {
        align-self: flex-end;
    }
    .settings-footer {
        justify-content: stretch;
    }
    .btn-save-settings {
        width: 100%;
        justify-content: center;
    }
    .m3-select {
        min-width: 140px;
    }
}

/* ── Classes replacing removed inline styles ──────────────────── */

/* Stat card: system status */
.stat-system-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}
.stat-system-status--running { color: #f87171; }
.stat-system-status--ready   { color: #34d399; }

/* Stat card: latest backup */
.stat-latest-backup {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
}

/* Banned section header */
.dashboard-header--banned {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

/* Banned section table-card */
.table-card--banned {
    margin-bottom: 2rem;
}

/* No-backups variants */
.no-backups--banned {
    padding: 2.5rem 1.5rem;
}
.no-backups-icon--sm {
    font-size: 2rem;
}
.no-backups-hint {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* Red spinner (backup running state) */
.spinner--red {
    border-color: rgba(248, 113, 113, 0.3);
    border-top-color: #f87171;
}

/* Badge color variants */
.badge--device {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}
.badge--ip {
    background: rgba(245, 158, 11, 0.15);
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.3);
}

/* Banned table secondary text cell */
.cell-secondary {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Restore error hidden state */
.restore-error-hidden {
    display: none;
}

/* Close modal button */
.btn-close-modal {
    display: none;
    margin-top: 1rem;
    width: 100%;
}

/* Restore password modal form group */
.restore-pwd-group {
    text-align: right;
    direction: rtl;
    margin-bottom: 1rem;
}

/* Restore password action buttons row */
.restore-pwd-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}
.btn-trigger--full {
    flex: 1;
    justify-content: center;
}
.btn-logout--full {
    flex: 1;
}
