/* Auth System Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    margin-bottom: 20px;
}

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

.login-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.login-header p {
    color: #999;
    font-size: 14px;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.error,
.form-group select.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-group.checkbox {
    display: flex;
    align-items: center;
}

.form-group.checkbox input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
}

.form-group.checkbox label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 400;
}

.form-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-error.show {
    display: block;
}

.password-strength {
    display: none;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 10px;
}

.password-strength.show {
    display: block;
}

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

.strength-bar-fill {
    height: 100%;
    width: 0;
    background: #dc3545;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-bar-fill.strength-fair {
    width: 33%;
    background: #ffc107;
}

.strength-bar-fill.strength-good {
    width: 66%;
    background: #17a2b8;
}

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

.strength-list {
    font-size: 12px;
    list-style: none;
}

.strength-list li {
    padding: 4px 0;
    color: #666;
}

.strength-list li.success {
    color: #28a745;
}

.strength-list li:before {
    content: "✗ ";
    margin-right: 4px;
    color: #dc3545;
}

.strength-list li.success:before {
    content: "✓ ";
    color: #28a745;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover:not(:disabled) {
    background: #e8e8e8;
}

.btn-link {
    background: none;
    color: #667eea;
    border: none;
    padding: 0;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}

.btn-link:hover {
    color: #764ba2;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    position: relative;
}

.btn-loading:disabled {
    color: transparent;
}

.btn-loading:disabled:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.6s linear infinite;
}

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

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.alert.show {
    display: block;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-close {
    float: right;
    font-size: 18px;
    line-height: 1;
    color: inherit;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.auth-footer {
    text-align: center;
    color: white;
    font-size: 14px;
}

.auth-footer a {
    color: white;
    text-decoration: underline;
    cursor: pointer;
}

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

.pin-input-group {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.pin-input {
    width: 50px;
    height: 50px;
    font-size: 24px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pin-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pin-input.error {
    border-color: #dc3545;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.6s linear infinite;
}

/* Tab styles */
.tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.tab-button {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #999;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

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

.tab-button:hover {
    color: #333;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Responsive */
@media (max-width: 600px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
