:root {
    --primary: #6C63FF;
    --primary-dark: #554FD8;
    --secondary: #FF6584;
    --success: #36D399;
    --warning: #FFB347;
    --danger: #FF6B6B;
    --dark: #1A1A2E;
    --light: #F8F9FF;
    --private-gradient: linear-gradient(135deg, #6C63FF 0%, #FF6584 100%);
    --public-gradient: linear-gradient(135deg, #6C63FF 0%, #FF6584 100%);
    --shadow: 0 20px 40px rgba(108, 99, 255, 0.15);
    --shadow-lg: 0 30px 60px rgba(108, 99, 255, 0.25);
    --radius: 20px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--light) 0%, rgba(108, 99, 255, 0.1) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

/* Main Container */
.login-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

/* Toggle Slider for Voter/Join Public */
.access-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.access-toggle {
    background: white;
    border-radius: 50px;
    padding: 8px;
    box-shadow: var(--shadow);
    display: inline-flex;
    position: relative;
    width: 450px;
}

.toggle-option {
    flex: 1;
    padding: 12px 24px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    border-radius: 40px;
    transition: var(--transition);
    z-index: 2;
    position: relative;
    color: #666;
}

.toggle-option.active {
    color: white;
}

.toggle-slider {
    position: absolute;
    top: 8px;
    bottom: 8px;
    width: calc(50% - 8px);
    background: var(--private-gradient);
    border-radius: 40px;
    transition: var(--transition);
    z-index: 1;
}

.toggle-slider.join-public {
    transform: translateX(calc(100% + 8px));
}

/* Main Container */
.login-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    min-height: 700px;
}

/* Left Side - Description */
.description-side {
    flex: 1;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), rgba(255, 101, 132, 0.05));
}

.description-content {
    position: relative;
    z-index: 2;
}

.description-icon {
    font-size: 4rem;
    margin-bottom: 25px;
    display: inline-block;
    color: var(--primary);
}

.description-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    line-height: 1.2;
    background: var(--private-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.description-text {
    color: #555;
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
}

.feature-text {
    flex: 1;
    font-weight: 500;
}

.feature-text small {
    display: block;
    color: #888;
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: 3px;
}

/* Decorative Elements */
.description-bg-pattern {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.1;
    pointer-events: none;
    background: radial-gradient(circle at 20% 50%, var(--primary) 0%, transparent 50%);
}

/* Right Side - Form */
.form-side {
    flex: 1;
    padding: 50px 40px;
    background: white;
    position: relative;
    max-height: 700px;
    overflow-y: auto;
}

.form-side::-webkit-scrollbar {
    width: 8px;
}

.form-side::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.form-side::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.form-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--private-gradient);
    transition: var(--transition);
}

.form-header {
    margin-bottom: 30px;
    text-align: center;
}

.form-header .logo {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 900;
    transition: var(--transition);
    display: inline-block;
}

.form-header .logo i {
    color: var(--primary);
    margin-right: 5px;
}

/* Optional: Keep gradient effect on hover */
.form-header .logo:hover {
    background: var(--private-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-2px);
}

.form-header h2 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 5px;
}

.form-header p {
    color: #666;
    font-size: 0.95rem;
}

/* Form Elements */
.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 1rem;
}

.input-group {
    margin-bottom: 20px;
    transition: var(--transition);
}

.input-group:focus-within {
    transform: translateY(-2px);
}

.form-control {
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.2);
}

.input-group-text {
    background: var(--private-gradient);
    color: white;
    border: none;
    border-radius: 12px 0 0 12px;
    padding: 0 20px;
    min-width: 55px;
    justify-content: center;
    transition: var(--transition);
}

/* Buttons */
.btn-action {
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
    width: 100%;
    color: white;
    margin-top: 10px;
    background: var(--private-gradient);
}

.btn-action:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* Election Code Input */
.election-code-input {
    font-size: 1.2rem !important;
    letter-spacing: 3px;
    text-align: center;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
}

.election-code-input.valid {
    border-color: #28a745 !important;
    background-color: rgba(40, 167, 69, 0.05);
}

.election-code-input.invalid {
    border-color: #FF6584 !important;
    background-color: rgba(255, 101, 132, 0.05);
}

