/* Pamposh Payroll — premium login page styles
 * Loaded only on the login view; keeps the main app's app.css untouched.
 */

/* ------------ Reset for the body when on login ------------ */
body.login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: #0A1024;
    color: #1C243C;
}

/* ============== ROOT LAYOUT ============== */
.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    position: relative;
}

@media (max-width: 980px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-brand { padding: 40px 30px 30px !important; }
    .login-right { padding: 30px 20px !important; }
}

/* ============== LEFT BRAND PANEL ============== */
.login-brand {
    position: relative;
    background:
        radial-gradient(circle at 20% 20%, rgba(80, 180, 255, 0.35), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(155, 80, 220, 0.30), transparent 55%),
        linear-gradient(135deg, #0A1024 0%, #14306E 50%, #0A1024 100%);
    color: white;
    padding: 60px 60px 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Decorative floating orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    pointer-events: none;
    animation: floatOrb 14s ease-in-out infinite;
}
.orb-1 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, #3C75F5 0%, transparent 70%);
    top: -50px; left: -50px;
}
.orb-2 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, #9B50DC 0%, transparent 70%);
    bottom: -100px; right: -80px;
    animation-delay: -7s;
}
.orb-3 {
    width: 220px; height: 220px;
    background: radial-gradient(circle, #50B4FF 0%, transparent 70%);
    top: 40%; right: 10%;
    animation-delay: -3s;
    animation-duration: 18s;
}
@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(20px, -25px) scale(1.05); }
    66%      { transform: translate(-15px, 18px) scale(0.95); }
}

/* Brand grid pattern overlay */
.login-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.brand-content {
    position: relative;
    z-index: 2;
}

