@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa0ZL7SUc.woff2') format('woff2');
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #999;
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    color: #fff;
    background-color: #2a2a2a;
}

.nav-item.active {
    color: #fff;
    background-color: #2a2a2a;
}

.period-btn {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #888;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.period-btn:hover {
    color: #ccc;
}

.period-btn.active {
    color: #fff;
    border-color: #444;
    background: #2a2a2a;
}

.stat-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 0.5rem;
    padding: 1rem;
}

.stat-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-top: 0.25rem;
}

.data-table {
    width: 100%;
    font-size: 0.8125rem;
}

.data-table th {
    text-align: left;
    font-weight: 600;
    color: #666;
    padding: 0.5rem 0;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #2a2a2a;
}

.data-table td {
    padding: 0.625rem 0;
    color: #ccc;
    border-bottom: 1px solid #1f1f1f;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table .text-right {
    text-align: right;
}

.card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 0.5rem;
    padding: 1.25rem;
}

.card-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 0.75rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 28rem;
    margin: 1rem;
}

.form-input {
    width: 100%;
    background: #0f0f0f;
    border: 1px solid #333;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.form-input:focus {
    border-color: #555;
}

.form-input::placeholder {
    color: #555;
}

.btn-primary {
    background: #fff;
    color: #000;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: transparent;
    color: #888;
    font-weight: 500;
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid #333;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
    color: #ccc;
    border-color: #555;
}

.online-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    color: #666;
    text-align: center;
}

.mobile-menu-btn {
    display: none;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        z-index: 40;
        transition: left 0.2s;
        width: 16rem !important;
    }

    .sidebar.open {
        left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 30;
    }

    .sidebar-overlay.open {
        display: block;
    }
}

.tracking-code {
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.75rem;
    color: #aaa;
    white-space: pre-wrap;
    word-break: break-all;
    user-select: all;
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #2a2a2a;
    border: 1px solid #444;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    z-index: 60;
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.toast.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
