/* Authentication Page Styles */

.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    padding: 40px;
    animation: slideUp 0.5s ease-out;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #333;
    font-size: 2em;
    margin-bottom: 10px;
}

.auth-header .subtitle {
    color: #666;
    font-size: 0.95em;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-tab:hover {
    color: #667eea;
}

.auth-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Auth Form Container */
.auth-form-container {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.auth-form-container.active {
    display: block;
}

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

.auth-form-container h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 0.9em;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

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

.password-input-wrapper input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.password-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.password-toggle:active {
    background-color: rgba(0, 0, 0, 0.1);
}

.eye-icon {
    font-size: 1.2em;
    user-select: none;
}

.form-hint {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.85em;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-bar-fill.weak {
    background: #dc3545;
}

.strength-bar-fill.medium {
    background: #ffc107;
}

.strength-bar-fill.good {
    background: #28a745;
}

.strength-bar-fill.strong {
    background: #28a745;
}

.strength-text {
    font-size: 0.85em;
    color: #666;
}

/* Form Actions */
.form-actions {
    margin-top: 25px;
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 1em;
    font-weight: 600;
}

.btn-loading {
    display: inline-block;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.9em;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.alert-success {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

/* Auth Footer */
.auth-footer {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.auth-footer p {
    color: #666;
    font-size: 0.9em;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Back Link */
.auth-back-link {
    text-align: center;
    margin-top: 20px;
}

.auth-back-link a {
    color: white;
    text-decoration: none;
    font-size: 0.9em;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.auth-back-link a:hover {
    opacity: 1;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.badge-admin {
    background: #dc3545;
    color: white;
}

.badge-user {
    background: #28a745;
    color: white;
}

.badge-readonly {
    background: #6c757d;
    color: white;
}

/* User Info in Header */
.user-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-weight: 500;
    color: #333;
}

/* Responsive Design */
@media (max-width: 600px) {
    .auth-container {
        padding: 30px 20px;
    }

    .auth-header h1 {
        font-size: 1.5em;
    }

    .form-group input {
        padding: 10px 12px;
    }
}
