/* Alternative Login Design - Split Screen Modern Layout */

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: #0a0e27;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Animated Background */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #ec4899);
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: -100px;
    animation-delay: -7s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: -75px;
    left: 30%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(20px) rotate(240deg); }
}

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-icons i {
    position: absolute;
    color: rgba(99, 102, 241, 0.1);
    font-size: 24px;
    animation: floatIcon 15s infinite linear;
}

.floating-icons i:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.floating-icons i:nth-child(2) { top: 60%; left: 80%; animation-delay: -5s; }
.floating-icons i:nth-child(3) { top: 80%; left: 20%; animation-delay: -10s; }
.floating-icons i:nth-child(4) { top: 30%; left: 70%; animation-delay: -15s; }

@keyframes floatIcon {
    0% { transform: translateY(0px) opacity(0.1); }
    50% { transform: translateY(-20px) opacity(0.2); }
    100% { transform: translateY(0px) opacity(0.1); }
}

/* Main Layout */
.login-section {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Left Side - Branding */
.login-branding {
    flex: 1;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.brand-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
}

.brand-logo {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.brand-logo i {
    font-size: 80px;
    color: #6366f1;
    position: relative;
    z-index: 3;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
}

.logo-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring {
    position: absolute;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-ring 3s infinite ease-in-out;
}

.ring-1 { width: 120px; height: 120px; animation-delay: 0s; }
.ring-2 { width: 160px; height: 160px; animation-delay: 1s; }
.ring-3 { width: 200px; height: 200px; animation-delay: 2s; }

@keyframes pulse-ring {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

.brand-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-content h2 {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 20px;
    opacity: 0.9;
    letter-spacing: 2px;
}

.brand-tagline {
    font-size: 16px;
    opacity: 0.7;
    margin-bottom: 40px;
    font-style: italic;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    max-width: 300px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    opacity: 0.8;
}

.feature-item i {
    color: #10b981;
    font-size: 16px;
}

/* Right Side - Login Form */
.login-container {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    position: relative;
    max-width: 500px;
}

.login-header {
    margin-bottom: 40px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.welcome-text {
    flex: 1;
    margin-right: 15px;
}

.language-selector-login {
    position: static;
    flex-shrink: 0;
}

.form-select {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Hide language text on all screen sizes - show only flags */
.language-selector-login .lang-text {
    display: none;
}

.welcome-text h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.welcome-text p {
    color: #64748b;
    font-size: 16px;
    font-weight: 400;
}

.login-body {
    flex: 1;
}

.form-group {
    margin-bottom: 30px;
    position: relative;
}

.form-label {
    display: block;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.input-icon i {
    color: #9ca3af;
    font-size: 18px;
    transition: all 0.3s ease;
}

.form-control {
    width: 100%;
    padding: 20px 20px 20px 60px;
    border: none;
    border-bottom: 2px solid #e5e7eb;
    background: transparent;
    font-size: 16px;
    color: #1f2937;
    transition: all 0.3s ease;
    position: relative;
}

.form-control::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.form-control:focus {
    outline: none;
    border-bottom-color: #6366f1;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
}

.input-group:focus-within .input-line {
    width: 100%;
}

.input-group:focus-within .input-icon i {
    color: #6366f1;
    transform: scale(1.1);
}

.btn-login {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-text {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

.btn-bg {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    transition: left 0.3s ease;
}

.btn-login:hover .btn-bg {
    left: 0;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}

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

.login-extras {
    text-align: center;
    margin-top: 30px;
}

.forgot-link {
    color: #6366f1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

.login-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6b7280;
}

.version-info, .security-badge {
    display: flex;
    align-items: center;
    gap: 6px;
}

.version-info i {
    color: #6366f1;
}

.security-badge i {
    color: #10b981;
}

.login-footer-second {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px 30px;
    z-index: 10;
}

.footer-grid {
    display: flex;
    gap: 30px;
    align-items: center;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.footer-item i {
    color: #6366f1;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-section {
        flex-direction: column;
    }

    .login-branding {
        min-height: 25vh;
        max-height: 30vh;
        padding: 40px 20px 20px 20px;
    }

    .feature-list {
        display: none;
    }

    .brand-content h1 {
        font-size: 36px;
    }

    .login-container {
        padding: 30px 40px;
        max-width: none;
        flex: 1;
        min-height: 70vh;
    }

    .footer-grid {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    body {
        min-height: 100vh;
        overflow-y: auto;
    }

    .login-section {
        min-height: 100vh;
        flex-direction: column;
    }

    .login-branding {
        min-height: 25vh;
        max-height: 30vh;
        padding: 30px 15px 20px 15px;
        flex-shrink: 0;
    }

    .brand-logo i {
        font-size: 50px;
    }

    .brand-content h1 {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .brand-content h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .brand-tagline {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .feature-list {
        display: none;
    }

    .login-container {
        padding: 25px 20px;
        flex: 1;
        min-height: 70vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .login-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 25px;
        gap: 10px;
    }

    .welcome-text {
        flex: 1;
        margin-right: 10px;
    }

    .welcome-text h2 {
        font-size: 22px;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .welcome-text p {
        font-size: 14px;
        line-height: 1.3;
    }

    .language-selector-login {
        position: static;
        margin-bottom: 0;
        text-align: right;
        flex-shrink: 0;
    }

    .form-select {
        padding: 8px 10px;
        font-size: 14px;
        min-width: 60px;
        background-size: 12px;
        padding-right: 28px;
        border-radius: 8px;
    }

    .form-select option {
        font-size: 16px;
        padding: 6px;
    }

    .login-body {
        flex: 1;
    }

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

    .form-control {
        padding: 18px 18px 18px 55px;
        font-size: 16px;
    }

    .btn-login {
        height: 55px;
        font-size: 16px;
        margin-top: 15px;
    }

    .login-extras {
        margin-top: 25px;
    }

    .login-footer {
        margin-top: 30px;
        padding-top: 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        text-align: center;
    }

    .login-footer-second {
        position: static;
        margin-top: 20px;
        transform: none;
        left: auto;
        bottom: auto;
    }
}

@media (max-width: 480px) {
    .login-branding {
        min-height: 22vh;
        max-height: 25vh;
        padding: 20px 15px 15px 15px;
    }

    .brand-logo i {
        font-size: 40px;
    }

    .brand-content h1 {
        font-size: 20px;
    }

    .brand-content h2 {
        font-size: 14px;
    }

    .login-container {
        padding: 20px 15px;
        min-height: 75vh;
    }

    .login-header {
        margin-bottom: 20px;
    }

    .welcome-text h2 {
        font-size: 20px;
    }

    .welcome-text p {
        font-size: 13px;
    }

    .form-select {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 50px;
        padding-right: 24px;
    }

    .form-control {
        padding: 16px 16px 16px 50px;
        font-size: 16px;
    }

    .input-icon {
        width: 45px;
        height: 55px;
    }

    .btn-login {
        height: 50px;
        font-size: 15px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
.form-control:focus,
.btn-login:focus,
.form-select:focus,
.forgot-link:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}


/* Role Selection Modal Styles - Compact Professional Design */
.role-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.role-selection-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUpScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.role-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

.role-modal-close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

.role-modal-close i {
    font-size: 16px;
    color: #64748b;
}

.role-modal-header {
    text-align: center;
    padding: 24px 32px 16px;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.role-modal-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.role-modal-icon i {
    font-size: 26px;
    color: white;
}

.role-modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.role-modal-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    font-weight: 400;
}

.role-modal-body {
    padding: 8px 32px 32px;
    background: #ffffff;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    border-radius: 0 0 16px 16px;
}

.role-card {
    background: #fafbfc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    min-height: 160px;
}

.role-card:hover {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.16);
    transform: translateY(-4px);
}

.role-icon {
    width: 52px;
    height: 52px;
    background: #e8eaf6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.role-card:hover .role-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
}

.role-icon i {
    font-size: 24px;
    color: #5a67d8;
    transition: all 0.3s ease;
}

.role-card:hover .role-icon i {
    color: white;
}

.role-info {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.role-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px 0;
    transition: color 0.3s ease;
}

.role-info p {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 12px 0;
    line-height: 1.5;
    transition: color 0.3s ease;
    min-height: 32px;
}

.role-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6366f1;
    transition: all 0.3s ease;
}

.role-card:hover .role-action {
    color: #4f46e5;
}

.role-action i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.role-card:hover .role-action i {
    transform: translateX(3px);
}

/* Loading State */
.role-card.loading {
    pointer-events: none;
    opacity: 0.6;
}

.role-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 10;
}

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

@keyframes slideUpScale {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* Scrollbar for modal body */
.role-modal-body::-webkit-scrollbar {
    width: 8px;
}

.role-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.role-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.role-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .role-selection-modal {
        max-width: 700px;
    }
    
    .role-modal-header {
        padding: 20px 28px 14px;
    }
    
    .role-modal-body {
        padding: 8px 28px 28px;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .role-selection-modal {
        max-width: 92%;
        max-height: 85vh;
        border-radius: 14px;
    }
    
    .role-modal-close {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
    }
    
    .role-modal-close i {
        font-size: 14px;
    }
    
    .role-modal-header {
        padding: 20px 24px 14px;
    }
    
    .role-modal-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
        border-radius: 10px;
    }
    
    .role-modal-icon i {
        font-size: 22px;
    }
    
    .role-modal-header h2 {
        font-size: 19px;
        margin-bottom: 5px;
    }
    
    .role-modal-header p {
        font-size: 13px;
    }
    
    .role-modal-body {
        padding: 8px 24px 24px;
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .role-card {
        padding: 20px 16px;
        min-height: 150px;
    }
    
    .role-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 10px;
    }
    
    .role-icon i {
        font-size: 22px;
    }
    
    .role-info h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .role-info p {
        font-size: 12px;
        margin-bottom: 10px;
        min-height: 30px;
    }
    
    .role-action {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .role-selection-modal {
        max-width: 96%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .role-modal-header {
        padding: 18px 20px 12px;
    }
    
    .role-modal-icon {
        width: 44px;
        height: 44px;
        border-radius: 8px;
    }
    
    .role-modal-icon i {
        font-size: 20px;
    }
    
    .role-modal-header h2 {
        font-size: 17px;
    }
    
    .role-modal-header p {
        font-size: 12px;
    }
    
    .role-modal-body {
        padding: 8px 20px 20px;
        gap: 10px;
    }
    
    .role-card {
        padding: 18px 14px;
        min-height: 140px;
    }
    
    .role-icon {
        width: 44px;
        height: 44px;
    }
    
    .role-icon i {
        font-size: 20px;
    }
    
    .role-info h3 {
        font-size: 13px;
    }
    
    .role-info p {
        font-size: 11px;
        min-height: 28px;
    }
}
