/**
 * BCVWDConnect — Login Screen Stylesheet
 *
 * Dedicated stylesheet for the custom login screen only.
 * Kept separate from style.css to keep the login page
 * lightweight and independent from the main portal CSS.
 *
 * Imports the design tokens from style.css are replicated
 * here as a standalone set so the login page works even if
 * the main portal stylesheet fails to load for any reason.
 *
 * @package    BCVWDConnect
 * @author     AquilaNera Global, LLC
 * @version    1.0.0
 * @since      1.0.0
 */

:root {
    --login-navy:        #0d1b3e;
    --login-navy-mid:    #1e3a6e;
    --login-blue:        #1e4db7;
    --login-blue-light:  #5b9cf6;
    --login-bg:          #f4f6fb;
    --login-card:        #ffffff;
    --login-text:        #0d1b3e;
    --login-muted:       #6b7a99;
    --login-subtle:      #b0bfd4;
    --login-border:      rgba(0, 0, 0, 0.10);
    --login-danger:      #e24b4a;
    --login-danger-bg:   #fcebeb;
    --login-danger-text: #791f1f;
    --login-warning-bg:  #fffbf0;
    --login-warning-border: rgba(245, 166, 35, 0.4);
    --login-warning-text:   #633806;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--login-navy);
    -webkit-font-smoothing: antialiased;
}

/* Two-panel login layout */
.bcvwd-login-screen {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Left — branded dark panel */
.bcvwd-login-left {
    flex: 1;
    background: var(--login-navy);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 48px;
    overflow: hidden;
}

.bcvwd-login-left-bg { position: absolute; inset: 0; }
.bcvwd-login-left-bg img,
.bcvwd-login-left-bg svg { width: 100%; height: 100%; object-fit: cover; }
.bcvwd-login-left-overlay { position: absolute; inset: 0; background: rgba(13, 27, 62, 0.55); }

.bcvwd-login-left-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Logo on left panel */
.bcvwd-login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    text-decoration: none;
}

.bcvwd-login-logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--login-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bcvwd-login-logo-text {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}

.bcvwd-login-logo-text span { color: var(--login-blue-light); }

.bcvwd-login-headline {
    font-size: 28px;
    font-weight: 500;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 14px;
}

.bcvwd-login-headline span { color: var(--login-blue-light); }

.bcvwd-login-description {
    font-size: 14px;
    color: #7a93b8;
    line-height: 1.65;
    max-width: 300px;
    margin-bottom: 24px;
}

.bcvwd-login-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 32px;
}

.bcvwd-login-pill {
    background: rgba(91, 156, 246, 0.1);
    border: 0.5px solid rgba(91, 156, 246, 0.2);
    border-radius: 9999px;
    padding: 5px 14px;
    font-size: 12px;
    color: #9ab8d8;
}

.bcvwd-login-dept-avatars {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 20px;
    align-items: center;
}

.bcvwd-dept-dot {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 500;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    line-height: 1;
}

.bcvwd-login-legal {
    font-size: 10px;
    color: #2a3e58;
    margin-top: 10px;
    line-height: 1.5;
}

