/* CSS Document */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --dark-color: #1a252f;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --sidebar-width: 450px;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(52, 152, 219, 0.1);
    animation: float 15s infinite linear;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    background: rgba(231, 76, 60, 0.05);
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    background: rgba(52, 152, 219, 0.05);
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 10%;
    background: rgba(46, 204, 113, 0.05);
    animation-delay: 10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 10%;
    background: rgba(155, 89, 182, 0.05);
    animation-delay: 7s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Main Container */
.login-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 700px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    position: relative;
}

/* Left Panel Styles */
.left-panel {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.left-panel::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" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
}

.brand-logo {
    margin-bottom: 40px;
    z-index: 1;
}

.logo-icon {
    font-size: 48px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.brand-logo h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.brand-logo h1 span {
    color: var(--secondary-color);
}

.tagline {
    color: #bdc3c7;
    font-size: 14px;
}

/* Illustration Styles */
.illustration {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 1;
}

.inventory-icons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 300px;
}

.icon-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.icon-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.icon-item i {
    font-size: 32px;
    color: var(--secondary-color);
    margin-bottom: 10px;
    display: block;
}

.icon-item span {
    font-size: 14px;
    font-weight: 500;
}

.stats-preview {
    display: flex;
    gap: 30px;
    width: 100%;
    max-width: 300px;
}

.stat {
    text-align: center;
    flex: 1;
}

.stat h3 {
    font-size: 28px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.stat p {
    font-size: 12px;
    color: #bdc3c7;
}

/* Features List */
.features {
    margin-top: 20px;
    z-index: 1;
}

.features h3 {
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.features h3 i {
    color: var(--success-color);
}

.features ul {
    list-style: none;
}

.features li {
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.features li i {
    color: var(--success-color);
    font-size: 12px;
}

/* Right Panel Styles */
.right-panel {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

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

.form-header h2 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.form-header p {
    color: var(--gray-color);
    font-size: 14px;
}

/* Form Styles */
.login-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label i {
    color: var(--secondary-color);
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    width: 100%;
    padding: 15px 45px 15px 45px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background: #f8f9fa;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

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

.toggle-password:hover {
    color: var(--secondary-color);
}

.error-message {
    color: var(--accent-color);
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
    display: none;
}

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

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--primary-color);
    position: relative;
    padding-left: 30px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 0;
    height: 20px;
    width: 20px;
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    transition: var(--transition);
}

.checkbox-container:hover .checkmark {
    border-color: var(--secondary-color);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, var(--secondary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

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

/* Divider */
.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: var(--gray-color);
    font-size: 12px;
    position: relative;
    z-index: 1;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
    z-index: 0;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.social-btn:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.social-btn.google i {
    color: #DB4437;
}

.social-btn.microsoft i {
    color: #00A4EF;
}

/* Register Link */
.register-link {
    text-align: center;
    margin-bottom: 30px;
}

.register-link p {
    color: var(--gray-color);
    font-size: 14px;
}

.register-link a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.register-link a:hover {
    text-decoration: underline;
}

/* Security Info */
.security-info {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.security-info p {
    color: var(--gray-color);
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.security-info i {
    color: var(--success-color);
}

/* Version Info */
.version-info {
    text-align: center;
    margin-top: auto;
    padding-top: 20px;
    color: var(--gray-color);
    font-size: 12px;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.loading-spinner p {
    color: var(--primary-color);
    font-size: 14px;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 1001;
    max-width: 350px;
}

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

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--accent-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

.toast i {
    font-size: 20px;
}

.toast.success i {
    color: var(--success-color);
}

.toast.error i {
    color: var(--accent-color);
}

.toast.warning i {
    color: var(--warning-color);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1002;
    backdrop-filter: blur(3px);
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #f8f9fa;
    color: var(--primary-color);
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e9ecef;
}

/* Responsive Design */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
        min-height: auto;
    }

    .left-panel {
        padding: 30px;
    }

    .right-panel {
        padding: 30px;
    }

    .inventory-icons {
        max-width: 250px;
        gap: 15px;
    }

    .icon-item {
        padding: 15px;
    }

    .stats-preview {
        max-width: 250px;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }

    .login-container {
        border-radius: 8px;
    }

    .left-panel, .right-panel {
        padding: 20px;
    }

    .brand-logo h1 {
        font-size: 24px;
    }

    .form-header h2 {
        font-size: 24px;
    }

    .social-login {
        flex-direction: column;
    }

    .modal {
        width: 95%;
    }
}

@media (max-height: 700px) and (min-width: 993px) {
    .login-container {
        min-height: 600px;
    }

    .left-panel, .right-panel {
        padding: 30px;
    }

    .illustration {
        gap: 20px;
    }

    .features {
        margin-top: 10px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}