/* ============================================================
   CSS VARIABLES - Premium Yellow/Golden Theme
   ============================================================ */
:root {
    /* Black tones */
    --primary-dark: #000000;
    --primary: #0d0d0d;
    --primary-medium: #1a1a1a;
    --primary-light: #2a2a2a;
    --primary-gradient: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2a2a2a 100%);
    
    /* Yellow/Golden accents */
    --accent: #FFC107;
    --accent-light: #FFD54F;
    --accent-glow: #FFB300;
    --accent-dark: #FFA000;
    --accent-gradient: linear-gradient(135deg, #FFD54F 0%, #FFC107 50%, #FFA000 100%);
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #d4d4d4;
    --text-muted: #a3a3a3;
    --text-black: #000000;
    
    /* Backgrounds */
    --bg-dark: #000000;
    --bg-card: rgba(13, 13, 13, 0.88);
    --bg-card-hover: rgba(26, 26, 26, 0.4);
    --bg-sidebar: rgba(0, 0, 0, 0.98);
    --bg-modal: rgba(0, 0, 0, 0.85);
    --bg-yellow-tint: rgba(255, 193, 7, 0.08);
    
    /* Borders */
    --border-color: rgba(255, 193, 7, 0.25);
    --border-glow: rgba(255, 193, 7, 0.35);
    --border-yellow: rgba(255, 193, 7, 0.3);
    
    /* Shadows */
    --shadow-glow: 0 4px 20px rgba(255, 193, 7, 0.25);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-yellow: 0 4px 25px rgba(255, 193, 7, 0.4);
    
    --radius: 12px;
    --radius-lg: 20px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-dark);
    position: relative;
}

/* ============================================================
   BACKGROUND - Digital Marketing Image with Yellow Tint
   ============================================================ */
.page-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background: var(--bg-dark);
}

.page-bg .bg-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1432889821006-c6c5b1d7a2e0?w=1920&q=80') center center / cover no-repeat;
    opacity: 0.25;
    transition: opacity 0.5s ease;
}

/* Fallback with black/golden overlay */
.page-bg .bg-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.9) 0%,
        rgba(26, 26, 26, 0.75) 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
}

.page-bg .gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(13, 13, 13, 0.5) 30%,
        rgba(26, 26, 26, 0.4) 50%,
        rgba(13, 13, 13, 0.5) 70%,
        rgba(0, 0, 0, 0.8) 100%
    );
    z-index: 1;
}

.page-bg .grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background-image: 
        linear-gradient(rgba(255, 193, 7, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 193, 7, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ============================================================
   LOGIN CONTAINER - Black with Yellow Border
   ============================================================ */
.login-container {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 60px rgba(0, 0, 0, 0.7), 0 0 80px rgba(255, 193, 7, 0.08);
    overflow: hidden;
}

/* Left side - Brand & Features */
.login-image {
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95) 0%,
        rgba(26, 26, 26, 0.85) 50%,
        rgba(13, 13, 13, 0.95) 100%
    );
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 400px;
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--border-color);
}

.login-image::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.login-image .brand-icon {
    font-size: 56px;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 20px rgba(255, 193, 7, 0.4));
}

.login-image .brand-name {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 4px;
    position: relative;
    z-index: 2;
    color: var(--text-primary);
    line-height: 1.2;
}

.login-image .brand-name span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-image .brand-tagline {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 28px;
    position: relative;
    z-index: 2;
}

.login-image .brand-tagline strong {
    color: var(--accent);
    font-weight: 600;
}

.login-image .features {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.login-image .feature-item {
    padding: 14px 10px;
    background: rgba(255, 193, 7, 0.06);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 193, 7, 0.12);
    transition: var(--transition);
}

.login-image .feature-item:hover {
    background: rgba(255, 193, 7, 0.12);
    transform: translateY(-2px);
    border-color: rgba(255, 193, 7, 0.3);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.15);
}

