/* Auth/Admin styles — extends main.css for login.php + admin.php */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300..800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bp-bg:        #020715;
    --bp-bg-2:      #050b1f;
    --bp-ink:       #d8e6f5;
    --bp-ink-dim:   #7f93b3;
    --bp-ink-faint: #4d5e7d;
    --bp-cyan:      #61d9ff;
    --bp-cyan-soft: #8fb6ff;
    --bp-glass:     rgba(8, 14, 30, 0.62);
    --bp-line:      rgba(120, 170, 220, 0.12);
    --bp-line-2:    rgba(120, 170, 220, 0.22);
    --bp-danger:    #ff7a8a;
}

body.auth-page,
body.admin-page {
    font-family: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--bp-ink);
    font-feature-settings: "ss01", "ss02", "cv11";
    -webkit-font-smoothing: antialiased;
}

body.auth-page { display: block; overflow: hidden; }
body.admin-page { display: block; overflow: auto; }

/* ===== shared corner wordmark ===== */
.bp-corner-mark {
    position: fixed;
    top: 24px;
    left: 28px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Bricolage Grotesque', sans-serif;
    text-decoration: none;
    user-select: none;
}
.bp-mark-img {
    width: 52px;
    height: 52px;
    display: block;
}
.bp-mark-text {
    display: grid;
    line-height: 1;
    gap: 6px;
}
.bp-mark-name {
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.014em;
    line-height: 1;
}
.bp-mark-name .bit  { color: #d8f6ff; text-shadow: 0 0 14px rgba(97, 217, 255, 0.32); }
.bp-mark-name .push { color: var(--bp-cyan); text-shadow: 0 0 18px rgba(97, 217, 255, 0.40); }
.bp-mark-sub {
    font-size: 11px;
    letter-spacing: 0.30em;
    text-transform: uppercase;
    font-weight: 600;
    line-height: 1;
    background: linear-gradient(90deg, #d8f6ff, #61d9ff, #8fb6ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 8px rgba(97, 217, 255, 0.22));
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.bp-auth-wrap {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 80px 24px 40px;
}

.bp-auth-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--bp-glass);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    border-radius: 22px;
    padding: 44px 40px 36px;
    box-shadow:
        0 30px 80px -20px rgba(0, 0, 0, 0.7),
        0 0 0 1px var(--bp-line) inset,
        0 1px 0 rgba(255, 255, 255, 0.04) inset;
    isolation: isolate;
    animation: bp-card-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.bp-auth-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 23px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(97, 217, 255, 0.45) 0%,
        rgba(143, 182, 255, 0.08) 30%,
        rgba(255, 255, 255, 0.02) 60%,
        rgba(97, 217, 255, 0.30) 100%
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: -1;
}

.bp-auth-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: radial-gradient(
        ellipse 100% 60% at 50% -20%,
        rgba(97, 217, 255, 0.16),
        transparent 60%
    );
    pointer-events: none;
    z-index: -1;
}

.bp-auth-mark {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
    animation: bp-fade-up 0.6s 0.05s cubic-bezier(0.2,0.8,0.2,1) both;
}
.bp-auth-mark svg {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 0 18px rgba(97, 217, 255, 0.45));
}

.bp-auth-title {
    margin: 0 0 6px;
    text-align: center;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.08;
    color: #ecf4ff;
    animation: bp-fade-up 0.6s 0.10s cubic-bezier(0.2,0.8,0.2,1) both;
}

.bp-auth-sub {
    margin: 0 0 32px;
    text-align: center;
    font-size: 14.5px;
    color: var(--bp-ink-dim);
    font-weight: 400;
    letter-spacing: 0;
    animation: bp-fade-up 0.6s 0.15s cubic-bezier(0.2,0.8,0.2,1) both;
}

.bp-form {
    display: grid;
    gap: 14px;
}
.bp-field {
    animation: bp-fade-up 0.6s cubic-bezier(0.2,0.8,0.2,1) both;
}
.bp-field:nth-of-type(1) { animation-delay: 0.20s; }
.bp-field:nth-of-type(2) { animation-delay: 0.26s; }

