/* ==============================================================================
 * PRODUCTION UI STYLING - HarshaSecure Registration & Admin Portal
 * Location: downloadapp/static/style.css
 * ============================================================================== */

/* --- 1. ROOT VARIABLES & THEMING --- */
:root {
    /* Brand Colors */
    --primary-color: #2563eb;       /* Corporate Blue */
    --primary-hover: #1d4ed8;
    --accent-purple: #a855f7;
    
    /* System States */
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Glassmorphism Surface Variables */
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.08);
    
    /* Typography & Depth */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --font-main: 'Segoe UI', Roboto, -apple-system, sans-serif;
}

/* --- 2. RESET & BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- 3. LAYOUT CONTAINERS --- */
.portal-container {
    width: 100%;
    max-width: 650px;
    padding: 20px;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--card-shadow);
}

/* --- 4. TYPOGRAPHY --- */
.header-section {
    text-align: center;
    margin-bottom: 30px;
}

.header-section h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    background: linear-gradient(to right, #60a5fa, var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
}

/* --- 5. FORM ARCHITECTURE --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.full-width { grid-column: span 2; }

label {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

input, select, textarea {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

/* --- 6. BUTTONS --- */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* --- 7. OTP INTERFACE --- */
.otp-input-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 30px 0;
}

.otp-box {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

/* --- 8. STATUS BADGES & ALERTS --- */
.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.4s ease-out;
}

.alert-error { background: rgba(239, 68, 68, 0.15); border: 1px solid var(--error); color: #fca5a5; }
.alert-success { background: rgba(34, 197, 94, 0.15); border: 1px solid var(--success); color: #86efac; }

/* Admin/Table Status Badges */
.status-badge {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.status-pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.status-approved { background: rgba(34, 197, 94, 0.15); color: #4ade80; border-color: rgba(34, 197, 94, 0.3); }
.status-rejected { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }

/* --- 9. ADMIN DASHBOARD SPECIFICS --- */
.mac-display {
    font-family: 'Consolas', 'Monaco', monospace;
    background: #000;
    padding: 6px 12px;
    border-radius: 6px;
    color: #60a5fa;
    font-size: 0.85rem;
    border: 1px solid var(--glass-border);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* --- 10. ANIMATIONS --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- 11. RESPONSIVENESS --- */
@media (max-width: 680px) {
    body { padding: 10px; }
    .glass-card { padding: 30px 20px; border-radius: 16px; }
    .form-grid { grid-template-columns: 1fr; gap: 10px; }
    .full-width { grid-column: span 1; }
    .header-section h1 { font-size: 1.75rem; }
    .otp-box { width: 42px; height: 50px; font-size: 1.25rem; }
}

/* Helper to hide elements properly */
.hidden { display: none !important; }