/* Logo + name header */
.brand-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 8px;
}
.brand-logo {
    width: 64px; height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #3C75F5 0%, #50B4FF 100%);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-weight: 900; font-size: 32px; color: white;
    box-shadow:
        0 12px 30px rgba(60, 117, 245, 0.45),
        inset 0 1px 0 rgba(255,255,255,0.25);
    position: relative;
}
.brand-logo::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent 50%);
    pointer-events: none;
}
.brand-text { line-height: 1.1; }
.brand-text .name {
    font-size: 28px; font-weight: 700; letter-spacing: -0.5px;
    background: linear-gradient(90deg, #fff 0%, #BAD0F5 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.brand-text .tag {
    font-size: 11px; font-weight: 500;
    color: #92A8D5; letter-spacing: 1.5px; text-transform: uppercase;
    margin-top: 4px;
}

/* Hero text */
.hero {
    margin-top: 60px;
    position: relative;
    z-index: 2;
}
.hero h2 {
    font-size: 32px; font-weight: 600; line-height: 1.2; margin: 0 0 12px;
    color: white;
}
.hero h2 span.accent {
    background: linear-gradient(90deg, #50B4FF, #9B50DC);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 14.5px; color: #BCD0F0; line-height: 1.65; max-width: 380px; margin: 0;
}

/* Features list */
.features {
    margin-top: 36px;
    position: relative;
    z-index: 2;
    display: flex; flex-direction: column; gap: 12px;
}
.feature-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    transition: background 0.18s, transform 0.18s;
}
.feature-item:hover { background: rgba(255,255,255,0.10); transform: translateX(4px); }
.feature-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; color: white;
    flex-shrink: 0;
}
.feature-icon.blue   { background: linear-gradient(135deg, #3C75F5, #50B4FF); }
.feature-icon.purple { background: linear-gradient(135deg, #9B50DC, #C078F4); }
.feature-icon.green  { background: linear-gradient(135deg, #28B463, #4DD68A); }
.feature-icon.amber  { background: linear-gradient(135deg, #F5A823, #FFCB67); }
.feature-text {
    font-size: 13px; color: #DCE6F8; font-weight: 500;
}

.brand-footer {
    position: relative;
    z-index: 2;
    font-size: 11px;
    color: #6E83AC;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 16px;
}

/* ============== RIGHT FORM PANEL ============== */
.login-right {
    background: linear-gradient(180deg, #F8FAFE 0%, #EEF2FA 100%);
    padding: 60px 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-card {
    width: 100%; max-width: 480px;
    background: white;
    border-radius: 20px;
    padding: 8px 0;
    box-shadow:
        0 24px 60px rgba(20, 30, 70, 0.10),
        0 1px 0 rgba(60, 117, 245, 0.08);
    position: relative;
    overflow: hidden;
}
.login-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #3C75F5 0%, #9B50DC 100%);
}

/* ============== TABS (sliding indicator) ============== */
.login-tabs {
    display: flex; padding: 0 20px; margin-top: 18px;
    position: relative;
    border-bottom: 1px solid #E1E6F0;
}
.login-tabs a {
    flex: 1; padding: 16px 8px;
    text-align: center;
    font-size: 13.5px; font-weight: 600;
    color: #78849E; text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
}
.login-tabs a:hover { color: #1C243C; }
.login-tabs a.active { color: #3C75F5; }
.login-tabs a.active::after {
    content: '';
    position: absolute; bottom: -1px; left: 12%; right: 12%;
    height: 3px;
    background: linear-gradient(90deg, #3C75F5, #50B4FF);
    border-radius: 3px 3px 0 0;
}

/* ============== INPUT FIELDS ============== */
.tab-content { padding: 28px 36px 36px; }
.tab-content h2 {
    font-size: 22px; font-weight: 600; margin: 0 0 4px;
    color: #1C243C; letter-spacing: -0.3px;
}
.tab-content .sub {
    font-size: 13px; color: #78849E; margin-bottom: 26px;
}

.input-group {
    margin-bottom: 16px;
}
.input-group label {
    display: block; font-size: 11px; font-weight: 700;
    color: #64708A; letter-spacing: 0.6px; text-transform: uppercase;
    margin-bottom: 7px;
}
.input-wrap {
    position: relative;
    display: flex; align-items: center;
}
.input-icon {
    position: absolute; left: 14px;
    font-size: 16px; color: #9AA8C0;
    pointer-events: none;
}
.input-wrap input[type=text],
.input-wrap input[type=password],
.input-wrap input[type=number] {
    width: 100%;
    border: 1.5px solid #E1E6F0;
    background: #F8FAFE;
    border-radius: 11px;
    padding: 13px 14px 13px 44px;
    font-size: 14px;
    color: #1C243C;
    transition: all 0.18s;
    font-family: inherit;
}
.input-wrap input:focus {
    outline: 0;
    border-color: #3C75F5;
    background: white;
    box-shadow: 0 0 0 4px rgba(60, 117, 245, 0.12);
}
.input-wrap input::placeholder { color: #B0BBD0; }
.input-toggle {
    position: absolute; right: 14px;
    background: none; border: 0; cursor: pointer;
    color: #78849E; font-size: 13px; padding: 4px;
    user-select: none;
}
.input-toggle:hover { color: #3C75F5; }

/* ============== BUTTONS ============== */
.btn-primary-lg {
    width: 100%;
    background: linear-gradient(90deg, #3C75F5 0%, #50B4FF 100%);
    color: white;
    border: 0;
    border-radius: 12px;
    padding: 14px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: transform 0.12s, box-shadow 0.18s;
    box-shadow: 0 8px 20px rgba(60, 117, 245, 0.35);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary-lg:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(60, 117, 245, 0.45);
}
.btn-primary-lg:active { transform: translateY(0); }
.btn-primary-lg:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-test {
    flex: 1;
    background: white;
    border: 1.5px solid #E1E6F0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12.5px; font-weight: 600;
    color: #1C243C;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: all 0.15s;
}
.btn-test:hover { border-color: #3C75F5; color: #3C75F5; background: #F0F5FE; }
.btn-test.purple:hover { border-color: #9B50DC; color: #9B50DC; background: #F6EEFC; }
.btn-test.green:hover  { border-color: #28B463; color: #28B463; background: #E9F8EF; }
.btn-test:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============== HELPER LINE / HINT ============== */
.login-hint {
    margin-top: 22px; text-align: center;
    font-size: 12px; color: #78849E;
}
.login-hint code {
    background: #EEF2FA;
    border-radius: 4px; padding: 2px 7px;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    color: #3C75F5; font-weight: 600;
}

/* ============== FLASH MESSAGES ============== */
.login-flash {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 10px;
    border: 1px solid;
}
.login-flash.danger { background: #FCE6E6; color: #B43030; border-color: #F5BABA; }
.login-flash.success { background: #E8F5E9; color: #1F7A3A; border-color: #B5E2C3; }
.login-flash.info    { background: #E8EEFB; color: #2D4D9C; border-color: #B6C8F2; }

.login-flash::before {
    content: '';
    width: 4px; height: 18px; border-radius: 2px; background: currentColor;
    flex-shrink: 0; opacity: 0.6;
}

/* ============== SERVER CONNECTION SECTION ============== */
.diag-row { display: flex; gap: 8px; margin: 14px 0; }
.diag-box {
    background: linear-gradient(180deg, #F4F7FC 0%, #ECF1FA 100%);
    border: 1px solid #DCE3F0;
    border-radius: 12px;
    padding: 14px 16px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12.5px;
    line-height: 2;
    color: #5A6B85;
}
.diag-box .line { display: flex; align-items: center; gap: 8px; }
.diag-box .label { width: 105px; color: #64708A; }
.diag-box .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #C8D2E6;
    flex-shrink: 0;
}
.diag-box .dot.ok { background: #28B463; box-shadow: 0 0 0 3px rgba(40, 180, 99, 0.15); }
.diag-box .dot.warn { background: #F5A823; box-shadow: 0 0 0 3px rgba(245, 168, 35, 0.15); }
.diag-box .dot.err { background: #E84141; box-shadow: 0 0 0 3px rgba(232, 65, 65, 0.15); }
.diag-box .dot.muted { background: #C8D2E6; }
.diag-box .status.muted { color: #9AA8C0; font-style: italic; }
.diag-box .status.ok    { color: #1F7A3A; font-weight: 600; }
.diag-box .status.warn  { color: #886415; font-weight: 600; }
.diag-box .status.err   { color: #B43030; font-weight: 600; }

.field-row { display: flex; gap: 12px; }
.field-row .input-group { flex: 1; }

.form-row-small { display: flex; gap: 8px; }
.form-row-small > .input-group:nth-child(2) { flex: 0 0 110px; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tab-content { animation: fadeIn 0.25s ease-out; }
[x-cloak] { display: none !important; }