.bp-label {
    display: block;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--bp-ink-faint);
    margin-bottom: 7px;
    font-weight: 500;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.bp-input {
    width: 100%;
    background: rgba(2, 7, 21, 0.55);
    border: 1px solid var(--bp-line);
    border-radius: 12px;
    padding: 13px 15px;
    font: inherit;
    font-size: 15.5px;
    font-weight: 400;
    color: var(--bp-ink);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    -webkit-text-fill-color: var(--bp-ink);
}
.bp-input::placeholder {
    color: var(--bp-ink-faint);
}
.bp-input:hover {
    border-color: var(--bp-line-2);
}
.bp-input:focus {
    outline: none;
    border-color: rgba(97, 217, 255, 0.55);
    background: rgba(4, 12, 30, 0.7);
    box-shadow:
        0 0 0 4px rgba(97, 217, 255, 0.10),
        0 0 24px -6px rgba(97, 217, 255, 0.35);
}
.bp-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgba(2,7,21,0.95) inset !important;
    -webkit-text-fill-color: var(--bp-ink) !important;
}

.bp-error {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--bp-danger);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: bp-fade-up 0.3s both;
}
.bp-error::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bp-danger);
    box-shadow: 0 0 10px rgba(255, 122, 138, 0.7);
}

/* ===== remember-me ===== */
.bp-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    margin: 6px 0 2px;
    font-size: 13.5px;
    color: var(--bp-ink-dim);
    animation: bp-fade-up 0.6s 0.30s cubic-bezier(0.2,0.8,0.2,1) both;
}
.bp-remember input {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}
.bp-remember-box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid var(--bp-line-2);
    background: rgba(2, 7, 21, 0.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    flex-shrink: 0;
}
.bp-remember-box svg {
    width: 12px;
    height: 12px;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.bp-remember input:focus-visible + .bp-remember-box {
    box-shadow: 0 0 0 3px rgba(97, 217, 255, 0.20);
    border-color: rgba(97, 217, 255, 0.55);
}
.bp-remember:hover .bp-remember-box {
    border-color: rgba(97, 217, 255, 0.40);
}
.bp-remember input:checked + .bp-remember-box {
    background: linear-gradient(180deg, #74e0ff, #4cc5f0);
    border-color: rgba(97, 217, 255, 0.7);
    box-shadow: 0 0 14px -2px rgba(97, 217, 255, 0.6);
}
.bp-remember input:checked + .bp-remember-box svg {
    opacity: 1;
    transform: scale(1);
}
.bp-remember-text { line-height: 1.2; }

/* ===== click-to-verify captcha ===== */
.bp-captcha {
    --cap-bg: rgba(2, 7, 21, 0.55);
    --cap-border: var(--bp-line-2);
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    margin-top: 6px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 14px;
    align-items: center;
    background: var(--cap-bg);
    border: 1px solid var(--cap-border);
    border-radius: 12px;
    font: inherit;
    color: var(--bp-ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    animation: bp-fade-up 0.6s 0.36s cubic-bezier(0.2,0.8,0.2,1) both;
}
.bp-captcha:hover:not(.is-verified):not(.is-checking) {
    border-color: rgba(97, 217, 255, 0.40);
}
.bp-captcha:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(97, 217, 255, 0.20);
    border-color: rgba(97, 217, 255, 0.55);
}

.bp-captcha-check {
    position: relative;
    width: 24px;
    height: 24px;
    border: 1.6px solid var(--bp-line-2);
    border-radius: 6px;
    background: rgba(2, 7, 21, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: var(--bp-cyan);
}
.bp-captcha-check svg {
    position: absolute;
    width: 18px;
    height: 18px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.bp-captcha-spinner { opacity: 0; transform: scale(0.7); }
.bp-captcha-tick    { opacity: 0; transform: scale(0.4); color: #03131d; }

.bp-captcha.is-checking .bp-captcha-check {
    border-color: rgba(97, 217, 255, 0.5);
}
.bp-captcha.is-checking .bp-captcha-spinner {
    opacity: 1;
    transform: scale(1);
    animation: bp-spin 0.7s linear infinite;
}
.bp-captcha.is-verified .bp-captcha-check {
    background: linear-gradient(180deg, #74e0ff, #4cc5f0);
    border-color: rgba(97, 217, 255, 0.85);
    box-shadow: 0 0 16px -2px rgba(97, 217, 255, 0.55);
}
.bp-captcha.is-verified .bp-captcha-tick {
    opacity: 1;
    transform: scale(1);
}

.bp-captcha-text {
    display: grid;
    line-height: 1.15;
    gap: 3px;
}
.bp-captcha-label {
    font-family: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: 0;
    color: #ecf4ff;
}
.bp-captcha-hint {
    font-family: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12.5px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--bp-ink-dim);
}
.bp-captcha.is-verified .bp-captcha-hint { color: #4cd964; }

@keyframes bp-spin {
    to { transform: scale(1) rotate(360deg); }
}

/* ===== product header ===== */
.bp-product-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}
.bp-product-head .bp-hello { margin: 0 0 8px; }
.bp-product-head .bp-tagline { margin: 0; max-width: 700px; }
.bp-product-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid var(--bp-line-2);
    background: rgba(2, 7, 21, 0.55);
    color: var(--bp-ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.bp-product-link:hover {
    border-color: var(--bp-cyan);
    color: #ecf4ff;
    background: rgba(97, 217, 255, 0.08);
}
.bp-product-link svg { opacity: 0.7; }

/* ===== category chip ===== */
.bp-cat-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    line-height: 1.5;
    margin-right: 8px;
    vertical-align: middle;
    background: rgba(97, 217, 255, 0.10);
    color: var(--bp-cyan);
    border: 1px solid rgba(97, 217, 255, 0.20);
}
.bp-cat-chip[data-cat="Lifecycle"]    { background: rgba(143, 182, 255, 0.10); color: #8fb6ff; border-color: rgba(143, 182, 255, 0.22); }
.bp-cat-chip[data-cat="Devices"]      { background: rgba(76, 217, 100, 0.10);  color: #6ee087; border-color: rgba(76, 217, 100, 0.22); }
.bp-cat-chip[data-cat="Connections"]  { background: rgba(255, 178, 95, 0.10);  color: #ffba6e; border-color: rgba(255, 178, 95, 0.22); }
.bp-cat-chip[data-cat="LAN Activity"] { background: rgba(216, 142, 255, 0.10); color: #d28dff; border-color: rgba(216, 142, 255, 0.22); }
.bp-cat-chip[data-cat="Settings"]     { background: rgba(120, 170, 220, 0.10); color: #9cb8d4; border-color: rgba(120, 170, 220, 0.22); }
.bp-cat-chip[data-cat="Auto"]         { background: rgba(255, 122, 138, 0.10); color: #ff9ba9; border-color: rgba(255, 122, 138, 0.22); }

/* ===== inline tags ===== */
.bp-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(120, 170, 220, 0.10);
    color: var(--bp-ink-dim);
    border: 1px solid var(--bp-line-2);
}
.bp-tag-ok   { background: rgba(76, 217, 100, 0.10);  color: #6ee087; border-color: rgba(76, 217, 100, 0.22); }
.bp-tag-bad  { background: rgba(255, 122, 138, 0.10); color: #ff9ba9; border-color: rgba(255, 122, 138, 0.22); }
.bp-tag-live { background: rgba(97, 217, 255, 0.10);  color: var(--bp-cyan); border-color: rgba(97, 217, 255, 0.30); }

/* ===== mini-breakdowns inside the right-column panel ===== */
.bp-mini-breakdowns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--bp-line);
}
.bp-mini-breakdowns .bp-bd-rows { gap: 5px; }
.bp-mini-breakdowns .bp-bd-row { font-size: 12.5px; padding: 4px 0; }
.bp-mini-breakdowns .bp-bd-count { font-size: 11px; }

@media (max-width: 860px) {
    .bp-mini-breakdowns { grid-template-columns: 1fr; gap: 12px; }
}

/* ===== event stream ===== */
.bp-events {
    display: grid;
    gap: 4px;
}
.bp-event {
    display: grid;
    grid-template-columns: 92px 1fr 180px;
    align-items: start;
    gap: 16px;
    padding: 12px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s;
}
.bp-event + .bp-event { border-top: 1px solid var(--bp-line); border-top-left-radius: 0; border-top-right-radius: 0; }
.bp-event:hover { background: rgba(97, 217, 255, 0.03); border-color: var(--bp-line); }
.bp-event.is-new { animation: bp-event-flash 1.6s ease-out; }

.bp-event-time {
    font-size: 11.5px;
    color: var(--bp-ink-dim);
    padding-top: 2px;
}
.bp-event-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-width: 0;
}
.bp-event-key {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--bp-cyan-soft);
    word-break: break-all;
}
.bp-event-name {
    font-size: 12.5px;
    color: var(--bp-ink-dim);
}
.bp-event-install {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    font-size: 11.5px;
    color: var(--bp-ink-dim);
}
.bp-event-install .mono { color: var(--bp-cyan-soft); }
.bp-event-version {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 999px;
    border: 1px solid var(--bp-line);
    color: var(--bp-ink-dim);
}

.bp-event-props {
    grid-column: 2 / 4;
    margin-top: 4px;
}
.bp-event-props summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--bp-ink-faint);
    padding: 4px 0;
}
.bp-event-props summary::-webkit-details-marker { display: none; }
.bp-event-props summary::before {
    content: "▸";
    font-size: 9px;
    color: var(--bp-cyan);
    transition: transform 0.18s ease;
}
.bp-event-props[open] summary::before { transform: rotate(90deg); }
.bp-event-props-peek {
    font-size: 11.5px;
    color: var(--bp-ink-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.bp-event-props pre {
    margin: 6px 0 0;
    padding: 12px 14px;
    background: rgba(2, 7, 21, 0.65);
    border: 1px solid var(--bp-line);
    border-radius: 8px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--bp-ink);
    overflow-x: auto;
}

@keyframes bp-event-flash {
    0%   { background: rgba(97, 217, 255, 0.18); }
    100% { background: rgba(97, 217, 255, 0); }
}

@media (max-width: 860px) {
    .bp-event { grid-template-columns: 80px 1fr; }
    .bp-event-install { grid-column: 2; justify-content: flex-start; }
    .bp-event-props { grid-column: 1 / 3; }
    .bp-product-head { flex-direction: column; }
}

/* ===== row-link + cell-link ===== */
.bp-cell-link {
    color: var(--bp-cyan-soft);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: color 0.15s, border-color 0.15s;
}
.bp-cell-link:hover {
    color: var(--bp-cyan);
    border-bottom-color: rgba(97, 217, 255, 0.45);
}

/* ===== breadcrumb back link ===== */
.bp-breadcrumb {
    margin: 0 0 14px;
    font-size: 13px;
}
.bp-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--bp-ink-dim);
    text-decoration: none;
    padding: 6px 10px 6px 6px;
    border-radius: 6px;
    transition: color 0.18s, background 0.18s;
}
.bp-breadcrumb a:hover {
    color: var(--bp-cyan);
    background: rgba(97, 217, 255, 0.06);
}
.bp-breadcrumb svg { opacity: 0.7; }
.bp-tagline-meta {
    color: var(--bp-ink-dim);
    margin-left: 10px;
    font-size: 13.5px;
}
.bp-tagline-meta.mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: var(--bp-ink-faint);
}
.bp-tagline .bp-tag { vertical-align: middle; }

/* ===== timeline ===== */
.bp-timeline {
    list-style: none;
    margin: 0;
    padding: 4px 0 0 0;
    position: relative;
}
.bp-timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 9px;
    width: 1px;
    background: linear-gradient(180deg,
        rgba(97, 217, 255, 0.32),
        rgba(97, 217, 255, 0.12) 30%,
        rgba(97, 217, 255, 0.06) 70%,
        transparent);
}

.bp-tl-session {
    position: relative;
    padding-left: 36px;
    margin-bottom: 6px;
}
.bp-tl-dot {
    position: absolute;
    top: 10px;
    left: 3px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--bp-bg);
    border: 2px solid var(--bp-cyan);
    box-shadow: 0 0 0 3px rgba(2, 7, 21, 1), 0 0 14px rgba(97, 217, 255, 0.55);
    z-index: 1;
}
.bp-tl-dot.is-ok   { border-color: #6ee087; box-shadow: 0 0 0 3px rgba(2, 7, 21, 1), 0 0 12px rgba(110, 224, 135, 0.5); }
.bp-tl-dot.is-bad  { border-color: #ff9ba9; box-shadow: 0 0 0 3px rgba(2, 7, 21, 1), 0 0 12px rgba(255, 155, 169, 0.55); }
.bp-tl-dot.is-live {
    border-color: var(--bp-cyan);
    box-shadow: 0 0 0 3px rgba(2, 7, 21, 1), 0 0 14px rgba(97, 217, 255, 0.7);
    animation: bp-pulse-dot 1.6s ease-in-out infinite;
}
.bp-tl-dot.is-orphan { border-color: var(--bp-ink-faint); box-shadow: 0 0 0 3px rgba(2, 7, 21, 1); }
@keyframes bp-pulse-dot {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(0.78); }
}

.bp-tl-session details {
    border: 1px solid var(--bp-line);
    border-radius: 12px;
    background: rgba(2, 7, 21, 0.42);
    transition: border-color 0.2s, background 0.2s;
}
.bp-tl-session details[open] { border-color: var(--bp-line-2); background: rgba(2, 7, 21, 0.55); }
.bp-tl-session summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    user-select: none;
}
.bp-tl-session summary::-webkit-details-marker { display: none; }
.bp-tl-session summary::before {
    content: "▸";
    color: var(--bp-cyan);
    font-size: 10px;
    margin-right: 10px;
    display: inline-block;
    transition: transform 0.18s ease;
    width: 8px;
}
.bp-tl-session details[open] summary::before { transform: rotate(90deg); }

.bp-tl-session-head {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    vertical-align: middle;
}
.bp-tl-session-when {
    font-size: 12.5px;
    color: var(--bp-ink);
    min-width: 70px;
}
.bp-tl-session-clock {
    font-size: 11.5px;
    color: var(--bp-ink-faint);
}
.bp-tl-session-version {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--bp-line);
    color: var(--bp-ink-dim);
}
.bp-tl-session-stats {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--bp-ink-dim);
    font-family: 'JetBrains Mono', monospace;
}
.bp-tl-session-stats .dot { color: var(--bp-ink-faint); }