/* Quick Code Entry */
.quick-code-entry {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.quick-code-btn {
    flex: 1;
    padding: 10px;
    background: rgba(108, 99, 255, 0.08);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 0.9rem;
}

.quick-code-btn:hover {
    background: rgba(108, 99, 255, 0.15);
    transform: translateY(-2px);
}

/* Info Panel */
.info-panel {
    background: rgba(108, 99, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid var(--primary);
}

.info-panel i {
    color: var(--primary);
    margin-right: 10px;
}

.info-panel p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* Checkbox and Links */
.form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border: 2px solid #e0e0e0;
    transition: var(--transition);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.forgot-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.forgot-link:hover {
    color: var(--secondary);
    transform: translateX(3px);
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 10px;
}

.status-pending {
    background: rgba(255, 179, 71, 0.1);
    color: var(--warning);
}

.status-valid {
    background: rgba(54, 211, 153, 0.1);
    color: var(--success);
}

/* Verification Modal */
.verification-modal .modal-content {
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow-lg);
}

.verification-modal .modal-header {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), rgba(255, 101, 132, 0.05));
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
}

.verification-code {
    font-family: monospace;
    font-size: 1.8rem;
    letter-spacing: 5px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid var(--primary);
    margin: 20px 0;
    font-weight: bold;
    color: var(--dark);
}

/* Success Animation */
@keyframes successPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.success-pulse {
    animation: successPulse 0.5s ease-in-out 3;
}

/* Back Home Link */
.back-home {
    text-align: center;
    margin-top: 20px;
}

.back-home a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.back-home a:hover {
    color: var(--secondary);
    transform: translateX(-5px);
}

/* Responsive */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        min-height: auto;
    }

    .description-side {
        padding: 40px 30px;
    }

    .form-side {
        padding: 40px 30px;
        max-height: none;
    }

    .access-toggle {
        width: 400px;
    }
}

@media (max-width: 768px) {
    .login-container {
        margin: 20px;
    }

    .access-toggle {
        width: 350px;
    }

    .toggle-option {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .description-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }

    .access-toggle {
        width: 100%;
    }

    .toggle-option {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    .description-side {
        padding: 30px 20px;
    }

    .form-side {
        padding: 30px 20px;
    }

    .description-title {
        font-size: 1.6rem;
    }

    .description-text {
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .login-container {
        margin: 5px;
    }
}



/* Additional styles for the combined login/register page */

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 0;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
}

.toast-notification.hide {
    animation: slideOutRight 0.3s ease-out forwards;
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 15px 20px;
}

.toast-icon {
    font-size: 24px;
    margin-right: 15px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0 5px;
}

.toast-close:hover {
    color: #333;
}

.toast-progress {
    height: 3px;
    background: #f0f0f0;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    animation: progress 5s linear;
}

.toast-success .toast-progress-bar {
    background: #28a745;
}

.toast-error .toast-progress-bar {
    background: #dc3545;
}

.toast-warning .toast-progress-bar {
    background: #ffc107;
}

.toast-info .toast-progress-bar {
    background: #17a2b8;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 48px;
    color: #6C63FF;
    margin-bottom: 15px;
}

.loading-spinner p {
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

/* Election code validation */
.election-code-input.valid {
    border-color: #28a745 !important;
    background-color: rgba(40, 167, 69, 0.05);
}

.election-code-input.invalid {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.05);
}

/* Quick code buttons */
.quick-code-entry {
    margin-top: 15px;
    text-align: center;
}

.quick-code-btn {
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.3);
    color: #6C63FF;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 0 5px;
    transition: all 0.3s;
}

.quick-code-btn:hover {
    background: rgba(108, 99, 255, 0.2);
    border-color: #6C63FF;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-valid {
    background: #d4edda;
    color: #155724;
}

/* Info panel */
.info-panel {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-panel i {
    font-size: 20px;
    color: #6C63FF;
}

.info-panel p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Action button */
.btn-action {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-action:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Verification modal */
.verification-modal .modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.verification-modal .modal-header {
    background: #6C63FF;
    color: white;
    border-bottom: none;
}

.verification-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.verification-modal .modal-body {
    padding: 30px;
}

.verification-modal .modal-body i.fa-paper-plane {
    color: #6C63FF;
}

/* Success modal */
#joinSuccessModal .modal-content {
    border-radius: 15px;
}

#joinSuccessModal i.fa-check-circle {
    color: #28a745;
}

/* Forgot password link */
.forgot-link {
    color: #6C63FF;
    text-decoration: none;
    font-size: 14px;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Toggle slider animation */
.toggle-slider.join-public {
    transform: translateX(100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .toast-notification {
        min-width: 250px;
        max-width: 300px;
        top: 10px;
        right: 10px;
    }
    
    .quick-code-btn {
        display: inline-block;
        margin: 5px;
    }
}