/* Modern and Premium Styling */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #10b981;
    --success-hover: #059669;
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --input-bg: #ffffff;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.03);
    --body-bg: linear-gradient(135deg, #f0f4f8 0%, #e0e7ff 100%);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glow-color: rgba(37, 99, 235, 0.1);
}

/* Dark Mode - Glassmorphism */
[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --success: #10b981;
    --success-hover: #34d399;
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.65);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(15, 23, 42, 0.6);
    --shadow-soft: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2);
    --body-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glow-color: rgba(99, 102, 241, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--body-bg);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Glassmorphism Container */
.container {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    width: 100%;
    max-width: 460px;
    position: relative;
    overflow: hidden;
}

/* Subtle decorative glow */
.container::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--glow-color) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.content {
    position: relative;
    z-index: 1;
}

h2 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 30px;
}

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

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Inputs */
input[type="text"],
input[type="date"],
input[type="file"] {
    width: 100%;
    height: 48px;
    padding: 10px 16px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-main);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-inner);
    font-family: inherit;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="file"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input::placeholder {
    color: #94a3b8;
}

input.input-error {
    border-color: rgba(239, 68, 68, 0.8) !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
}

.login-field-wrap {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    transition: color 0.2s;
    z-index: 5;
}

.password-toggle:hover {
    color: var(--text-main);
}

/* File Input Wrapper and Reset Button */
.file-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.reset-file-btn {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.reset-file-btn:hover:not(:disabled) {
    background-color: #ef4444;
    color: white;
}

.reset-file-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-muted);
}

/* Tooltip for Reset Button */
.reset-file-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--card-bg);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 20;
}

.reset-file-btn:hover:not(:disabled)::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}


/* Custom File Input Styling */
input[type="file"] {
    padding: 9px 14px;
    cursor: pointer;
    font-size: 14px;
}

input[type="file"]::file-selector-button {
    background-color: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    margin-right: 12px;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background-color: #e2e8f0;
}

[data-theme="dark"] input[type="file"]::file-selector-button {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] input[type="file"]::file-selector-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Toggle Buttons for Doc Type */
.segment-control {
    display: flex;
    background-color: #f1f5f9;
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
}

.toggle-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Checkbox */
.checkbox-row {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: -10px;
    padding: 10px 14px;
    background-color: #f8fafc;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    animation: fadeIn 0.3s ease;
}

.checkbox-row label {
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Now Button */
.date-row {
    display: flex;
    gap: 10px;
}

/* Side by Side Inputs */
.row-flex {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.col-date {
    flex: 1;
}

.col-jam {
    width: 80px;
    flex-shrink: 0;
}

/* Action Buttons */
.button-row {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.action-btn {
    flex: 1;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.generate-btn {
    background: rgba(37, 99, 235, 0.65);
}

.generate-btn:hover:not(:disabled) {
    background: rgba(37, 99, 235, 0.85);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .generate-btn {
    background: rgba(59, 130, 246, 0.6);
}

[data-theme="dark"] .generate-btn:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.85);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.merge-btn {
    background: rgba(16, 185, 129, 0.65);
}

.merge-btn:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.85);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .merge-btn {
    background: rgba(16, 185, 129, 0.6);
}

[data-theme="dark"] .merge-btn:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.85);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.action-btn:disabled {
    background: rgba(203, 213, 225, 0.6);
    color: rgba(255, 255, 255, 0.9);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .action-btn:disabled {
    background: rgba(30, 41, 59, 0.6);
    color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loader */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border-radius: var(--radius-lg);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

.loading-overlay span {
    font-weight: 600;
    color: var(--text-main);
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    z-index: 2000;
    pointer-events: none;
    width: 100%;
    max-width: 500px;
    align-items: center;
}

.toast {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15);
    border-radius: 50px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    pointer-events: auto;
    width: fit-content;
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.urgent {
    background: #ef4444 !important;
    color: white !important;
    border: none !important;
}

.toast.urgent .toast-icon {
    color: white !important;
}

.toast.urgent .toast-message {
    color: white !important;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.05);
    /* Slightly darker in light mode */
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
    background: var(--card-bg);
    transform: scale(1.05);
}

/* Tooltip for navigation buttons */
.theme-toggle::before {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: var(--card-bg);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.theme-toggle:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.purge-btn:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.debug-btn:hover {
    color: var(--accent-light);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Pre-Flight Dashboard */
#preflightDashboard {
    margin-top: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: none;
    animation: fadeIn 0.3s ease;
    max-height: 300px;
    overflow-y: auto;
}

/* Custom Scrollbar for Dashboard */
#preflightDashboard::-webkit-scrollbar {
    width: 6px;
}

#preflightDashboard::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
}

#preflightDashboard::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

[data-theme="dark"] #preflightDashboard::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] #preflightDashboard {
    background: rgba(0, 0, 0, 0.2);
}

.dashboard-header {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.dash-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 6px;
    padding: 6px 10px;
    background: var(--input-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.badge.ready {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge.warn {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Custom Footer */
.app-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.8;
}

/* Dynamic Background Canvas */
.bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background: transparent;
}

.floating-text {
    position: absolute;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 800;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    opacity: 0;
    transform: translateY(20px);
    transition: color 0.3s ease;
    letter-spacing: 2px;
    color: rgba(37, 99, 235, 0.18);
}

[data-theme="dark"] .floating-text {
    color: rgba(96, 165, 250, 0.22);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.8);
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1.1);
    }
}