.bp-tl-empty {
    padding: 14px 18px;
    font-size: 12.5px;
    color: var(--bp-ink-faint);
    border-top: 1px solid var(--bp-line);
}

.bp-tl-events {
    list-style: none;
    margin: 0;
    padding: 4px 0 12px;
    border-top: 1px solid var(--bp-line);
    position: relative;
}
.bp-tl-events::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 12px;
    left: 22px;
    width: 1px;
    background: var(--bp-line);
}
.bp-tl-event {
    position: relative;
    padding: 8px 14px 8px 38px;
    display: grid;
    grid-template-columns: 76px auto 1fr;
    gap: 10px 12px;
    align-items: center;
    font-size: 12.5px;
}
.bp-tl-event-dot {
    position: absolute;
    top: 14px;
    left: 18px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bp-bg-2);
    border: 1px solid rgba(97, 217, 255, 0.45);
    z-index: 1;
}
.bp-tl-event-clock {
    font-size: 11px;
    color: var(--bp-ink-faint);
}
.bp-tl-event-body {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    min-width: 0;
}
.bp-tl-event .bp-event-props {
    grid-column: 1 / -1;
    margin-top: 4px;
    margin-left: 0;
    padding-left: 0;
}
.bp-tl-event .bp-event-props pre {
    max-width: 100%;
}

