@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ═══════════════════════════════════════════
   CYBERSECURITY BACKGROUND
═══════════════════════════════════════════ */

/* Canvas — particle network */
.bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Scan line sweep */
.bg-scanline {
    position: fixed;
    left: 0; right: 0;
    height: 140px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(120,120,120,0.06) 40%,
        rgba(120,120,120,0.10) 50%,
        rgba(120,120,120,0.06) 60%,
        transparent 100%);
    pointer-events: none;
    z-index: 0;
    animation: scanMove 12s linear infinite;
}

@keyframes scanMove {
    0%   { top: -140px; opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { top: 100vh; opacity: 0; }
}


/* ═══════════════════════════════════════════
   LOGIN PAGE CUSTOM MODAL
═══════════════════════════════════════════ */
.lp-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.lp-modal-overlay.open { display: flex; animation: lpFadeIn 0.15s ease; }

@keyframes lpFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lp-modal {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 28px 28px;
    width: min(340px, 90vw);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    animation: lpSlideUp 0.18s ease;
}

@keyframes lpSlideUp {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.lp-modal__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.lp-modal__icon svg { width: 26px; height: 26px; }

.lp-modal__icon--error {
    background: #fef2f2;
    color: #dc2626;
}
.lp-modal__icon--warn {
    background: #fffbeb;
    color: #d97706;
}
.lp-modal__icon--info {
    background: #eff6ff;
    color: #2563eb;
}

.lp-modal__title {
    font-size: 17px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.lp-modal__msg {
    font-size: 13.5px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 24px;
}

.lp-modal__ok {
    width: 100%;
    padding: 11px;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(249,115,22,0.35);
}
.lp-modal__ok:hover {
    background: #ea6c0a;
    box-shadow: 0 6px 20px rgba(249,115,22,0.45);
}

/* ═══════════════════════════════════════════
   BODY
═══════════════════════════════════════════ */
body {
    height: 100vh;
    background: #f0ede8;
    background-image:
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(249,115,22,0.10) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 85% 80%, rgba(249,115,22,0.07) 0%, transparent 55%),
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(0,0,0,0.04)'/%3E%3C/svg%3E");
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Glowing orbs for depth */
body::before {
    content: '';
    position: fixed;
    top: -200px; left: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(249,115,22,0.12) 0%, transparent 65%);
    pointer-events: none;
    animation: floatOrb 12s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    bottom: -150px; right: -150px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(249,115,22,0.09) 0%, transparent 60%);
    pointer-events: none;
    animation: floatOrb 16s ease-in-out infinite reverse;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(20px, -20px); }
}

/* ═══════════════════════════════════════════
   PAGE TOP BAR  (AuditPro left, Logo right)
═══════════════════════════════════════════ */
.page-top-bar {
    position: fixed;
    top: 10px; left: 0; right: 0;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 44px;
    z-index: 100;
}

/* ── AuditPro brand ── */
.page-top-bar__brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ptb-logo-box {
    width: 58px;
    height: 58px;
    background: #f97316;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 18px rgba(249,115,22,0.40);
}

