/**
 * Aurora Digital Solutions - Authentication Styles
 */

/* Login Page Layout */
.login-page {
    background: linear-gradient(135deg, var(--aurora-navy) 0%, var(--aurora-blue) 50%, var(--aurora-bright-blue) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo {
    height: 80px;
    margin-bottom: 20px;
}

.login-header h1 {
    color: var(--aurora-navy);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

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

.login-form label {
    display: block;
    font-weight: 500;
    color: var(--aurora-navy);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.login-form input:focus {
    outline: none;
    border-color: var(--aurora-bright-blue);
    box-shadow: 0 0 0 4px rgba(15, 158, 213, 0.15);
}

.login-form input::placeholder {
    color: var(--text-light);
}

/* Button Styles */
.btn-block {
    width: 100%;
    padding: 14px 20px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.btn-text,
.btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loading-spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Error Message */
.error-message {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 15px;
    text-align: center;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 25px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* Success Message */
.success-message {
    background-color: rgba(25, 107, 36, 0.1);
    border: 1px solid rgba(25, 107, 36, 0.3);
    color: var(--aurora-green);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 15px;
    text-align: center;
}

/* User Menu in Header */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 0.95rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--aurora-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 500;
}

.user-role {
    font-size: 0.8rem;
    opacity: 0.8;
}

.btn-logout {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Admin Badge */
.admin-badge {
    background-color: var(--aurora-orange);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 25px;
    }
    
    .login-header h1 {
        font-size: 1.4rem;
    }
    
    .login-logo {
        height: 60px;
    }
}

/* Modal Styles for Password Display */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    color: var(--aurora-navy);
    font-size: 1.3rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.password-display {
    background-color: var(--aurora-gray);
    padding: 15px 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    margin-bottom: 20px;
    word-break: break-all;
    text-align: center;
}

.copy-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--aurora-bright-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.copy-btn:hover {
    background-color: var(--aurora-blue);
}

.copy-btn.copied {
    background-color: var(--aurora-green);
}

.modal-warning {
    background-color: rgba(233, 113, 50, 0.1);
    border-left: 4px solid var(--aurora-orange);
    padding: 12px 15px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Form Styles for Admin */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--aurora-navy);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--aurora-bright-blue);
    box-shadow: 0 0 0 3px rgba(15, 158, 213, 0.15);
}

.form-group .help-text {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--aurora-green);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Action Buttons in Table */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-icon.btn-edit {
    background-color: var(--aurora-bright-blue);
    color: white;
}

.btn-icon.btn-edit:hover {
    background-color: var(--aurora-blue);
}

.btn-icon.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-icon.btn-delete:hover {
    background-color: #c82333;
}

.btn-icon.btn-reset {
    background-color: var(--aurora-orange);
    color: white;
}

.btn-icon.btn-reset:hover {
    background-color: #d96229;
}