@media (max-width: 720px) {
    .bp-tl-event {
        grid-template-columns: 1fr;
        padding-left: 28px;
    }
    .bp-tl-event-dot { left: 12px; }
    .bp-tl-events::before { left: 16px; }
    .bp-tl-session-stats { margin-left: 0; }
}

.bp-submit {
    margin-top: 12px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #74e0ff 0%, #4cc5f0 50%, #2a9fcc 100%);
    color: #03131d;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow:
        0 8px 24px -6px rgba(97, 217, 255, 0.55),
        0 1px 0 rgba(255, 255, 255, 0.45) inset;
    animation: bp-fade-up 0.6s 0.42s cubic-bezier(0.2,0.8,0.2,1) both;
}
.bp-submit:hover {
    transform: translateY(-1px);
    box-shadow:
        0 12px 30px -6px rgba(97, 217, 255, 0.72),
        0 1px 0 rgba(255, 255, 255, 0.55) inset;
    filter: brightness(1.04);
}
.bp-submit:active { transform: translateY(0); filter: brightness(0.96); }
.bp-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.bp-foot {
    margin-top: 22px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bp-ink-faint);
    animation: bp-fade-up 0.6s 0.50s cubic-bezier(0.2,0.8,0.2,1) both;
}
.bp-foot::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4cd964;
    box-shadow: 0 0 10px rgba(76, 217, 100, 0.8);
    margin-right: 8px;
    transform: translateY(-1px);
    animation: bp-pulse 2.4s ease-in-out infinite;
}

