/* login.css */

:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --gray-color: #6b7280;
    --border-color: #d1d5db;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

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

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--dark-color);
    line-height: 1.6;
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    background-color: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 650px;
    max-height: 90vh;
    position: relative;
}

/* Hide scrollbar for all browsers */
.login-container {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.login-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.login-left-content {
    max-width: 420px;
    overflow: hidden;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    justify-content: center;
}

.logo-img {
    background-color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 10px;
}

.logo-img img {
    width: 100%;
    height: 70px;
    object-fit: contain;
}

.tagline {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.description {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.feature-list {
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.feature-icon {
    width: 24px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    margin-top: 4px;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    opacity: 0.9;
}

.copyright {
    font-size: 14px;
    opacity: 0.7;
    margin-top: 40px;
}

.login-right {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

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

.login-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-subtitle {
    color: var(--gray-color);
    font-size: 16px;
}

.login-form {
    width: 100%;
}

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

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

.form-label span {
    color: #ef4444;
}

.input-container {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 50px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    transition: var(--transition);
    font-weight: 500;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    font-size: 18px;
    z-index: 2;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    cursor: pointer;
    font-size: 18px;
    background: none;
    border: none;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.password-toggle:hover {
    background-color: #f5f5f5;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.submit-btn:hover {
    background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
    box-shadow: 0 6px 15px rgba(30, 64, 175, 0.2);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 350px;
}

.toast {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 100%;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    background-color: #d1fae5;
    color: var(--secondary-color);
}

.toast.error .toast-icon {
    background-color: #fee2e2;
    color: #ef4444;
}

.toast.warning .toast-icon {
    background-color: #fef3c7;
    color: var(--accent-color);
}

.toast.info .toast-icon {
    background-color: #dbeafe;
    color: var(--primary-color);
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    color: var(--gray-color);
    word-wrap: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
    flex-shrink: 0;
}

.toast-close:hover {
    background-color: #f5f5f5;
}

/* Error message styling */
.error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 6px;
    display: none;
}

/* Mobile Logo */
.mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

.mobile-logo-img {
    background-color: white;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    overflow: hidden;
    padding: 10px;
}

.mobile-logo-img img {
    width: 100%;
    height: 70px;
    object-fit: contain;
}

/* Responsive */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
        min-height: auto;
        background-color: transparent;
        box-shadow: none;
        border-radius: 0;
        max-height: 100vh;
        width: 100%;
        height: 100%;
    }

    .login-left {
        display: none;
    }

    .login-right {
        padding: 30px;
        width: 100%;
        height: 100%;
        background-color: white;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        margin-top: 0;
        overflow-y: auto;
        justify-content: center;
    }

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

    .login-title {
        font-size: 28px;
    }

    .login-subtitle {
        font-size: 15px;
    }

    .mobile-logo {
        display: block;
    }

    /* Hide scrollbar for login-right on mobile */
    .login-right {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .login-right::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        background: white;
        padding: 0;
        display: flex;
        overflow: hidden;
    }

    .login-container {
        max-width: 100%;
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .login-right {
        padding: 30px 25px;
        border-radius: 0;
        box-shadow: none;
        justify-content: center;
        margin-top: 0;
        height: 100vh;
    }

    .mobile-logo {
        margin-bottom: 40px;
    }

    .login-title {
        font-size: 28px;
        text-align: center;
    }

    .login-subtitle {
        text-align: center;
        font-size: 16px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .login-right {
        padding: 25px 20px;
        justify-content: flex-start;
        padding-top: 60px;
    }

    .mobile-logo {
        margin-bottom: 30px;
        padding-top: 10px;
    }

    .login-title {
        font-size: 26px;
    }

    .login-subtitle {
        font-size: 15px;
    }

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

    .input-icon {
        font-size: 18px;
        left: 16px;
    }

    .password-toggle {
        font-size: 18px;
        right: 16px;
    }

    .submit-btn {
        padding: 16px;
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .login-right {
        padding: 20px 15px;
        padding-top: 50px;
    }

    .login-title {
        font-size: 24px;
    }

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

/* Tab design improvements */
@media (min-width: 768px) and (max-width: 1024px) {
    .login-container {
        max-width: 90%;
        min-height: 600px;
        max-height: 85vh;
    }

    .login-left {
        padding: 40px 30px;
    }

    .login-right {
        padding: 50px 40px;
    }

    .tagline {
        font-size: 28px;
    }

    .description {
        font-size: 15px;
    }

    .login-title {
        font-size: 28px;
    }

    .login-subtitle {
        font-size: 15px;
    }
}

/* For very small height screens */
@media (max-height: 700px) {
    .login-container {
        max-height: 95vh;
        min-height: auto;
    }

    .login-right {
        padding-top: 30px;
        padding-bottom: 30px;
        justify-content: flex-start;
    }

    .mobile-logo {
        margin-bottom: 20px;
    }

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

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

@media (max-height: 600px) {
    .login-right {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .mobile-logo {
        display: none;
    }

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

    .login-title {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .login-subtitle {
        font-size: 14px;
        margin-bottom: 5px;
    }
}

/* Focus styles for better tab navigation */
.form-input:focus-visible,
.submit-btn:focus-visible,
.password-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Prevent text size adjustment on mobile */
html {
    -webkit-text-size-adjust: 100%;
}
