/* ==========================================================================
   Simple Inventory - Modern Admin Authentication Stylesheet
   Uses Bootstrap 5 + FontAwesome + CSS Custom Properties
   ========================================================================== */

:root {
    --auth-primary: #3e48a7;
    --auth-primary-dark: #2f3887;
    --auth-accent: #e21b1b;
    --auth-ink: #0f172a;
    --auth-text: #1e293b;
    --auth-muted: #5b687c;
    --auth-canvas: #f4f6f9;
    --auth-surface: #ffffff;
    --auth-surface-alt: #f8fafc;
    --auth-border: #cbd5e1;
    --auth-border-soft: #e2e8f0;
    --auth-danger: #dc2626;
    --auth-radius-sm: 8px;
    --auth-radius-md: 12px;
    --auth-radius-lg: 16px;
    --auth-shadow: 0 20px 44px -14px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
}

html,
body {
    margin: 0;
    padding: 0;
    background-color: var(--auth-canvas);
    color: var(--auth-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

a[href],
button:not(:disabled),
label[for],
input[type="checkbox"]:not(:disabled) {
    cursor: pointer;
}

:focus-visible {
    outline: 2.5px solid var(--auth-primary);
    outline-offset: 2px;
}

.auth-input-group .auth-control:focus,
.auth-input-group .auth-control:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Prevent Chrome/Edge yellow/blue autofill background inside custom input group */
.auth-control:-webkit-autofill,
.auth-control:-webkit-autofill:hover,
.auth-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: var(--auth-ink) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.auth-shell {
    min-height: 100vh;
    width: 100%;
}

/* --------------------------------------------------------------------------
   Left Brand & Operations Showcase Panel
   -------------------------------------------------------------------------- */
.auth-brand-side {
    position: relative;
    background: linear-gradient(155deg, #0f172a 0%, #1e293b 62%, #2a347d 100%);
    color: #f8fafc;
    padding: clamp(2.5rem, 4vw, 4rem);
    overflow: hidden;
}

.auth-brand-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 18% 18%, rgba(62, 72, 167, 0.28), transparent 46%),
        radial-gradient(circle at 86% 82%, rgba(226, 27, 27, 0.14), transparent 42%);
    pointer-events: none;
}

.auth-brand-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
}

.auth-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: var(--auth-radius-sm);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 3px solid var(--auth-accent);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.auth-brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    display: block;
    line-height: 1.2;
}

.auth-brand-sub {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #cbd5e1;
}

.auth-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
}

.auth-hero-heading {
    font-size: clamp(1.85rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.18;
    color: #ffffff;
    margin-bottom: 1rem;
}

.auth-hero-copy {
    font-size: 0.96rem;
    line-height: 1.65;
    color: #cbd5e1;
    margin-bottom: 2rem;
}

.auth-cap-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.auth-cap-item {
    background-color: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: var(--auth-radius-md);
    padding: 1rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.auth-cap-item:hover {
    background-color: rgba(255, 255, 255, 0.085);
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-cap-item h3 {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-cap-item h3 i {
    color: #a5b4fc;
}

.auth-cap-item p {
    font-size: 0.79rem;
    color: #cbd5e1;
    margin-bottom: 0;
    line-height: 1.45;
}

.auth-side-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.25rem;
    font-size: 0.82rem;
    color: #94a3b8;
}

/* --------------------------------------------------------------------------
   Right Authentication Card Panel
   -------------------------------------------------------------------------- */
.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    background-color: var(--auth-canvas);
}

.auth-card-box {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background-color: var(--auth-surface);
    border: 1px solid var(--auth-border-soft);
    border-top: 3px solid var(--auth-primary);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-shadow);
    padding: clamp(1.75rem, 4vw, 2.5rem);
}

.auth-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--auth-ink);
    margin-bottom: 0.35rem;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--auth-muted);
    margin-bottom: 0;
}

.auth-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--auth-ink);
    margin-bottom: 0.45rem;
}

.auth-input-group {
    display: flex;
    align-items: center;
    background-color: var(--auth-surface-alt);
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.auth-input-group:focus-within {
    background-color: var(--auth-surface);
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(62, 72, 167, 0.14);
}

.auth-input-group.is-invalid-group {
    border-color: var(--auth-danger);
    background-color: #fffafa;
}

.auth-input-group.is-invalid-group:focus-within {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

.auth-input-prefix {
    padding: 0 0.85rem;
    color: var(--auth-muted);
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.auth-input-group:focus-within .auth-input-prefix {
    color: var(--auth-primary);
}

.auth-control {
    border: none !important;
    background: transparent !important;
    padding: 0.74rem 0.75rem 0.74rem 0;
    font-size: 0.94rem;
    color: var(--auth-ink);
    box-shadow: none !important;
    width: 100%;
    min-height: 44px;
}

.auth-control::placeholder {
    color: #94a3b8;
}

.auth-control.is-invalid {
    background-image: none !important;
}

.auth-toggle-btn {
    border: none;
    background: transparent;
    color: var(--auth-muted);
    padding: 0 0.9rem;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.auth-toggle-btn:hover {
    color: var(--auth-ink);
}

.auth-toggle-btn:focus-visible {
    outline: none;
    background-color: rgba(62, 72, 167, 0.08);
    color: var(--auth-primary);
}

.auth-caps-hint {
    font-size: 0.78rem;
    font-weight: 600;
    color: #b45309;
}

.form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.form-check-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(62, 72, 167, 0.14);
}

.auth-submit-btn {
    width: 100%;
    min-height: 46px;
    padding: 0.8rem 1.4rem;
    border-radius: var(--auth-radius-sm);
    border: none;
    background-color: var(--auth-ink);
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.auth-submit-btn:hover:not(:disabled) {
    background-color: var(--auth-primary);
    color: #ffffff;
}

.auth-submit-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.auth-card-foot {
    border-top: 1px solid var(--auth-border-soft);
    margin-top: 1.5rem;
    padding-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.83rem;
}

.auth-back-link {
    color: var(--auth-text);
    font-weight: 600;
    text-decoration: none;
}

.auth-back-link:hover {
    color: var(--auth-primary);
    text-decoration: underline;
}

.auth-mobile-brand-mark {
    background-color: var(--auth-ink);
}

@media (max-width: 1199.98px) {
    .auth-cap-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.4rem;
        border-radius: var(--auth-radius-md);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-shell *,
    .auth-submit-btn,
    .auth-input-group,
    .auth-cap-item {
        transition: none !important;
    }
}