/* Right — login form panel */
.bcvwd-login-right {
    width: 380px;
    flex-shrink: 0;
    background: var(--login-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
}

.bcvwd-login-title {
    font-size: 22px;
    font-weight: 500;
    color: var(--login-text);
    margin-bottom: 4px;
}

.bcvwd-login-subtitle {
    font-size: 14px;
    color: var(--login-muted);
    margin-bottom: 24px;
}

/* Warning box — unauthorized access notice */
.bcvwd-login-warning {
    background: var(--login-warning-bg);
    border: 0.5px solid var(--login-warning-border);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 22px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.bcvwd-login-warning-text {
    font-size: 12px;
    color: var(--login-warning-text);
    line-height: 1.6;
}

/* Form */
.bcvwd-login-form { display: flex; flex-direction: column; gap: 14px; }

/* Field wrapper */
.bcvwd-login-field { display: flex; flex-direction: column; gap: 5px; }

.bcvwd-login-label {
    font-size: 12px;
    font-weight: 500;
    color: #4a5568;
}

/* Input */
.bcvwd-login-input {
    width: 100%;
    background: #fff;
    border: 0.5px solid var(--login-border);
    border-radius: 9px;
    padding: 11px 14px;
    font-size: 14px;
    color: var(--login-text);
    outline: none;
    font-family: var(--font);
    min-height: 44px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bcvwd-login-input:focus {
    border-color: var(--login-blue);
    box-shadow: 0 0 0 3px rgba(30, 77, 183, 0.1);
}

.bcvwd-login-input::placeholder { color: var(--login-subtle); }
.bcvwd-login-input.error { border-color: var(--login-danger); }

/* Password field with show/hide toggle */
.bcvwd-login-pass-wrap { position: relative; }

.bcvwd-login-pass-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--login-blue);
    cursor: pointer;
    font-size: 12px;
    font-family: var(--font);
    display: flex;
    align-items: center;
    padding: 4px;
    min-height: 44px;
}

/* Error message */
.bcvwd-login-error {
    background: var(--login-danger-bg);
    border: 0.5px solid rgba(226, 75, 74, 0.3);
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 12px;
    color: var(--login-danger-text);
    line-height: 1.5;
    display: none;
}

.bcvwd-login-error.visible { display: block; }

/* Info message (e.g. session timeout notice) */
.bcvwd-login-info {
    background: #e6f1fb;
    border: 0.5px solid rgba(30, 77, 183, 0.2);
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 12px;
    color: #0c447c;
    line-height: 1.5;
    display: none;
}

.bcvwd-login-info.visible { display: block; }

/* Attempt dots */
.bcvwd-attempt-row {
    display: none;
    align-items: center;
    justify-content: space-between;
}

.bcvwd-attempt-row.visible { display: flex; }

.bcvwd-attempt-dots { display: flex; gap: 6px; }

.bcvwd-attempt-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
}

.bcvwd-attempt-dot.used { background: var(--login-danger); }

.bcvwd-attempt-text {
    font-size: 12px;
    color: var(--login-muted);
}

.bcvwd-attempt-text.critical { color: var(--login-danger); }

/* Submit button */
.bcvwd-login-btn {
    width: 100%;
    background: var(--login-blue);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    min-height: 46px;
    transition: background 0.15s;
}

.bcvwd-login-btn:hover   { background: #185fa5; }
.bcvwd-login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Security footer */
.bcvwd-login-security {
    border-top: 0.5px solid rgba(0, 0, 0, 0.07);
    margin-top: 24px;
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bcvwd-login-security-row { display: flex; align-items: center; gap: 8px; }

.bcvwd-login-security-text {
    font-size: 11px;
    color: var(--login-subtle);
}

.bcvwd-login-security-text strong {
    color: var(--login-blue-light);
    font-weight: 400;
}

/* ============================================================================
   RESPONSIVE — MOBILE
   ============================================================================ */

@media (max-width: 767px) {

    .bcvwd-login-screen { flex-direction: column; }

    .bcvwd-login-left {
        min-height: 180px;
        padding: 28px 24px 20px;
        flex: 0 0 auto;
    }

    .bcvwd-login-description,
    .bcvwd-login-pills,
    .bcvwd-login-dept-avatars { display: none; }

    .bcvwd-login-headline { font-size: 20px; margin-bottom: 0; }

    .bcvwd-login-logo { margin-bottom: 20px; }

    .bcvwd-login-right {
        width: 100%;
        flex: 1;
        padding: 28px 24px;
        justify-content: flex-start;
    }
}

@media (max-width: 399px) {
    .bcvwd-login-left  { padding: 20px 16px; }
    .bcvwd-login-right { padding: 20px 16px; }
}
