/* ===================================
   User Registration Form Styles
   =================================== */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-active: #1e40af;
    --success-color: #16a34a;
    --success-bg: #dcfce7;
    --success-border: #86efac;
    --error-color: #dc2626;
    --error-bg: #fee2e2;
    --error-border: #fca5a5;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #d1d5db;
    --border-focus: #2563eb;
    --border-error: #dc2626;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 16px;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --line-height: 1.5;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Body and Container */
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--text-primary);
    background-color: var(--bg-gray);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.container {
    width: 100%;
    max-width: 500px;
    background-color: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Heading */
h1 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

/* Message Containers */
.message {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid;
    animation: slideIn 0.3s ease-out;
}

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

.success-message {
    background-color: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-color);
}

.success-message p {
    margin: 0;
    font-weight: 500;
}

.error-message {
    background-color: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-color);
}

.error-message p {
    margin: 0;
    font-weight: 500;
}

/* Form Styles */
#registration-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Form Group */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* Labels */
label {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.required {
    color: var(--error-color);
    font-weight: 700;
}

/* Input Fields */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    line-height: var(--line-height);
    color: var(--text-primary);
    background-color: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease-in-out;
    outline: none;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
input[type="password"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Input Focus State */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Input Error State */
input.error,
input[aria-invalid="true"] {
    border-color: var(--border-error);
    background-color: var(--error-bg);
}

input.error:focus,
input[aria-invalid="true"]:focus {
    border-color: var(--border-error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Field Error Messages */
.field-error {
    font-size: var(--font-size-sm);
    color: var(--error-color);
    font-weight: 500;
    min-height: 1.25rem;
    display: block;
}

.field-error:empty {
    display: none;
}

/* Field Hints */
.field-hint {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Form Actions */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-base);
    font-weight: 600;
    font-family: var(--font-family);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    outline: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    background-color: var(--primary-active);
    transform: translateY(0);
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.btn-primary:disabled {
    background-color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.loading-text {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Spinner Animation */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===================================
   Responsive Design - Mobile
   =================================== */

/* Small devices (phones, less than 640px) */
@media (max-width: 639px) {
    body {
        padding: var(--spacing-sm);
    }
    
    .container {
        padding: var(--spacing-lg);
        max-width: 100%;
    }
    
    h1 {
        font-size: 1.25rem;
        margin-bottom: var(--spacing-lg);
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: var(--font-size-base);
    }
}

/* Medium devices (tablets, 640px and up) */
@media (min-width: 640px) {
    .container {
        padding: var(--spacing-xl);
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    .container {
        max-width: 550px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
}

/* ===================================
   Accessibility Enhancements
   =================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"] {
        border-width: 3px;
    }
    
    .btn-primary {
        border: 2px solid var(--text-primary);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
input:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    body {
        background-color: white;
    }
    
    .container {
        box-shadow: none;
        max-width: 100%;
    }
    
    .loading-indicator,
    .btn {
        display: none;
    }
}

/* ===================================
   Login Page Specific Styles
   =================================== */

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 3rem; /* Make room for toggle button */
}

/* Password Toggle Button */
.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.2s ease-in-out;
    border-radius: var(--radius-sm);
}

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

.password-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Checkbox Group */
.checkbox-group {
    margin: var(--spacing-md) 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label span {
    flex: 1;
}

/* Form Links */
.form-links {
    margin-top: var(--spacing-lg);
    text-align: center;
}

.link-secondary {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color 0.2s ease-in-out;
}

.link-secondary:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.link-secondary:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Form Footer */
.form-footer {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.form-footer p {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    margin: 0;
}

.link-primary {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease-in-out;
}

.link-primary:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.link-primary:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Session Warning (for inactivity timeout) */
.session-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fef3c7;
    border-bottom: 3px solid #f59e0b;
    padding: var(--spacing-md);
    z-index: 1000;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.session-warning-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.session-warning-content p {
    margin: 0;
    color: #92400e;
    font-weight: 600;
    flex: 1;
}

.btn-secondary {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    font-family: var(--font-family);
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===================================
   Responsive Design - Login Page
   =================================== */

/* Small devices (phones, less than 640px) */
@media (max-width: 639px) {
    .session-warning-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .btn-secondary {
        width: 100%;
    }
    
    .password-toggle {
        right: 0.375rem;
    }
    
    .password-toggle svg {
        width: 18px;
        height: 18px;
    }
}

/* Medium devices (tablets, 640px and up) */
@media (min-width: 640px) and (max-width: 1023px) {
    .container {
        max-width: 480px;
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    .container {
        max-width: 500px;
    }
}

/* Extra large devices (large desktops, 1440px and up) */
@media (min-width: 1440px) {
    .container {
        max-width: 550px;
    }
}

/* Ultra-wide screens (2560px and up) */
@media (min-width: 2560px) {
    body {
        font-size: 18px;
    }
    
    .container {
        max-width: 600px;
    }
}

/* ===================================
   Accessibility - Login Page
   =================================== */

/* Ensure focus indicators are visible for password toggle */
.password-toggle:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Ensure checkbox has visible focus */
input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode - enhance visibility */
@media (prefers-contrast: high) {
    .password-toggle {
        border: 2px solid var(--text-secondary);
    }
    
    .link-secondary,
    .link-primary {
        text-decoration: underline;
    }
    
    .session-warning {
        border-bottom-width: 4px;
    }
}

/* Reduced motion - disable animations */
@media (prefers-reduced-motion: reduce) {
    .session-warning {
        animation: none;
    }
}

/* Print styles - hide interactive elements */
@media print {
    .password-toggle,
    .session-warning,
    .form-links,
    .form-footer {
        display: none;
    }
}

/* ===================================
   Profile Dashboard Styles
   =================================== */

/* Profile Page Body */
body.profile-page {
    display: block;
    padding: 0;
    background-color: var(--bg-gray);
    min-height: 100vh;
}

/* Navigation Bar */
.profile-nav {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Profile Container */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

/* Profile Content */
#profile-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

/* Profile Section */
.profile-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
}

.section-heading {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-lg) 0;
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.info-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: var(--font-size-base);
    color: var(--text-primary);
    word-break: break-word;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.status-unverified {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.action-buttons .btn {
    width: 100%;
}

/* ===================================
   Responsive Design - Profile Dashboard
   =================================== */

/* Small devices (phones, less than 640px) */
@media (max-width: 639px) {
    .nav-container {
        padding: var(--spacing-md);
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .nav-title {
        font-size: var(--font-size-lg);
    }
    
    .profile-container {
        padding: var(--spacing-md);
    }
    
    .profile-section {
        padding: var(--spacing-lg);
    }
    
    .info-grid {
        gap: var(--spacing-md);
    }
}

/* Medium devices (tablets, 640px and up) */
@media (min-width: 640px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        flex-direction: row;
    }
    
    .action-buttons .btn {
        width: auto;
        flex: 1;
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    .nav-container {
        padding: var(--spacing-lg) var(--spacing-xl);
    }
    
    .profile-container {
        padding: var(--spacing-xl);
    }
    
    #profile-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
    }
    
    .profile-section:first-child {
        grid-column: 1 / -1;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
}

/* Extra large devices (large desktops, 1440px and up) */
@media (min-width: 1440px) {
    .profile-container {
        max-width: 1400px;
    }
}

/* Ultra-wide screens (2560px and up) */
@media (min-width: 2560px) {
    .profile-container {
        max-width: 1600px;
    }
    
    .nav-title {
        font-size: 2rem;
    }
    
    .section-heading {
        font-size: 1.5rem;
    }
}

/* ===================================
   Accessibility - Profile Dashboard
   =================================== */

/* Focus indicators for navigation */
.profile-nav button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .profile-section {
        border: 2px solid var(--border-color);
    }
    
    .status-badge {
        border-width: 2px;
    }
    
    .section-heading {
        border-bottom-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .profile-nav {
        transition: none;
    }
}

/* Print styles */
@media print {
    body.profile-page {
        background-color: white;
    }
    
    .profile-nav {
        position: static;
        box-shadow: none;
        border-bottom: 2px solid black;
    }
    
    .nav-container button {
        display: none;
    }
    
    .profile-section {
        box-shadow: none;
        border: 1px solid black;
        page-break-inside: avoid;
    }
    
    .action-buttons {
        display: none;
    }
    
    #loading-indicator,
    #success-message,
    #error-message {
        display: none !important;
    }
}

/* ===================================
   Profile Edit Form Styles
   =================================== */

.edit-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.required {
    color: var(--error-color);
    font-weight: bold;
}

.form-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: var(--bg-white);
    color: var(--text-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-input:read-only {
    background-color: var(--bg-light);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.form-input.error {
    border-color: var(--error-color);
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-text {
    display: block;
    margin-top: var(--spacing-xs);
    color: var(--error-color);
    font-size: 0.875rem;
    min-height: 1.25rem;
}

.help-text {
    display: block;
    margin-top: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    flex-wrap: wrap;
}

.form-actions .btn {
    flex: 1;
    min-width: 150px;
}

/* ===================================
   Modal/Dialog Styles
   =================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-md);
}

.modal-content {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
}

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

.modal-title {
    margin: 0 0 var(--spacing-md) 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-message {
    margin: 0 0 var(--spacing-xl) 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal-actions .btn {
    min-width: 120px;
}

/* ===================================
   Responsive Styles for Edit Form
   =================================== */

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .modal-actions {
        flex-direction: column-reverse;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* ===================================
   Reduced Motion for Modal
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .modal-content {
        animation: none;
    }
}

/* ===================================
   High Contrast Mode for Forms
   =================================== */

@media (prefers-contrast: high) {
    .form-input {
        border-width: 2px;
    }
    
    .form-input:focus {
        border-width: 3px;
    }
    
    .modal-content {
        border: 2px solid var(--border-color);
    }
}

/* ===================================
   Password Strength Indicator Styles
   =================================== */

.password-strength-indicator {
    margin-top: var(--spacing-sm);
}

.strength-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--spacing-xs);
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: var(--radius-md);
}

.strength-fill.weak {
    width: 33%;
    background-color: var(--error-color);
}

.strength-fill.medium {
    width: 66%;
    background-color: #f59e0b;
}

.strength-fill.strong {
    width: 100%;
    background-color: var(--success-color);
}

.strength-text {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.strength-text.weak {
    color: var(--error-color);
}

.strength-text.medium {
    color: #f59e0b;
}

.strength-text.strong {
    color: var(--success-color);
}

/* ===================================
   Reduced Motion for Password Strength
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .strength-fill {
        transition: none;
    }
}

/* ===================================
   Forgot Password Page Styles
   =================================== */

/* Form Description Text */
.form-description {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

/* Link Button (for resend code) */
.link-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    cursor: pointer;
    padding: 0;
    font-family: var(--font-family);
    transition: color 0.2s ease-in-out;
}

.link-button:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.link-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.link-button:disabled {
    color: var(--text-secondary);
    opacity: 0.5;
    cursor: not-allowed;
}

/* Two-Step Form Flow */
#request-code-form,
#reset-password-form {
    animation: fadeIn 0.3s ease-in;
}

/* Form Transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Verification Code Input Styling */
#verification-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.25rem;
    letter-spacing: 0.5em;
    text-align: center;
    font-weight: 600;
}

/* ===================================
   Responsive Design - Forgot Password
   =================================== */

/* Small devices (phones, less than 640px) */
@media (max-width: 639px) {
    .form-description {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-md);
    }
    
    #verification-code {
        font-size: 1rem;
        letter-spacing: 0.3em;
    }
}

/* Medium devices (tablets, 640px and up) */
@media (min-width: 640px) and (max-width: 1023px) {
    .container {
        max-width: 480px;
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    .container {
        max-width: 500px;
    }
}

/* ===================================
   Accessibility - Forgot Password
   =================================== */

/* Focus indicators for link buttons */
.link-button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .link-button {
        text-decoration: underline;
    }
    
    #verification-code {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #request-code-form,
    #reset-password-form {
        animation: none;
    }
}

/* Print styles */
@media print {
    .link-button,
    .form-links {
        display: none;
    }
}

/* ===================================
   Accessibility - Comprehensive Focus Indicators
   Requirements: 12.6 - All focusable elements have visible focus indicators
   =================================== */

/* Ensure all interactive elements have consistent focus indicators */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Enhanced focus for form inputs */
input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
input[type="tel"]:focus-visible,
input[type="password"]:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-color: var(--primary-color);
}

/* Focus for checkboxes and radio buttons */
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Focus for buttons */
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Focus for links */
a:focus-visible,
.link-primary:focus-visible,
.link-secondary:focus-visible,
.link-button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Focus for password toggle button */
.password-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Focus for modal elements */
.modal button:focus-visible,
.modal input:focus-visible,
.modal textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Ensure focus is visible even with custom styles */
*:focus-visible {
    outline-width: 2px;
    outline-style: solid;
    outline-color: var(--primary-color);
}

/* High contrast mode - enhance focus visibility */
@media (prefers-contrast: high) {
    *:focus-visible {
        outline-width: 3px;
        outline-color: currentColor;
    }
}

/* Ensure focus indicators are not hidden */
*:focus {
    outline: none; /* Remove default */
}

*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content link (for screen readers and keyboard users) */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Navigation Menu Styles */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #f0f0f0;
}

.nav-link.active {
    background-color: #2563eb;
    color: white;
}

.profile-nav {
    background: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}
