/* AI Digital Invoice - Login Page Styles */

:root {
    --brand-blue: #1E90FF;
    --brand-blue-dark: #0E6FD9;
    --brand-blue-soft: #E8F2FF;
    --brand-green: #22C55E;
    --brand-green-dark: #16A34A;
    --brand-navy: #0F1B4C;
    --brand-navy-mid: #1E2A6B;
    --brand-bg: #F4F7FB;
    --brand-border: #E2E8F0;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--brand-bg);
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
}

/* ============== HEADER ============== */
.app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1030;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(15, 27, 76, 0.08);
    box-shadow: 0 1px 3px rgba(15, 27, 76, 0.04);
    display: flex;
    align-items: center;
}
.app-header .brand-img {
    height: 60px;
    width: auto;
    max-height: 64px;
    object-fit: contain;
}

/* ============== LAYOUT ============== */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    padding-top: 80px;
}
.auth-hero {
    position: relative;
    background: linear-gradient(135deg, #0F1B4C 0%, #1E2A6B 50%, #1E90FF 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 3rem;
    overflow: hidden;
}
.auth-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.07) 1px, transparent 0);
    background-size: 28px 28px;
    pointer-events: none;
}
.auth-hero::after {
    content: '';
    position: absolute;
    top: -150px; right: -150px;
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.28), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 480px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #bbf7d0;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-size: 2.7rem;
    line-height: 1.12;
    margin-bottom: 1rem;
    color: #fff;
}
.hero-title .accent {
    background: linear-gradient(90deg, #60a5fa 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-text {
    color: rgba(255,255,255,0.78);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2.2rem;
}
.hero-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.9rem;
}
.hero-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.95rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}
.icon-box {
    flex-shrink: 0;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    font-size: 1.15rem;
    color: #fff;
}
.icon-blue { background: linear-gradient(135deg, #1E90FF, #60a5fa); }
.icon-green { background: linear-gradient(135deg, #16A34A, #22C55E); }
.icon-navy { background: linear-gradient(135deg, #1E2A6B, #3b82f6); }
.hero-features h6 {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    color: #fff;
}
.hero-features p {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.45;
}

/* ============== FORM SIDE ============== */
.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: #fff;
}
.auth-card {
    width: 100%;
    max-width: 440px;
}
.auth-card h2 {
    font-size: 1.85rem;
    margin-bottom: 0.4rem;
    color: var(--brand-navy);
    letter-spacing: -0.02em;
}
.auth-card .subtitle {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.input-wrap { position: relative; }
.form-floating > .form-control {
    border: 1.5px solid var(--brand-border);
    border-radius: 10px;
    padding: 1rem 1rem 1rem 3rem;
    height: 60px;
    font-size: 0.95rem;
    color: #0f172a;
    transition: all 0.2s ease;
    background: #fff;
}
.form-floating > .form-control:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(30, 144, 255, 0.12);
}
.form-floating > label {
    left: 3rem;
    color: #94a3b8;
    font-size: 0.95rem;
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--brand-blue);
    transform: scale(0.85) translateY(-0.9rem) translateX(0.15rem);
}
.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 1.1rem;
    z-index: 5;
}
.toggle-pass {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: #94a3b8;
    z-index: 5;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
}
.toggle-pass:hover { color: var(--brand-blue); }

.btn-brand {
    background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-green) 100%);
    border: 0;
    color: #fff;
    font-weight: 700;
    padding: 0.95rem 1.5rem;
    border-radius: 10px;
    width: 100%;
    font-size: 1rem;
    letter-spacing: 0.01em;
    transition: all 0.25s ease;
    box-shadow: 0 10px 22px -8px rgba(30, 144, 255, 0.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-brand:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -8px rgba(30, 144, 255, 0.65);
    color: #fff;
}
.btn-brand:active { transform: translateY(0); }
.btn-brand:disabled { opacity: 0.7; cursor: not-allowed; }

.link-brand {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
}
.link-brand:hover { text-decoration: underline; }

.alert-soft-danger, .alert-soft-success {
    border: 0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.alert-soft-danger {
    background: #fef2f2;
    color: #b91c1c;
    border-left: 3px solid #ef4444;
}
.alert-soft-success {
    background: #f0fdf4;
    color: #15803d;
    border-left: 3px solid #22c55e;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    font-size: 0.76rem;
    color: #15803d;
    font-weight: 600;
}

.auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--brand-border);
    text-align: center;
    font-size: 0.88rem;
    color: #64748b;
}

/* WhatsApp support icon — dginvoice-style green brand */
.auth-footer .link-brand i.bi-whatsapp {
    color: #25D366;
    font-size: 1.15rem;
    vertical-align: -2px;
    margin-right: 2px;
    transition: transform 0.2s ease, color 0.2s ease;
}
.auth-footer .link-brand:hover i.bi-whatsapp {
    color: #1DA851;
    transform: scale(1.1);
}

/* ============== WHATSAPP FLOATING BUTTON ============== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    box-shadow:
        0 8px 24px rgba(37, 211, 102, 0.40),
        inset 0 0 12px rgba(255, 255, 255, 0.1);
    z-index: 9999;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.whatsapp-float:hover {
    transform: translateY(-4px) scale(1.05);
    background: #25D366;
    color: #fff;
    box-shadow:
        0 14px 32px rgba(37, 211, 102, 0.5),
        0 0 20px rgba(37, 211, 102, 0.3);
}

.wa-icon {
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 2;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.3);
    animation: wa-pulse 2s infinite;
    z-index: 1;
}

@keyframes wa-pulse {
    0%   { transform: scale(0.9); opacity: 0.8; }
    70%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ============== RESPONSIVE ============== */
@media (max-width: 991.98px) {
    .auth-hero { display: none !important; }
}
@media (max-width: 575.98px) {
    .app-header { min-height: 72px; }
    .app-header .brand-img { height: 48px; }
    .auth-wrap { padding-top: 72px; }
    .auth-card h2 { font-size: 1.6rem; }
    .whatsapp-float {
        width: 54px;
        height: 54px;
        bottom: 18px;
        right: 18px;
    }
    .wa-icon { width: 28px; height: 28px; }
}
