/* =============================================================================
 * VG Advantage — High-Performance Login Stylesheet (Optimized for Lighthouse 100)
 * ========================================================================== */

:root {
    --color-primary: #0f766e;
    --color-primary-dark: #0d9488;
    --color-secondary: #0284c7;
    --color-dark-slate: #0f172a;
    --color-text-muted: #64748b;
    --color-border: #cbd5e1;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.25);
}

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

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

body {
    margin: 0;
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-dark-slate);
    -webkit-font-smoothing: antialiased;
}

body.login-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #0f766e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

img { vertical-align: middle; border-style: none; }
.img-fluid { max-width: 100%; height: auto; }

/* ---- Main card container ---- */
.login-box {
    width: 420px;
    max-width: 92%;
    margin: 0 auto;
}

.login-box .card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.98);
}

.login-box .card-header {
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 24px 20px 16px;
}

.login-box .card-body { padding: 1.5rem 1.25rem; }

.login-box-msg {
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    text-align: center;
}

/* ---- Inputs & Groups ---- */
.form-group { margin-bottom: 1rem; }

.login-box .input-group {
    width: 100%;
    margin-top: 14px;
    margin-bottom: 14px;
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
}

.login-box .input-group-prepend { display: flex; }

.login-box .input-group-prepend .input-group-text {
    background-color: #f8fafc;
    border: 1px solid var(--color-border);
    border-right: none;
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
    color: var(--color-primary);
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .375rem .75rem;
}

.login-box .form-control {
    display: block;
    border: 1px solid var(--color-border);
    border-left: none;
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    height: 44px;
    font-size: 0.925rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--color-dark-slate);
    background-color: #ffffff;
    flex: 1 1 auto;
    width: 100%;
    padding: .375rem .75rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.login-box .form-control:focus {
    border-color: var(--color-secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.login-box .form-control::placeholder { color: #94a3b8; opacity: 1; }

select.form-control { height: 44px; }

/* ---- Action Buttons ---- */
.btn {
    display: inline-block;
    font-family: inherit;
    text-align: center;
    vertical-align: middle;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-block { display: block; width: 100%; }

.login-box .btn-primary,
.login-box #loginbutton1,
.login-box #loginbutton2 {
    background: linear-gradient(135deg, #0f766e 0%, #0284c7 100%);
    border: none;
    border-radius: var(--radius-sm);
    height: 44px;
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
    cursor: pointer;
    width: 100%;
}

.login-box .btn-primary:hover,
.login-box #loginbutton1:hover,
.login-box #loginbutton2:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15, 118, 110, 0.4);
    filter: brightness(1.05);
}

.login-box .btn-primary:focus,
.login-box #loginbutton1:focus,
.login-box #loginbutton2:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.3);
}

.btn-outline-primary {
    color: var(--color-primary);
    background-color: transparent;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    height: 40px;
    font-size: 14px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    color: #ffffff;
    background-color: var(--color-primary);
}

/* ---- Screen Reader & Utilities ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center !important; }
.font-weight-bold { font-weight: 700 !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.pt-3 { padding-top: 1rem !important; }
.mr-1 { margin-right: .25rem !important; }
.mr-2 { margin-right: .5rem !important; }

/* ---- Inline SVG Icons (Zero webfont overhead) ---- */
.fas, .fa {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -.125em;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.fa-envelope {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='%230f766e'%3E%3Cpath d='M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z'/%3E%3C/svg%3E");
}

.fa-lock {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512' fill='%230f766e'%3E%3Cpath d='M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z'/%3E%3C/svg%3E");
}

.fa-building {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512' fill='%230f766e'%3E%3Cpath d='M436 480h-20V24c0-13.3-10.7-24-24-24H56C42.7 0 32 10.7 32 24v456H12c-6.6 0-12 5.4-12 12v20h448v-20c0-6.6-5.4-12-12-12zM128 76c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12V76zm0 96c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zm52 148h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm76 160h-64v-84c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v84zm64-172c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40z'/%3E%3C/svg%3E");
}

.fa-database {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512' fill='%230f766e'%3E%3Cpath d='M448 73.143v45.714C448 159.143 347.667 192 224 192S0 159.143 0 118.857V73.143C0 32.857 100.333 0 224 0s224 32.857 224 73.143zM448 176v102.857C448 319.143 347.667 352 224 352S0 319.143 0 278.857V176c48.125 33.143 136.208 48.572 224 48.572S399.874 209.143 448 176zm0 160v102.857C448 479.143 347.667 512 224 512S0 479.143 0 438.857V336c48.125 33.143 136.208 48.572 224 48.572S399.874 369.143 448 336z'/%3E%3C/svg%3E");
}

.fa-spinner {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='%23ffffff'%3E%3Cpath d='M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z'/%3E%3C/svg%3E");
}

.fa-spin { animation: vg-fa-spin 2s linear infinite; }

@keyframes vg-fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .fa-spin { animation: none; }
}
