/* public/css/login.css */
:root {
    --primary-color: #6a11cb;
    --secondary-color: #fdb200;
    --accent-color: #2575fc;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
    --error-color: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    color: #333;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.hidden {
    display: none !important;
}

.login-container {
    max-width: 450px;
    width: 100%;
    background: #ffffff;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

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

.login-header h2 {
    color: var(--primary-color);
    font-size: 32px;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.login-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.login-header p {
    color: #666;
    font-size: 15px;
}

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

.phone-label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 15px;
}

input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

.btn {
    background-color: var(--primary-color);
    color: white;
    padding: 14px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    background-color: #5a0db3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 17, 203, 0.3);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-secondary:hover {
    background-color: #e6a000;
}

/* OTP Section Styling */
.otp-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.otp-input {
    width: 50px !important;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
}

.otp-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

/* Error/Success messages */
.error-message, .success-message {
    margin-top: 5px;
    font-size: 13px;
    display: flex;
    align-items: center;
}

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

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

.error-message svg,
.success-message svg {
    margin-right: 5px;
    flex-shrink: 0;
}

/* Loading overlay */
.loading {
    display: none; /* Changed from display:none; to a class */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading.visible {
    display: flex;
}


.spinner {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: white;
    font-size: 18px;
    margin-top: 15px;
}

/* Verification Dialog */
.verification-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.verification-dialog.visible {
    display: flex;
}

.dialog-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 300px;
    width: 100%;
}

.dialog-content img {
    height: 100px;
    width: 100px;
    margin-bottom: 20px;
}

.dialog-content p {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .login-container {
        padding: 30px 20px;
    }

    .login-header h2 {
        font-size: 26px;
    }
}

/* Role Selection Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1000;
}

.dialog-content {
    position: relative;
    z-index: 1002;
    /* rest of your existing dialog-content styles */
}

/* Button Loading Animation */
.btn-loading {
    position: relative;
    overflow: hidden;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    animation: fillAnimation 5s linear forwards;
}

@keyframes fillAnimation {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Toggle Switch CSS */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

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

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

input:checked+.slider {
    background-color: var(--success-color);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 14px;
    color: #666;
    margin-right: 10px;
}