.login-image .feature-item i {
    font-size: 20px;
    color: var(--accent);
    margin-bottom: 6px;
    display: block;
}

.login-image .feature-item span {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
}

.login-image .brand-decoration {
    position: absolute;
    bottom: -30px;
    right: -30px;
    font-size: 180px;
    opacity: 0.05;
    z-index: 1;
    transform: rotate(-10deg);
    color: var(--accent);
}

/* Right side - Form */
.login-form {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-form .form-header {
    margin-bottom: 32px;
}

.login-form .form-header h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

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

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

.login-form .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.login-form .form-group .input-wrapper {
    position: relative;
}

.login-form .form-group .input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    transition: var(--transition);
    z-index: 2;
}

.login-form .form-group input:focus + i,
.login-form .form-group input:focus ~ i {
    color: var(--accent);
}

.login-form .form-group input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    outline: none;
}

.login-form .form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.15);
    background: rgba(0, 0, 0, 0.9);
}

.login-form .form-group input::placeholder {
    color: var(--text-muted);
}

/* Login Button - Golden Yellow Gradient */
.login-form .btn-login {
    width: 100%;
    padding: 14px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius);
    color: var(--text-black);
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.login-form .btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.login-form .btn-login:hover::before {
    left: 100%;
}

.login-form .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 193, 7, 0.45);
    background: linear-gradient(135deg, #FFD54F 0%, #FFC107 50%, #FFB300 100%);
}

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

.login-form .btn-login i {
    font-size: 18px;
    transition: var(--transition);
    color: var(--text-black);
}

.login-form .btn-login:hover i {
    transform: translateX(4px);
}

.login-form .btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.login-form .btn-login:disabled::before {
    display: none;
}

/* Error Message */
.login-form .error-message {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #ff6b6b;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 10px;
}

.login-form .error-message i {
    font-size: 16px;
    flex-shrink: 0;
}

.login-form .error-message.show {
    display: flex;
}

/* Form Footer */
.login-form .form-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.login-form .form-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.login-form .form-footer a:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

/* Spinner */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: var(--text-black);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner.active {
    display: inline-block;
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet (max-width: 900px) */
@media (max-width: 900px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .login-image {
        padding: 32px 24px;
        min-height: auto;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border-right: none;
        border-bottom: 2px solid var(--accent);
    }

    .login-image .brand-name {
        font-size: 28px;
    }

    .login-image .features {
        grid-template-columns: 1fr 1fr 1fr;
        margin-top: 16px;
    }

    .login-form {
        padding: 32px 24px;
        background: var(--bg-card);
    }

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

    .login-image .brand-decoration {
        display: none;
    }

    .page-bg .bg-image {
        background-position: center 30%;
    }
}

/* Mobile (max-width: 640px) */
@media (max-width: 640px) {
    body {
        padding: 12px;
    }

    .login-image {
        padding: 24px 16px;
    }

    .login-image .brand-name {
        font-size: 24px;
    }

    .login-image .brand-tagline {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .login-image .features {
        display: none !important;
    }

    .login-form {
        padding: 24px 16px;
    }

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

    .login-form .form-header {
        margin-bottom: 24px;
    }

    .login-form .form-group label {
        font-size: 12px;
    }

    .login-form .form-group input {
        font-size: 13px;
        padding: 10px 14px 10px 38px;
    }

    .login-form .btn-login {
        font-size: 14px;
        padding: 12px;
    }

    .login-image .brand-icon {
        font-size: 40px;
    }

    .page-bg .bg-image {
        background-position: center 20%;
        opacity: 0.18;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    .login-image .brand-name {
        font-size: 20px;
    }

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

    .login-form {
        padding: 20px 12px;
    }

    .login-image {
        padding: 20px 12px;
    }

    .login-image .brand-icon {
        font-size: 32px;
    }
}

/* Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .page-bg .bg-image {
        background-image: url('https://images.unsplash.com/photo-1432889821006-c6c5b1d7a2e0?w=2560&q=80');
    }
}