/* ============================================================
   ADMIN PAGE
   ============================================================ */
body.admin-page main { display: block; min-height: 100vh; padding: 0; }

.bp-admin {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    margin: 0 auto;
    padding: 116px 28px 60px;
}

.bp-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    background: linear-gradient(180deg, rgba(2,7,21,0.75), rgba(2,7,21,0));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--bp-line);
}
.bp-topbar .bp-corner-mark { position: static; }
.bp-topbar-left {
    display: flex;
    align-items: center;
    gap: 32px;
    min-width: 0;
}
.bp-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.bp-nav a {
    color: var(--bp-ink-dim);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1;
    transition: color 0.18s, background 0.18s;
    position: relative;
}
.bp-nav a:hover { color: var(--bp-ink); background: rgba(97,217,255,0.04); }
.bp-nav a.is-active {
    color: #ecf4ff;
    background: rgba(97, 217, 255, 0.08);
    box-shadow: 0 0 0 1px var(--bp-line-2) inset;
}
.bp-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 12px; right: 12px; bottom: -2px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--bp-cyan), transparent);
}
.bp-userbox {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--bp-ink-dim);
}
.bp-userbox .who { color: var(--bp-ink); font-weight: 500; }
.bp-userbox a {
    color: var(--bp-cyan);
    text-decoration: none;
    border: 1px solid var(--bp-line-2);
    padding: 7px 12px;
    border-radius: 8px;
    transition: border-color 0.2s, background 0.2s;
    font-size: 12.5px;
}
.bp-userbox a:hover { border-color: var(--bp-cyan); background: rgba(97,217,255,0.08); }

