/* authentication/static/authentication/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&display=swap');

:root {
    --bg-color: #f7f7f7;
    --surface-color: #ffffff;
    --primary-color: #da2b26;
    --primary-hover: #b81f1a;
    --text-primary: #333;
    --text-secondary: #666;
    --success-color: #4caf50;
    --error-color: #da2b26;
    --guide-color: rgba(218, 43, 38, 0.5);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

/* --- Login/Signup/Profile Page Styles --- */
.auth-container {
    width: 100%;
    max-width: 600px;
    text-align: center;
}
.auth-form-box {
    background-color: var(--surface-color);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.auth-form-box h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
}
.input-group {
    margin-bottom: 15px;
    text-align: left;
}
input[type="text"], input[type="password"], input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(218, 43, 38, 0.1);
}
.button {
    display: inline-block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    margin-top: 10px;
    box-sizing: border-box;
}
.button:hover:not(:disabled) {
    background-color: var(--primary-hover);
}
.button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    color: #888;
}
.separator {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 25px 0;
    position: relative;
    text-align: center;
}
.separator::before, .separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background-color: #ddd;
}
.separator::before { left: 0; }
.separator::after { right: 0; }

.social-logins { display: flex; flex-direction: column; gap: 10px; }
.social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: background-color 0.2s;
}
.social-button:hover { background-color: #f5f5f5; }
.social-button img { width: 20px; height: 20px; }

.auth-footer {
    margin-top: 30px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.status-box {
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: left;
}
.status-box p { margin: 5px 0; }
.status-box.success { background-color: #e8f5e9; color: #2e7d32; }
.status-box.warning { background-color: #fff8e1; color: #f57f17; }


/* --- Biometric Page Styles --- */
.container {
    width: 100%;
    max-width: 700px;
    padding: 30px 40px;
    background-color: var(--surface-color);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    text-align: center;
}
.main-header { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 20px; }
.main-logo { width: 80px; height: 80px; object-fit: contain; }
.main-header h1 { margin: 0; font-size: 2.2rem; font-weight: 700; color: var(--text-primary); }
.main-header p { margin: 5px 0 0 0; font-size: 1rem; color: var(--text-secondary); }

#video-container {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    border-radius: 12px;
    overflow: hidden;
    background-color: #000;
}
#webcam, #overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
#webcam { transform: scaleX(-1); }
#overlay { z-index: 10; }

#instruction-panel {
    font-size: 1.2rem;
    font-weight: 500;
    padding: 18px;
    margin: 20px 0;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    background-color: #f9f9f9;
}
#instruction-panel.recording-active {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 700;
    border-color: var(--primary-color);
    box-shadow: 0 0 12px rgba(218, 43, 38, 0.5);
}
.countdown-timer { display: block; font-size: 0.9rem; color: #888; margin-top: 8px; }
.recording-active .countdown-timer { color: #fff; opacity: 0.8; }

#controls { display: flex; flex-direction: column; gap: 15px; width: 100%; margin-top: 15px; }
#controls .input-group { width: 100%; }
.button-group { display: flex; gap: 15px; width: 100%; }
.button-group .button { flex-grow: 1; }
.hidden { display: none; }

#guide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
}
.guide-vignette {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse 65% 90% at 50% 50%, transparent 98%, rgba(255, 255, 255, 0.85) 100%);
}
.guide-border {
    width: 65%;
    height: 90%;
    border-radius: 50%;
    border: 4px dashed rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.guide-border.invalid { border-color: var(--error-color); }
.guide-border.valid { border-color: var(--success-color); }

/* --- Modal & Gaze Dot --- */
#result-modal { position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; }
#result-modal.modal-hidden { display: none; }
.modal-content { background-color: #fff; padding: 30px; border-radius: 12px; text-align: center; width: 90%; max-width: 400px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); }
#modal-title { margin-top: 0; font-size: 1.5rem; font-weight: 700; }
#modal-message { margin-bottom: 25px; line-height: 1.6; color: var(--text-secondary); }
#modal-title.success { color: var(--success-color); }
#modal-title.error { color: var(--error-color); }
#modal-close-button.button { width: auto; padding: 10px 30px; margin: 0 auto; }

.gaze-dot { position: absolute; width: 30px; height: 30px; background-color: var(--primary-color); border-radius: 50%; z-index: 20; box-shadow: 0 0 15px var(--primary-color); border: 2px solid #fff; }
.gaze-dot.top-left { top: 10%; left: 10%; } .gaze-dot.top-right { top: 10%; right: 10%; }
.gaze-dot.bottom-left { bottom: 10%; left: 10%; } .gaze-dot.bottom-right { bottom: 10%; right: 10%; }
/* --- Add these new styles to your existing style.css --- */

/* 1. Increase the width of the main card */
.auth-form-box {
    max-width: 450px; /* Increased from 400px */
}

/* 2. Style the password input container to hold the toggle button */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

/* 3. Style the password visibility toggle icon */
.password-toggle {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary);
}

/* 4. Style for Django's form error messages */
.form-errors {
    list-style-type: none;
    padding: 0;
    margin: 5px 0 10px 0;
    font-size: 0.9rem;
    color: var(--error-color);
}

/* 5. Styling for the live password validation rules */
#password-rules {
    list-style-type: none;
    padding: 0;
    margin: 15px 0;
    text-align: left;
    font-size: 0.9rem;
}

#password-rules li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    transition: color 0.3s ease;
    position: relative;
    padding-left: 25px;
}

/* Default state icon (cross) */
#password-rules li::before {
    content: '✗'; /* A cross mark */
    position: absolute;
    left: 0;
    color: var(--error-color);
    font-weight: bold;
    transition: color 0.3s ease;
}

/* Valid state icon (checkmark) */
#password-rules li.valid {
    color: #2e7d32; /* A dark green for better readability */
}

#password-rules li.valid::before {
    content: '✔'; /* A check mark */
    color: var(--success-color);
}

/* --- Add these NEW styles for the Profile Page --- */

/* Style for the secondary button (e.g., "Skip for Now") */
.button-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid #ddd;
    font-weight: 500;
}
.button-secondary:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

/* Main profile card content styling */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.profile-header h1 {
    margin: 0;
}

.profile-header p {
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Panel for the main action/status */
.action-panel {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.action-panel .panel-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}
.action-panel .panel-icon.success {
    color: var(--success-color);
}
.action-panel .panel-icon.warning {
    color: #f57f17; /* A nice amber color for warnings */
}

.action-panel h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.action-panel p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.benefits-list {
    list-style: none;
    padding: 0;
    text-align: left;
    margin: 20px 0;
}
.benefits-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}
.benefits-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.profile-footer {
    margin-top: 25px;
}
.profile-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}
.profile-footer a:hover {
    color: var(--primary-color);
}
/* Add this to the end of your style.css file */

#health-status-panel {
    display: none; /* Hidden by default */
    margin-top: -10px; /* Position it between the instruction panel and controls */
    margin-bottom: 15px;
    padding: 8px 15px;
    background-color: #fff3cd; /* A light yellow for warnings */
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    width: 80%;
    max-width: 640px;
    box-sizing: border-box;
}