/* Authentication Pages Shared Styles */
body.auth-page {
    margin: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('/images/login-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    gap: 20px;
}

body.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
}

.security-notice {
    background: white;
    border: 1px solid #d1d5db;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    text-align: center;
    max-width: 450px;
    width: 100%;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.security-notice strong {
    color: #374151;
    font-weight: 600;
}

.auth-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
    animation: slideIn 0.5s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    background: linear-gradient(135deg, #264461 0%, #1a3347 100%);
    color: white;
    padding: 25px 30px;
    text-align: center;
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}

.header-logo {
    width: 70px;
    height: 60px;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    background: white;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.auth-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.auth-header p {
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.6;
}

.auth-form {
    padding: 40px 35px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #264461;
    font-weight: 600;
    font-size: 14px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f9fafb;
}

/* Password input wrapper for toggle button */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper input {
    padding-right: 50px;
    position: relative;
    z-index: 1;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: color 0.2s;
    border-radius: 6px;
    z-index: 2;
    pointer-events: auto;
}

.password-toggle:hover {
    color: #1a2f42;
    background: rgba(38, 68, 97, 0.1);
}

.password-toggle:focus {
    outline: 2px solid #264461;
    outline-offset: 2px;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #264461;
    background: white;
    box-shadow: 0 0 0 3px rgba(38, 68, 97, 0.1);
}

.code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.code-input:focus {
    outline: none;
    border-color: #264461;
    background: white;
    box-shadow: 0 0 0 3px rgba(38, 68, 97, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #264461 0%, #1a3347 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(38, 68, 97, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: white;
    color: #264461;
    border: 2px solid #264461;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-secondary:hover:not(:disabled) {
    background: #f9fafb;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #264461;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.auth-links a:hover {
    color: #1a3347;
    text-decoration: underline;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #c33;
    display: none;
}

.error-message:empty {
    display: none !important;
    padding: 0;
    margin: 0;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #2e7d32;
    display: none;
}

.success-message:empty {
    display: none !important;
    padding: 0;
    margin: 0;
}

.info-message {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #0d47a1;
}

.timer {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

/* User Invitation Styles */
.invitation-info {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #264461;
}

.invitation-info .info-item {
    margin: 8px 0;
    font-size: 14px;
    color: #333;
}

.invitation-info .info-item strong {
    color: #264461;
    font-weight: 600;
}

/* Password Requirements Dynamic Validation */
.password-requirements ul {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
}

.password-requirements li {
    padding: 4px 0;
    transition: color 0.3s ease;
}

.password-requirements .req-icon {
    display: inline-block;
    width: 20px;
    font-weight: bold;
    margin-right: 8px;
    transition: color 0.3s ease;
}

.role-badge {
    background: #264461;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
    display: inline-block;
    margin-left: 5px;
}