.bp-hello {
    margin: 0 0 6px;
    font-size: 38px;
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.35;
    color: #ecf4ff;
    overflow: visible;
}
.bp-hello em {
    display: inline-block;
    font-style: italic;
    font-weight: 300;
    color: var(--bp-cyan);
    background: linear-gradient(90deg, #d8f6ff, #61d9ff, #8fb6ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding: 0 0.28em 0.06em 0.04em;
    margin: 0 -0.24em 0 -0.04em;
}
.bp-tagline {
    margin: 0 0 36px;
    color: var(--bp-ink-dim);
    font-size: 15px;
}

.bp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}
.bp-stat {
    position: relative;
    padding: 22px 22px 20px;
    background: var(--bp-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--bp-line);
    border-radius: 16px;
    overflow: hidden;
}
.bp-stat::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(97,217,255,0.6), transparent);
    opacity: 0.7;
}
.bp-stat .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bp-ink-faint);
    margin-bottom: 10px;
}
.bp-stat .value {
    font-size: 36px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.025em;
    color: #ecf4ff;
    font-variant-numeric: tabular-nums;
}
.bp-stat .delta {
    margin-top: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: var(--bp-ink-dim);
}

.bp-panel {
    background: var(--bp-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--bp-line);
    border-radius: 18px;
    padding: 26px 26px 22px;
    margin-bottom: 24px;
}
.bp-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
}
.bp-panel-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0;
    color: #ecf4ff;
}
.bp-panel-head .sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--bp-ink-faint);
}

