:root {
    --bg: #0c1224;
    --panel: #11182f;
    --panel-strong: #161f3a;
    --border: #1e2a4d;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #7ee0ff;
    --accent-strong: #9ef5ff;
    --danger: #f87171;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius: 14px;
    --gap: 14px;
    --fw-bold: 650;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Inter", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
    background: radial-gradient(circle at 20% 20%, rgba(126,224,255,0.08), transparent 35%),
                radial-gradient(circle at 80% 0%, rgba(126,224,255,0.05), transparent 30%),
                var(--bg);
    color: var(--text);
    min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; font-weight: var(--fw-bold); }
a:hover { color: var(--accent-strong); }
.navbar {
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(8px);
    background: rgba(12,18,36,0.8);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.4px; }
.pill { padding: 4px 10px; border-radius: 999px; background: rgba(126,224,255,0.16); color: var(--accent); border: 1px solid rgba(126,224,255,0.4); font-size: 12px; }
.container { max-width: 1180px; margin: 26px auto 60px; padding: 0 20px; display: flex; flex-direction: column; gap: 18px; }
.card {
    background: linear-gradient(145deg, var(--panel), var(--panel-strong));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}
.card h1, .card h2, .card h3 { margin: 0 0 10px; }
.section-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.item-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    background: rgba(255,255,255,0.02);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.item-meta { color: var(--muted); font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text);
    font-weight: var(--fw-bold);
    transition: 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}
.button:hover { border-color: var(--accent); color: var(--accent); }
.button.primary { background: linear-gradient(120deg, var(--accent), var(--accent-strong)); color: #041017; border-color: rgba(126,224,255,0.4); }
.button.primary:hover { filter: brightness(1.05); }
.button.ghost { background: rgba(255,255,255,0.04); }
.button.danger { border-color: rgba(248,113,113,0.4); color: var(--danger); }
.form { display: grid; gap: 12px; margin-top: 8px; }
.modal .form { margin-top: 0; gap: 10px; }
label { font-weight: var(--fw-bold); display: flex; flex-direction: column; gap: 6px; color: var(--text); }
input, select, textarea {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--border);
    color: var(--text);
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 15px) calc(50% + 3px); background-size: 7px 7px, 7px 7px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(126,224,255,0.35); border-color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.inline { display: flex; align-items: center; gap: 8px; }
.inline.wrap { flex-wrap: wrap; }
.badge { padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.pos-green { border-color: rgba(34,197,94,0.6) !important; color: #22c55e !important; }
.pos-yellow { border-color: rgba(234,179,8,0.6) !important; color: #facc15 !important; }
.pos-red { border-color: rgba(248,113,113,0.6) !important; color: #f87171 !important; }
.divider { border-top: 1px dashed var(--border); margin: 12px 0; }
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
}
.modal {
    background: linear-gradient(145deg, var(--panel), var(--panel-strong));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    width: min(480px, 90vw);
    box-shadow: var(--shadow);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.modal h2 { margin: 0; }
.modal p { margin: 0; color: var(--muted); }
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: var(--muted);
}
.delete-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--danger);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: var(--fw-bold);
}
.delete-btn:hover { border-color: rgba(248,113,113,0.6); color: #fff; background: rgba(248,113,113,0.1); }
.icon-btn {
    width: 40px;
    height: 40px;
    font-size: 25px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: var(--fw-bold);
}
.icon-btn:hover { border-color: rgba(126,224,255,0.6); color: var(--accent-strong); background: rgba(126,224,255,0.08); }
@media (max-width: 640px) {
    .navbar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .actions { width: 100%; }
    .button { width: 100%; justify-content: center; }
}
