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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}

.navbar {
    background: #1e293b;
    padding: 1.25rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #334155;
}

.navbar h1 {
    font-size: 1.25rem;
    color: #38bdf8;
}

.navbar nav { display: flex; gap: 0.75rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.navbar nav a {
    color: #94a3b8;
    text-decoration: none;
    padding: 0.6rem 1.4rem;
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 80px;
    border: 1px solid transparent;
}
.navbar nav a .nav-icon { font-size: 1.6rem; line-height: 1; }
.navbar nav a .nav-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.navbar nav a:hover, .navbar nav a.active {
    color: #e2e8f0;
    background: #334155;
    border-color: #475569;
}

.container { max-width: 960px; margin: 2rem auto; padding: 0 1rem; }

.card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #38bdf8;
}

.login-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-box {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: #38bdf8;
}

.login-box p.subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #38bdf8;
}

.form-inline {
    display: flex;
    gap: 0.5rem;
    align-items: end;
}

.form-inline .form-group { flex: 1; margin-bottom: 0; }

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    color: #fff;
}

.btn-primary { background: #2563eb; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: #16a34a; }
.btn-success:hover { background: #15803d; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-block { width: 100%; text-align: center; }

.alert {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-danger { background: #450a0a; border: 1px solid #7f1d1d; color: #fca5a5; }
.alert-success { background: #052e16; border: 1px solid #166534; color: #86efac; }
.alert-info { background: #0c2d48; border: 1px solid #1e4976; color: #7dd3fc; }

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

table th, table td {
    padding: 0.7rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid #334155;
    font-size: 0.9rem;
}

table th {
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table td { color: #cbd5e1; }

.ip-badge {
    font-family: 'Courier New', monospace;
    background: #0f172a;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.token-box {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.8rem;
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    margin: 0.5rem 0;
}

.api-help {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.api-help code {
    display: block;
    background: #1e293b;
    padding: 0.6rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    font-size: 0.8rem;
    overflow-x: auto;
    color: #a5f3fc;
}

.text-muted { color: #64748b; font-size: 0.85rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.stat-item {
    background: #0f172a;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}
.stat-item .value { font-size: 1.8rem; font-weight: 700; color: #38bdf8; }
.stat-item .label { font-size: 0.8rem; color: #64748b; margin-top: 0.3rem; }

.actions { display: flex; gap: 0.3rem; }
