*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: #050505;
    color: #ececec;
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.app-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 14px 24px;
    background: #0a0a0a;
    border-bottom: 1px solid #323232;
}

.app-header-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 11px;
    color: #999;
}

.app-logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #d0d0d0;
}

.app-title-text {
    font-weight: 600;
}

.app-main {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

.app-footer {
    display: flex;
    justify-content: center;
    padding: 12px 24px 16px;
    text-align: right;
    font-size: 11px;
    color: #818181;
    border-top: 1px solid #323232;
    background: #0a0a0a;
}

.muted {
    opacity: 0.8;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
}

.dashboard-sidebar,
.dashboard-main {
    min-width: 0;
}

.dashboard-sidebar {
    display: grid;
    gap: 12px;
    align-content: start;
}

.side-card {
    border: 1px solid #434343;
    border-radius: 14px;
    background: #0f0f0f;
    padding: 14px;
}

.side-section-title {
    margin: 0 0 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #9a9a9a;
}

.metric-stack {
    display: grid;
    gap: 8px;
}

.metric-card {
    border: 1px solid #4d4d4d;
    border-radius: 10px;
    background: #151515;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.metric-label {
    color: #acacac;
    font-size: 12px;
}

.metric-value {
    font-size: 18px;
    font-weight: 600;
    color: #f3f3f3;
}

.stacked-filters {
    display: grid;
    gap: 10px;
}

.field-group {
    display: grid;
    gap: 5px;
}

.field-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #9a9a9a;
}

.field-input {
    width: 100%;
    border: 1px solid #5f5f5f;
    border-radius: 10px;
    padding: 9px 10px;
    background: #0f0f0f;
    color: #ededed;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input::placeholder {
    color: #727272;
}

.field-input:focus {
    border-color: #9b9b9b;
    box-shadow: 0 0 0 1px rgba(180, 180, 180, 0.35);
}

.filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-primary,
.btn-secondary {
    border: 1px solid #666;
    border-radius: 10px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.btn-primary {
    background: #1f1f1f;
    color: #f0f0f0;
    cursor: pointer;
}

.btn-primary:hover {
    background: #272727;
    border-color: #8a8a8a;
}

.btn-secondary {
    background: #131313;
    color: #b9b9b9;
}

.btn-secondary:hover {
    background: #181818;
    border-color: #7d7d7d;
    color: #dfdfdf;
}

.dashboard-main {
    border: 1px solid #434343;
    border-radius: 14px;
    background: #0d0d0d;
    padding: 16px;
    display: grid;
    gap: 14px;
}

.content-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #393939;
}

.content-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.content-subtitle {
    margin: 7px 0 0;
    color: #a3a3a3;
    font-size: 13px;
}

.content-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-pill {
    border: 1px solid #5b5b5b;
    border-radius: 999px;
    padding: 5px 10px;
    background: #161616;
    font-size: 11px;
    color: #cccccc;
    white-space: nowrap;
}

.table-shell {
    border: 1px solid #474747;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
}

.table-header-row,
.table-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1.4fr;
    gap: 0;
}

.table-header-row {
    border-bottom: 1px solid #3f3f3f;
    background: #161616;
}

.table-body {
    max-height: 560px;
    overflow: auto;
}

.table-row {
    border-bottom: 1px solid #2d2d2d;
    background: #101010;
}

.table-row:last-of-type {
    border-bottom: none;
}

.table-row:hover {
    background: #181818;
}

.cell {
    min-width: 0;
    padding: 11px 12px;
    display: flex;
    align-items: center;
}

.table-header-row .cell {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 10px;
    color: #9b9b9b;
}

.cell--pc {
    font-weight: 600;
}

.cell--ip {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: #c4c4c4;
    font-size: 12px;
}

.cell--time {
    color: #ababab;
    font-size: 12px;
}

.pill-country {
    border: 1px solid #666;
    border-radius: 999px;
    padding: 3px 10px;
    background: #1a1a1a;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: #ddd;
}

.table-empty {
    padding: 26px 16px;
    text-align: center;
    color: #8f8f8f;
    font-size: 13px;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.pager-link {
    border: 1px solid #5c5c5c;
    border-radius: 8px;
    padding: 6px 10px;
    color: #e2e2e2;
    text-decoration: none;
    background: #151515;
    font-size: 12px;
}

.pager-link:hover {
    background: #1d1d1d;
}

.pager-current {
    border: 1px solid #5c5c5c;
    border-radius: 8px;
    padding: 6px 10px;
    background: #151515;
    font-size: 12px;
    color: #b8b8b8;
}

@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .app-main {
        padding: 14px;
    }

    .dashboard-main {
        padding: 12px;
    }

    .content-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-header-row,
    .table-row {
        grid-template-columns: 1.4fr 1.2fr 0.9fr 1.2fr;
    }

    .cell {
        padding: 9px 8px;
        font-size: 12px;
    }
}
