:root {
    --primary: #dc2626;
    /* Desco Red */
    --primary-dark: #991b1b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #0f172a;
    /* High-end corporate background: Dark overlay + Printing Industry Image */
    background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95)), url('https://images.unsplash.com/photo-1612441804231-77a36b284856?auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 950px;
    margin: 20px;
    display: flex;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* LEFT SIDE - Info & Trust */
.brand-section {
    width: 45%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 56px 48px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

/* Subtle pattern overlay */
.brand-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.brand-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    position: relative;
    z-index: 10;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.brand-title {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
    line-height: 1.1;
    position: relative;
    z-index: 10;
}

.brand-subtitle {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-top: 16px;
    line-height: 1.6;
    position: relative;
    z-index: 10;
}

.trust-badges {
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* RIGHT SIDE - Login Form */
.form-section {
    width: 55%;
    padding: 56px 64px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.form-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.form-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

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

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 20px;
    height: 20px;
    transition: color 0.2s ease;
}

.input-field {
    width: 100%;
    padding: 14px 14px 14px 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-main);
    box-sizing: border-box;
    background-color: var(--bg-light);
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.select-field {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.input-wrapper::after {
    content: "▼";
    font-size: 0.7rem;
    color: var(--text-muted);
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* For inputs inside wrapper, we don't want the arrow except for select, 
   but since input-wrapper wraps all inputs, we need to target specifically the wrapper with select */
.input-wrapper:has(select)::after {
    display: block;
}

.input-wrapper:not(:has(select))::after {
    display: none;
}

.input-field:focus+.input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 500;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 4px;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 14px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-submit:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 6px 15px rgba(220, 38, 38, 0.25);
    transform: translateY(-2px);
}

/* System Status Footer */
.system-status {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@media (max-width: 900px) {
    body {
        align-items: stretch;
        padding: 0;
    }

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

    .brand-section {
        display: none;
    }

    .form-section {
        width: 100%;
        flex: 1;
        padding: 12vh 24px 40px;
        box-sizing: border-box;
        justify-content: flex-start;
    }

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

    /* Target the inline flex logo div */
    .form-header>div {
        justify-content: center;
        margin-bottom: 16px !important;
    }

    .form-header img {
        height: 48px !important;
    }

    .form-title {
        font-size: 1.75rem;
    }

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

    .flex-between {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        margin-bottom: 32px;
    }

    .btn-submit {
        padding: 14px;
    }

    .system-status {
        justify-content: center;
        text-align: center;
        margin-top: 40px;
        padding-top: 16px;
        font-size: 0.8rem;
    }
}