* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Inter', -apple-system, sans-serif; 
    background: #0a0a0a; 
    color: #fafafa;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #111;
    border-right: 1px solid #222;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}
.logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    margin-bottom: 2rem;
    display: block;
}
.nav-section { margin-bottom: 1.5rem; }
.nav-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #555;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    color: #888;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
    transition: all 0.15s;
}
.nav-item:hover { background: #1a1a1a; color: #fff; }
.nav-item.active { background: #1a1a1a; color: #fff; }
.nav-icon { font-size: 1rem; }
.user-section {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #222;
}
.user-info { display: flex; align-items: center; gap: 0.75rem; }
.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}
.user-name { font-size: 0.9rem; }
.user-email { font-size: 0.75rem; color: #666; }

/* Main Content */
.main {
    flex: 1;
    padding: 2rem;
    margin-left: 260px;
    overflow-y: auto;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.header h1 { font-size: 1.75rem; font-weight: 600; }
.header-actions { display: flex; gap: 0.75rem; }

/* Buttons */
.btn {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s;
}
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
}
.btn-secondary:hover { border-color: #555; }
.btn-icon {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
}
.btn-icon:hover { color: #fff; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
.btn-danger { background: #dc2626; }
.btn-success { background: #16a34a; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 1.5rem;
}
.stat-label { color: #666; font-size: 0.85rem; margin-bottom: 0.5rem; }
.stat-value { font-size: 2rem; font-weight: 700; }
.stat-change { font-size: 0.8rem; margin-top: 0.5rem; }
.stat-change.up { color: #22c55e; }
.stat-change.down { color: #ef4444; }

/* Cards */
.card {
    background: #111;
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #222;
}
.card-title { font-size: 1.1rem; font-weight: 600; }
.card-body { padding: 1.5rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td {
    text-align: left;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #1a1a1a;
}
th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
    font-weight: 500;
    letter-spacing: 0.05em;
}
td { font-size: 0.9rem; }
tr { cursor: pointer; transition: background 0.15s; }
tr:hover { background: #0d0d0d; }

.customer-name { display: flex; align-items: center; gap: 0.75rem; }
.customer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
}
.customer-domain { color: #888; font-size: 0.8rem; }

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}
.status-active { background: #052e16; color: #22c55e; }
.status-trial { background: #1e1b4b; color: #818cf8; }
.status-paused { background: #1c1917; color: #a8a29e; }
.status-draft { background: #1a1a1a; color: #888; }
.status-published { background: #052e16; color: #22c55e; }

/* Filters */
.filters-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.search-input {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: #fff;
    font-size: 0.85rem;
    width: 280px;
}
.search-input::placeholder { color: #555; }
.search-input:focus { outline: none; border-color: #6366f1; }
.filter-select {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
}
.filter-select:focus { outline: none; border-color: #6366f1; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 0.5rem;
}
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
}
.form-input:focus { outline: none; border-color: #6366f1; }
.form-input::placeholder { color: #555; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-help { font-size: 0.75rem; color: #666; margin-top: 0.5rem; }

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.modal-overlay.show { display: flex; }
.modal {
    background: #111;
    border: 1px solid #333;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #222;
}
.modal-header h2 { font-size: 1.25rem; }
.modal-body { padding: 1.5rem; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #222;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid #222;
    margin-bottom: 1.5rem;
}
.tab {
    padding: 0.75rem 1.25rem;
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
}
.tab:hover { color: #fff; }
.tab.active { color: #fff; border-color: #6366f1; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { color: #fff; margin-bottom: 0.5rem; }
.empty-state p { margin-bottom: 1.5rem; }

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 200;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: #22c55e; }
.toast.error { border-color: #ef4444; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* Traffic bar */
.traffic-bar {
    width: 80px;
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    margin-right: 0.5rem;
    vertical-align: middle;
}
.traffic-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 3px;
}

/* Detail View */
.detail-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.detail-avatar {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
}
.detail-info h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.detail-info p { color: #888; }
.detail-actions { margin-left: auto; display: flex; gap: 0.75rem; }

/* Chart placeholder */
.chart-placeholder {
    height: 200px;
    background: linear-gradient(180deg, rgba(99,102,241,0.1) 0%, transparent 100%);
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 1rem;
}
.chart-bar {
    width: 24px;
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 4px 4px 0 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr; }
    .header { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .filters-bar { flex-wrap: wrap; }
}
