/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: #0a0a0a;
    display: flex;
    opacity: 0;
    transition: opacity 0.2s ease;
}

body.page-loaded {
    opacity: 1;
}

/* Login Panel */
.login-panel {
    width: 100%;
    min-height: 100vh;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
}

.login-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 380px;
}

/* Logo */
.logo {
    margin-bottom: 40px;
    text-align: center;
}

.logo img {
    height: 42px;
    width: auto;
}

/* Alert */
.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    to { opacity: 1; transform: translateY(0); }
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    margin-bottom: 10px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #444;
    pointer-events: none;
    transition: color 0.2s;
}

.form-input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 50px;
    font-size: 14px;
    font-family: inherit;
    color: #fff;
    background: #141414;
    border: 1px solid #222;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s;
}

.form-input::placeholder {
    color: #444;
}

.form-input:hover {
    border-color: #333;
}

.form-input:focus {
    border-color: #444;
    background: #181818;
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: #888;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #444;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #888;
}

/* Remember */
.form-options {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input {
    display: none;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    background: #141414;
    border: 1px solid #333;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox-wrapper:hover .custom-checkbox {
    border-color: #444;
}

.checkbox-wrapper input:checked + .custom-checkbox {
    background: #fff;
    border-color: #fff;
}

.custom-checkbox svg {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.15s;
}

.checkbox-wrapper input:checked + .custom-checkbox svg {
    opacity: 1;
    transform: scale(1);
}

.checkbox-label {
    font-size: 13px;
    color: #666;
}

/* Button */
.btn-submit {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 1px solid #333;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-submit span {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: color 0.3s;
}

.btn-submit:hover {
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.btn-submit:hover::before {
    opacity: 1;
}

.btn-submit:hover span {
    color: #0a0a0a;
}

.btn-submit:active {
    transform: translateY(0);
}

/* Footer */
.login-footer {
    text-align: center;
    padding-top: 24px;
}

.login-footer p {
    font-size: 12px;
    color: #333;
}

.login-footer a {
    color: #555;
    text-decoration: none;
}

/* Loading */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 2px solid #222;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Brand Panel */
.brand-panel {
    display: none;
}

/* Desktop */
@media (min-width: 1024px) {
    .login-panel {
        width: 42%;
        min-width: 500px;
        padding: 48px;
    }
    
    .brand-panel {
        display: flex;
        flex: 1;
        background: #0f0f0f;
        position: relative;
        overflow: hidden;
    }
    
    .brand-bg {
        position: absolute;
        inset: 0;
        background: 
            radial-gradient(ellipse at 20% 20%, rgba(255,255,255,0.03) 0%, transparent 50%),
            radial-gradient(ellipse at 80% 80%, rgba(255,255,255,0.02) 0%, transparent 50%);
    }
    
    .brand-grid {
        position: absolute;
        inset: 0;
        background-image: 
            linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
        background-size: 60px 60px;
    }
    
    .brand-content {
        position: relative;
        z-index: 1;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 60px;
    }
    
    .brand-main {
        text-align: center;
        max-width: 420px;
    }
    
    .brand-icon {
        width: 80px;
        height: 80px;
        background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
        border: 1px solid #222;
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 32px;
    }
    
    .brand-icon svg {
        color: #fff;
    }
    
    .brand-title {
        font-size: 32px;
        font-weight: 700;
        color: #fff;
        margin-bottom: 12px;
        letter-spacing: -0.5px;
    }
    
    .brand-desc {
        font-size: 15px;
        color: #555;
        line-height: 1.7;
        margin-bottom: 48px;
    }
    
    .brand-features {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    .feature-card {
        background: rgba(255,255,255,0.02);
        border: 1px solid #1a1a1a;
        border-radius: 16px;
        padding: 24px 16px;
        text-align: center;
        transition: all 0.3s;
    }
    
    .feature-card:hover {
        background: rgba(255,255,255,0.04);
        border-color: #333;
        transform: translateY(-4px);
    }
    
    .feature-icon {
        width: 44px;
        height: 44px;
        background: #141414;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 14px;
    }
    
    .feature-icon svg {
        color: #888;
    }
    
    .feature-title {
        font-size: 13px;
        font-weight: 600;
        color: #fff;
        margin-bottom: 4px;
    }
    
    .feature-desc {
        font-size: 11px;
        color: #444;
    }
}

@media (min-width: 1400px) {
    .login-panel {
        width: 38%;
    }
    
    .brand-title {
        font-size: 36px;
    }
}
