* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #eee;
}

#app {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 250px;
    background: #16213e;
    border-right: 1px solid #0f3460;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #0f3460;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    color: #e94560;
}

.nav-links {
    list-style: none;
    padding: 20px 0;
}

.nav-links li {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links li:hover {
    background: #0f3460;
}

.nav-links li.active {
    background: #e94560;
}

.content {
    flex: 1;
    overflow-y: auto;
}

.top-bar {
    background: #16213e;
    padding: 20px;
    border-bottom: 1px solid #0f3460;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar h1 {
    font-size: 1.8rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#api-token-display {
    font-family: monospace;
    font-size: 0.9rem;
    background: #0f3460;
    padding: 5px 10px;
    border-radius: 4px;
}

button {
    background: #e94560;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #ff6b6b;
}

button.danger {
    background: #c0392b;
}

button.danger:hover {
    background: #e74c3c;
}

.tab {
    display: none;
    padding: 20px;
}

.tab.active {
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #16213e;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #e94560;
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
}

.chart-container {
    background: #16213e;
    padding: 20px;
    border-radius: 8px;
    height: 400px;
}

.action-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.table-container {
    background: #16213e;
    border-radius: 8px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #0f3460;
}

th {
    background: #0f3460;
    font-weight: 600;
}

tr:hover {
    background: #0f3460;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-content {
    background: #16213e;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    margin: 100px auto;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #888;
}

input[type="text"],
input[type="number"],
input[type="password"] {
    width: 100%;
    padding: 8px;
    background: #0f3460;
    border: 1px solid #1a1a2e;
    color: white;
    border-radius: 4px;
}

input[readonly] {
    background: #1a1a2e;
}

.settings-form h3 {
    margin: 20px 0 15px 0;
    color: #e94560;
}

.cache-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cache-stat {
    background: #16213e;
    padding: 20px;
    border-radius: 8px;
}

.cache-stat .label {
    color: #888;
    margin-bottom: 10px;
}

.cache-stat .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e94560;
}

.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge-success {
    background: #27ae60;
}

.badge-warning {
    background: #f39c12;
}

.badge-danger {
    background: #c0392b;
}

.chart-btn {
    padding: 8px 16px;
    margin: 0 5px;
    background: #0f3460;
    border: 1px solid #1a1a2e;
    color: #888;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.chart-btn:hover {
    background: #16213e;
    color: #eee;
}

.chart-btn.active {
    background: #e94560;
    color: white;
    border-color: #e94560;
}
