body {
    margin: 0;
    background: #0b1118;
    color: #f6f7fb;
    font-family: "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: #f3c45b;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.visit-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px clamp(16px, 4vw, 42px);
    background: rgba(11, 17, 24, .94);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(12px);
}

.visit-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.visit-brand:hover {
    color: #fff;
    text-decoration: none;
}

.visit-brand img {
    width: 132px;
    height: 44px;
    object-fit: contain;
    object-position: left center;
}

.visit-brand b {
    display: block;
    font-weight: 900;
    line-height: 1.1;
}

.visit-brand small {
    display: block;
    color: #8b98aa;
    font-size: .78rem;
}

.visit-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.visit-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 12px;
    color: #d5dce7;
    background: #141d28;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    font-weight: 800;
}

.visit-nav a:hover,
.visit-nav a.active {
    color: #111827;
    background: #f3c45b;
    border-color: #f3c45b;
    text-decoration: none;
}

.shell,
.analytics-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.panel,
.analytics-panel,
.stat-card,
.analytics-summary article {
    background: #141d28;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
}

.panel {
    padding: 20px;
}

.stat-card {
    min-height: 132px;
    padding: 18px;
}

.stat-label,
.analytics-summary span {
    color: #9ba8b8;
    font-size: .9rem;
}

.stat-value,
.analytics-summary strong {
    display: block;
    margin: .35rem 0;
    color: #f3c45b;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

.fw-black {
    font-weight: 800;
}

.text-break-any {
    word-break: break-all;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: #eef2f7;
    --bs-table-border-color: rgba(255, 255, 255, .1);
    --bs-table-hover-bg: rgba(255, 255, 255, .06);
    --bs-table-hover-color: #fff;
}

.table a {
    font-weight: 700;
}

.form-control,
.form-select {
    background: #0d1520;
    border-color: rgba(255, 255, 255, .16);
    color: #fff;
}

.form-control::placeholder {
    color: #6f7c8d;
}

.form-control:focus,
.form-select:focus {
    background: #0d1520;
    border-color: #f3c45b;
    box-shadow: 0 0 0 .2rem rgba(243, 196, 91, .16);
    color: #fff;
}

.page-link {
    color: #f3c45b;
    background: #141d28;
    border-color: rgba(255, 255, 255, .12);
}

.page-link:hover {
    color: #111827;
    background: #f3c45b;
    border-color: #f3c45b;
    text-decoration: none;
}

.page-item.active .page-link {
    color: #111827;
    background: #f3c45b;
    border-color: #f3c45b;
}

.text-muted {
    color: #8b98aa !important;
}

.analytics-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.analytics-kicker {
    margin-bottom: 6px;
    color: #f3c45b;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.analytics-actions {
    min-width: 180px;
}

.analytics-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.analytics-summary article {
    padding: 18px;
}

.analytics-panel {
    overflow: hidden;
    padding: 0;
}

.analytics-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.analytics-panel-head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.analytics-table th,
.analytics-table td {
    white-space: nowrap;
}

.analytics-label {
    max-width: 420px;
    white-space: normal;
}

.analytics-tabs {
    gap: 8px;
    margin-bottom: 14px;
}

.analytics-tabs .nav-link {
    color: #d5dce7;
    background: #141d28;
    border: 1px solid rgba(255, 255, 255, .1);
}

.analytics-tabs .nav-link.active {
    color: #111827;
    background: #f3c45b;
    border-color: #f3c45b;
}

@media (max-width: 768px) {
    .visit-topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .visit-nav {
        width: 100%;
        margin-left: 0;
        overflow-x: auto;
    }

    .visit-nav a {
        white-space: nowrap;
    }

    .analytics-hero {
        display: block;
    }

    .analytics-actions {
        margin-top: 16px;
    }

    .analytics-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
