:root {
    --bg: #0f172a;
    --panel: #111827;
    --panel-soft: #1f2937;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --green: #16a34a;
    --red: #dc2626;
    --blue: #2563eb;
    --border: #334155;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #020617;
    color: var(--text);
}
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 250px;
    background: var(--bg);
    padding: 24px;
    border-right: 1px solid var(--border);
}
.sidebar h1 { margin: 0 0 8px; font-size: 28px; }
.sidebar nav { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.sidebar nav a {
    text-decoration: none;
    color: var(--text);
    background: var(--panel-soft);
    padding: 12px 14px;
    border-radius: 10px;
}
.sidebar nav a:hover { background: #334155; }
.content { flex: 1; padding: 28px; }
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.muted { color: var(--muted); }
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn, button {
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-danger { background: var(--red); }
.btn-secondary { background: #475569; }
input, select {
    width: 100%;
    background: #0b1220;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    padding: 11px 12px;
    margin-top: 6px;
    margin-bottom: 14px;
}
label { display: block; margin-bottom: 8px; }
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border-radius: 14px;
    overflow: hidden;
}
th, td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}
tr.free { background: rgba(22,163,74,0.15); }
tr.used { background: rgba(220,38,38,0.15); }
.progress {
    height: 14px;
    background: #0b1220;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin: 10px 0;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #ef4444);
}
.status-pill {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}
.status-free { background: rgba(22,163,74,0.2); color: #86efac; }
.status-used { background: rgba(220,38,38,0.2); color: #fca5a5; }
.flash { padding: 12px 15px; border-radius: 12px; margin-bottom: 18px; }
.flash.success { background: rgba(22,163,74,0.15); border: 1px solid rgba(22,163,74,0.4); }
.flash.error { background: rgba(220,38,38,0.15); border: 1px solid rgba(220,38,38,0.4); }
.inline-form { display: flex; gap: 10px; align-items: center; }
.inline-form input { margin: 0; }
.centered { max-width: 480px; margin: 60px auto; }
.search-box { display: flex; gap: 10px; }
.search-box input { margin: 0; }
.small { font-size: 12px; }
@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; }
}
