:root {
    --bg: #020617;
    --bg-elevated: #020617;
    --border-subtle: rgba(148, 163, 184, 0.25);
    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.12);
    --text-main: #e5e7eb;
    --text-muted: #94a3b8;
    --success: #4ade80;
    --warning: #facc15;
    --danger: #f97373;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top, #0f172a 0, #020617 55%, #000 100%);
    color: var(--text-main);
}

.shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.topbar {
    border-bottom: 1px solid rgba(15, 23, 42, 0.9);
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(16px);
}

.topbar-inner {
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: radial-gradient(circle at 30% 0, #38bdf8 0, #0ea5e9 35%, #1e293b 100%);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9),
                0 10px 25px rgba(8, 47, 73, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand-logo span { transform: translateY(0.5px); }

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pill-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.9);
    font-size: 11px;
}

.pill-meta-label { color: var(--text-muted); }
.pill-meta-value { font-weight: 500; }

.top-link {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: #e5e7eb;
    text-decoration: none;
    background: transparent;
}
.top-link:hover {
    border-color: rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.9);
}
.top-link-active {
    border-color: rgba(148, 163, 184, 0.9);
    background: rgba(15, 23, 42, 0.9);
}

.page {
    flex: 1;
    padding: 22px 0 26px 0;
}

.headline-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
}

.headline-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.headline-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.headline-main {
    font-size: 26px;
    font-weight: 600;
}

.headline-main span {
    color: var(--accent);
}

.headline-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.cards-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
    gap: 18px;
}

.card {
    background: radial-gradient(circle at 0 0, rgba(56,189,248,0.10) 0, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(37,99,235,0.35) 0, transparent 55%),
                rgba(15,23,42,0.98);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 16px 16px 18px 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.95);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
}

.label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: 1px;
}

.value {
    font-size: 14px;
    margin-bottom: 4px;
}

.tag-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.9);
}

.tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
}

.link-list a {
    display: block;
    margin-bottom: 4px;
}

footer {
    width: 100%;
    margin: 0;
    padding: 10px 0 18px 0;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

/* Sider med tabeller / formularer */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 8px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table th,
.table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(30,64,175,0.5);
    vertical-align: top;
}
.table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.table tr:hover td {
    background: rgba(15,23,42,0.8);
}

/* lange URLs i tabellen */
.table code {
    font-size: 11px;
    white-space: normal;
    word-break: break-all;
}

/* kolonner med URLs får max-bredde så de bryder pænt */
.table td:nth-child(3),
.table td:nth-child(4),
.table td:nth-child(5) {
    max-width: 260px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px;
}
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.field label {
    font-size: 12px;
    color: var(--text-muted);
}
.field input,
.field select {
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,0.7);
    background: #020617;
    color: #e5e7eb;
}

.btn-primary {
    border: none;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 12px;
    cursor: pointer;
    background: linear-gradient(to right,#0ea5e9,#22d3ee);
    color: #020617;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-danger {
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    border: 1px solid rgba(248,113,113,0.7);
    background: transparent;
    color: #fecaca;
    cursor: pointer;
}
.btn-danger:hover {
    background: rgba(127,29,29,0.7);
}

.alert-ok {
    border-radius: 10px;
    padding: 7px 9px;
    font-size: 12px;
    border: 1px solid rgba(74,222,128,0.4);
    background: rgba(22,163,74,0.15);
    color: #bbf7d0;
    margin-bottom: 8px;
}
.alert-error {
    border-radius: 10px;
    padding: 7px 9px;
    font-size: 12px;
    border: 1px solid rgba(248,113,113,0.4);
    background: rgba(127,29,29,0.55);
    color: #fee2e2;
    margin-bottom: 8px;
}

.small {
    font-size: 11px;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .cards-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
    .container { padding-inline: 16px; }
    .headline-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-inner { flex-direction: column; }
    .form-grid,
    .form-grid-2 { grid-template-columns: minmax(0,1fr); }
}
/* Global panel zoom – matcher det gamle 120% look */
body {
    zoom: 1.2;
}