.ptb-name {
    display: block;
    font-size: 30px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.ptb-name span { color: #f97316; }

.ptb-tag {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

/* ── Client logo ── */
.ptb-logo-wrapper {
    background: #f0ede8;
    display: flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
}

.ptb-client-logo {
    height: 100px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* ═══════════════════════════════════════════
   LOGIN CARD
═══════════════════════════════════════════ */
.login-card {
    width: min(440px, 93vw);
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.04),
        0 4px 12px rgba(0,0,0,0.07),
        0 16px 40px rgba(0,0,0,0.10),
        0 40px 80px rgba(0,0,0,0.07);
    position: relative;
    z-index: 1;
    /* No forwards/both fill-mode: the entrance animation's end state
       (opacity:1, transform:none) is identical to this rule's own static
       styles, so dropping the fill keeps the same visual entrance while
       letting the computed transform revert to `none` once it finishes.
       A lingering `transform` here (even an identity translateY(0)scale(1))
       would establish a new containing block for this card's descendants,
       which breaks position:fixed for anything nested inside it — including
       Google's reCAPTCHA challenge popup, which lives inside the login
       form and needs to size/center itself against the real viewport, not
       this ~440px card. */
    animation: cardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Orange accent bar at top of card */
.login-card::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #f97316 0%, #fb923c 50%, #fdba74 100%);
}

/* ── VIEW WRAPPER ── */
.lv-view {
    padding: 30px 34px 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── VIEW TOP: icon + title + subtitle ── */
.lv-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 4px;
}

.lv-icon {
    width: 46px;
    height: 46px;
    background: rgba(249,115,22,0.12);
    border: 1.5px solid rgba(249,115,22,0.28);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f97316;
    margin-bottom: 10px;
}

.lv-icon svg { width: 22px; height: 22px; }

.lv-title {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.lv-sub {
    font-size: 13.5px;
    color: #9ca3af;
    font-weight: 400;
}

/* ── BACK BUTTON ── */
.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: transparent;
    color: #6b7280;
    border: 1.5px solid #e5e5e5;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.back-btn:hover {
    background: #f5f5f5;
    color: #1a1a1a;
    border-color: #d1d5db;
}

/* ── SUCCESS BOX ── */
.login-success {
    display: none;
    align-items: center;
    gap: 9px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 3px solid #16a34a;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #15803d;
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   ERROR BOX
═══════════════════════════════════════════ */
.login-error {
    display: none;
    align-items: center;
    gap: 9px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 3px solid #ef4444;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #dc2626;
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   FORM FIELDS
═══════════════════════════════════════════ */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-group label {
    font-size: 11.5px;
    font-weight: 700;
    color: #525252;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.forgot-link {
    font-size: 12px;
    font-weight: 600;
    color: #f97316;
    text-decoration: none;
    transition: color 0.15s;
}

.forgot-link:hover { color: #ea6c0a; }

/* ── Input wrapper ── */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #9ca3af;
    pointer-events: none;
    flex-shrink: 0;
}

.login-card input {
    width: 100%;
    padding: 11px 40px 11px 40px;
    border: 1.5px solid #e5e5e5;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a1a;
    background: #f9f9f9;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    -moz-appearance: textfield;
}

.login-card input::-webkit-outer-spin-button,
.login-card input::-webkit-inner-spin-button { -webkit-appearance: none; }

.login-card input::placeholder { color: #c4c4c4; font-size: 13.5px; }

.login-card input:focus {
    border-color: #f97316;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.13);
}

/* Icon turns orange when sibling input is focused */
.input-wrapper:focus-within .input-icon {
    color: #f97316;
    transition: color 0.18s;
}

/* Fix WebKit autofill making text invisible */
.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1a1a1a;
    -webkit-box-shadow: 0 0 0px 1000px #f9f9f9 inset;
    caret-color: #1a1a1a;
}

.toggle-pass {
    position: absolute;
    right: 11px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #b0b0b0;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.toggle-pass:hover { color: #525252; }
.toggle-pass svg { width: 15px; height: 15px; }

.recaptcha-group {
    display: flex;
    justify-content: center;
    /* g-recaptcha renders at a fixed ~304px width — clip gracefully on
       narrower viewports instead of overflowing the card. */
    overflow-x: auto;
}


/* ═══════════════════════════════════════════
   CREATE ACCOUNT | FORGOT PASSWORD ROW
═══════════════════════════════════════════ */
.login-links-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -2px;
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    color: #525252;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s;
}

.link-btn:hover { color: #f97316; }

/* ═══════════════════════════════════════════
   SIGN IN BUTTON
═══════════════════════════════════════════ */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: opacity 0.18s, transform 0.14s, box-shadow 0.18s;
    box-shadow: 0 4px 18px rgba(249,115,22,0.42);
    margin-top: 2px;
    position: relative;
    overflow: hidden;
}

.login-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
    pointer-events: none;
}

.login-btn svg { width: 17px; height: 17px; position: relative; z-index: 1; }

.login-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(249,115,22,0.52);
}

.login-btn:active { transform: translateY(0); }

/* ═══════════════════════════════════════════
   DIVIDER
═══════════════════════════════════════════ */
.or-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #c4c4c4;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ebebeb;
}

/* ═══════════════════════════════════════════
   SIGN IN WITH GOOGLE BUTTON
═══════════════════════════════════════════ */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 20px;
    background: #ffffff;
    color: #3c4043;
    border: 1.5px solid #dadce0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.google-btn:hover {
    background: #f8f9fa;
    border-color: #c6c8ca;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.google-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════
   EMAIL LOGIN PANEL (Google email flow)
═══════════════════════════════════════════ */
.email-login-panel {
    display: none;
    flex-direction: column;
    gap: 8px;
    background: #f9f9f9;
    border: 1.5px solid #e5e5e5;
    border-radius: 10px;
    padding: 14px;
    margin-top: 4px;
    animation: slideDown 0.18s ease;
}

.email-login-panel.open { display: flex; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.email-login-error {
    display: none;
    font-size: 12px;
    color: #dc2626;
    font-weight: 500;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 7px 10px;
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11.5px;
    color: #b0b0b0;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
    margin-top: 2px;
}

.login-footer svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ═══════════════════════════════════════════
   LEGACY SAFETY
═══════════════════════════════════════════ */
.main-card      { display: none; }
.login-section  { display: none; }
.image-section  { display: none; }
.options        { display: flex; justify-content: space-between; margin-top: 15px; font-size: 14px; }
.options a      { text-decoration: none; color: #333; }
.page-container { padding: 30px; }
.welcome-box    { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.table-container{ background: white; padding: 20px; border-radius: 10px; overflow-x: auto; }
#reportTable    { width: 100%; border-collapse: collapse; }
#reportTable th { background: #f1f5f9; padding: 12px; text-align: left; }
#reportTable td { padding: 10px; border-bottom: 1px solid #e2e8f0; }