.animate-float {
    animation: floatUp var(--duration, 10s) ease-in-out forwards;
}

/* ═══ MEMBER LOGIN SCREEN ═══ */
/* ═══ MEMBER LOGIN SCREEN ═══ */
#memberLoginScreen.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0f172a;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

#memberLoginScreen::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 60%);
    animation: meshRotate 20s linear infinite;
    z-index: 0;
}

@keyframes meshRotate {
    0% { transform: translate(-10%, -10%) rotate(0deg); }
    50% { transform: translate(5%, 5%) rotate(180deg); }
    100% { transform: translate(-10%, -10%) rotate(360deg); }
}

#memberLoginScreen.hidden {
    display: none !important;
}

#memberLoginScreen .login-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 32px;
    padding: 50px 40px;
    width: 95%;
    max-width: 420px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative;
    z-index: 10;
    animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#memberLoginScreen .login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 28px;
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.5);
    position: relative;
}

#memberLoginScreen .login-logo::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    z-index: -1;
    opacity: 0.5;
    filter: blur(8px);
}

#memberLoginScreen .login-card h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #ffffff;
    letter-spacing: -0.5px;
}

#memberLoginScreen .login-card p.login-subtitle {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 35px;
}

#memberLoginScreen .login-field {
    text-align: left;
    margin-bottom: 22px;
}

#memberLoginScreen .login-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 8px;
    padding-left: 4px;
}

#memberLoginScreen .login-field input {
    width: 100%;
    height: 52px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 0 16px;
    font-size: 15px;
    color: #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#memberLoginScreen .login-field input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

#memberLoginScreen .login-btn {
    width: 100%;
    height: 54px;
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 32px;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}

#memberLoginScreen .login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.5);
    filter: brightness(1.1);
}

#memberLoginScreen .login-btn:active {
    transform: translateY(0);
}

#memberLoginScreen .login-error {
    color: #f87171;
    font-size: 13px;
    font-weight: 500;
    margin-top: 18px;
    display: none;
    background: rgba(248, 113, 113, 0.1);
    padding: 10px;
    border-radius: 8px;
    border-left: 3px solid #f87171;
}

/* Background Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.4;
    animation: blobFloat 15s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: rgba(37, 99, 235, 0.2);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: rgba(99, 102, 241, 0.2);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: rgba(16, 185, 129, 0.15);
    top: 50%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes blobFloat {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(50px, 40px) scale(1.1); }
}

/* Abstract Visuals (Geometric Art) */
.abstract-visuals {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.ring {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring-1 {
    width: 600px;
    height: 600px;
    border-width: 1.5px;
    border-style: dashed;
    animation: rotateSlow 40s linear infinite;
}

.ring-2 {
    width: 800px;
    height: 800px;
    border-style: solid;
    animation: rotateSlow 60s linear infinite reverse;
    opacity: 0.5;
}

/* Geometric Crosses & Dots */
.art-cross-wrap, .art-dot-wrap {
    position: absolute;
    z-index: 6;
    pointer-events: none;
}

.art-cross-wrap {
    top: 20%;
    right: 15%;
    animation: floatShape 25s ease-in-out infinite alternate;
}

.art-cross {
    width: 40px;
    height: 40px;
    position: relative;
    opacity: 0.4;
    animation: rotateSlow 20s linear infinite;
}

.art-cross::before, .art-cross::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
}

.art-cross::before {
    width: 100%;
    height: 4px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.art-cross::after {
    width: 4px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.art-dot-wrap {
    bottom: 25%;
    left: 15%;
    animation: floatShape 18s ease-in-out infinite alternate-reverse;
}

.art-dot {
    width: 12px;
    height: 12px;
    background: rgba(16, 185, 129, 0.4);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
    position: relative;
}

.art-dot::after {
    content: '';
    position: absolute;
    inset: -10px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 0.1; }
}

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

@keyframes rotateCentered {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.ring-1 {
    width: 600px;
    height: 600px;
    border-width: 1.5px;
    border-style: dashed;
    animation: rotateCentered 40s linear infinite;
}

.ring-2 {
    width: 800px;
    height: 800px;
    border-style: solid;
    animation: rotateCentered 60s linear infinite reverse;
    opacity: 0.5;
}

@keyframes floatShape {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-30px) translateX(20px); }
}

/* Responsive Login */
@media (max-width: 480px) {
    #memberLoginScreen .login-card {
        padding: 40px 24px;
        border-radius: 24px;
    }
    #memberLoginScreen .login-card h1 {
        font-size: 24px;
    }
    .ring-1 { width: 400px; height: 400px; }
    .ring-2 { width: 500px; height: 500px; }
    .shape { display: none; } /* Hide extra shapes on mobile for clarity */
}

/* Custom Modal Glassmorphism */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    /* Controlled by JS */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalScaleUp {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content h3 {
    margin-bottom: 12px;
    font-size: 20px;
    color: var(--text-main);
}

.modal-content p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-btn.cancel {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.modal-btn.cancel:hover {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .modal-btn.cancel {
    background: rgba(255, 255, 255, 0.05);
}

.modal-btn.confirm {
    background: rgba(239, 68, 68, 0.85);
    color: white;
}

.modal-btn.confirm:hover {
    background: rgba(239, 68, 68, 1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}