.bp-chart {
    width: 100%;
    height: 180px;
    display: block;
}
.bp-chart .bp-axis-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    fill: var(--bp-ink-faint);
}
.bp-chart .bp-area  { fill: url(#bp-area-grad); }
.bp-chart .bp-line  { fill: none; stroke: var(--bp-cyan); stroke-width: 1.6; }
.bp-chart .bp-dot   { fill: var(--bp-cyan); }

.bp-cols {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
}

.bp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.bp-table th, .bp-table td {
    text-align: left;
    padding: 11px 10px;
    border-bottom: 1px solid var(--bp-line);
}
.bp-table th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--bp-ink-faint);
    font-weight: 500;
}
.bp-table td { color: var(--bp-ink); }
.bp-table .mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--bp-ink-dim); }
.bp-table .ip   { font-family: 'JetBrains Mono', monospace; color: var(--bp-cyan-soft); }
.bp-table tr.new td {
    animation: bp-row-flash 1.4s ease-out;
}

.bp-breakdowns {
    display: grid;
    gap: 22px;
}
.bp-bd h3 {
    margin: 0 0 10px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--bp-ink-faint);
    font-weight: 500;
}
.bp-bd-rows {
    display: grid;
    gap: 7px;
}
.bp-bd-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--bp-ink);
    position: relative;
    padding: 6px 0;
}
.bp-bd-bar {
    position: absolute;
    left: 0; bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--bp-cyan), rgba(143, 182, 255, 0.3));
    border-radius: 1px;
    opacity: 0.65;
}
.bp-bd-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: var(--bp-ink-dim);
}

.bp-live {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bp-ink-faint);
}
.bp-live::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #4cd964;
    box-shadow: 0 0 12px rgba(76, 217, 100, 0.9);
    animation: bp-pulse 1.6s ease-in-out infinite;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes bp-card-in {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bp-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes bp-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(0.85); }
}
@keyframes bp-row-flash {
    0%   { background: rgba(97, 217, 255, 0.20); }
    100% { background: rgba(97, 217, 255, 0); }
}

/* ===== responsive ===== */
@media (max-width: 860px) {
    .bp-stats { grid-template-columns: repeat(2, 1fr); }
    .bp-cols  { grid-template-columns: 1fr; }
    .bp-admin { padding: 76px 18px 40px; }
    .bp-hello { font-size: 30px; }
}
@media (max-width: 520px) {
    .bp-stats { grid-template-columns: 1fr 1fr; }
    .bp-auth-card { padding: 36px 26px 28px; border-radius: 18px; }
    .bp-auth-title { font-size: 26px; }
    .bp-corner-mark { top: 16px; left: 16px; gap: 10px; }
    .bp-mark-img { width: 40px; height: 40px; }
    .bp-mark-name { font-size: 18px; }
    .bp-mark-sub  { font-size: 9.5px; letter-spacing: 0.26em; }
    .bp-topbar { padding: 12px 16px; }
}
