*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg-gradient: radial-gradient(circle at top, #1f2933, #020617);
    --card-bg: rgba(15, 23, 42, 0.9);
    --card-border: rgba(148, 163, 184, 0.2);
    --accent: #22d3ee;
    --accent-soft: rgba(34, 211, 238, 0.2);
    --accent-strong: #38bdf8;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --danger: #f97373;
    --success: #4ade80;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.85);
    --radius-lg: 1.5rem;
    --radius-md: 0.9rem;
    --radius-pill: 999px;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
}

.bg-gradient {
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    background-size: cover;
}

.center-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-soft);
    padding: 2rem 2.3rem;
    max-width: 960px;
    width: 100%;
    backdrop-filter: blur(18px) saturate(150%);
}

.title {
    margin: 0 0 1.2rem;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.title::before {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 40%;
    background: radial-gradient(circle at 30% 20%, #e0f2fe, var(--accent-strong));
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.9);
}

/* Topbar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.8rem;
    backdrop-filter: blur(18px);
    background: linear-gradient(to right, rgba(15,23,42,0.95), rgba(15,23,42,0.75), rgba(15,23,42,0.95));
    border-bottom: 1px solid rgba(148,163,184,0.25);
}

.logo {
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-label {
    font-size: 0.9rem;
    color: var(--muted);
}

/* Layout */

.content {
    padding: 1.6rem;
    max-width: 1280px;
    margin: 0 auto 2rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid.two-columns {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
}

@media (max-width: 900px) {
    .grid.two-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    padding: 0.5rem 1.15rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    background: rgba(15,23,42,0.9);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.06s ease;
}

.btn.primary {
    background: radial-gradient(circle at top left, var(--accent-strong), #0ea5e9);
    border-color: rgba(34, 211, 238, 0.8);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.6);
}

.btn.secondary {
    border-color: rgba(148,163,184,0.5);
    background: rgba(15,23,42,0.9);
}

.btn.ghost {
    border-color: rgba(148,163,184,0.35);
    background: transparent;
}

.btn.danger {
    border-color: rgba(248,113,113,0.7);
    background: rgba(127,29,29,0.6);
}

.btn.success {
    border-color: rgba(74,222,128,0.7);
    background: rgba(22,163,74,0.7);
}

.btn.small {
    padding: 0.25rem 0.7rem;
    font-size: 0.8rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 25px rgba(15,23,42,0.9);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Forms */

.form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 0.5rem;
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.form label span {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 0.15rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    border-radius: 0.7rem;
    border: 1px solid rgba(148,163,184,0.45);
    background: rgba(15,23,42,0.85);
    padding: 0.55rem 0.75rem;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input[type="color"] {
    width: 100%;
    height: 2.3rem;
    padding: 0;
    border-radius: 0.8rem;
    border: 1px solid rgba(148,163,184,0.45);
    background: rgba(15,23,42,0.85);
}

input:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(34,211,238,0.4);
    background: rgba(15,23,42,0.95);
}

/* Tables */

.table-wrapper {
    border-radius: var(--radius-md);
    border: 1px solid rgba(148,163,184,0.35);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(15,23,42,0.75));
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

thead {
    background: linear-gradient(to right, rgba(15,23,42,0.9), rgba(15,23,42,0.7));
}

thead th {
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.7rem;
}

tbody tr:nth-child(odd) {
    background: rgba(15,23,42,0.85);
}

tbody tr:nth-child(even) {
    background: rgba(15,23,42,0.8);
}

td {
    padding: 0.55rem 0.75rem;
    border-top: 1px solid rgba(15,23,42,0.8);
}

tfoot td {
    padding: 0.6rem 0.75rem;
    background: rgba(15,23,42,0.9);
    border-top: 1px solid rgba(148,163,184,0.35);
}

/* Alerts */

.alert {
    border-radius: var(--radius-md);
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-info {
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.45);
    color: #bfdbfe;
}

.alert-success {
    background: rgba(22,163,74,0.16);
    border: 1px solid rgba(34,197,94,0.55);
    color: #bbf7d0;
}

.alert-error {
    background: rgba(239,68,68,0.16);
    border: 1px solid rgba(248,113,113,0.6);
    color: #fecaca;
}

/* Helpers */

h2 {
    margin-top: 0;
    margin-bottom: 0.9rem;
    font-size: 1.2rem;
}

h3 {
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
    font-size: 0.98rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.muted {
    color: var(--muted);
    font-size: 0.85rem;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    padding: 0.25rem 0.4rem;
    border-radius: 0.4rem;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.4);
    font-size: 0.8rem;
}


/* Drag & Drop Kategorien */
.drag-handle {
    cursor: grab;
    text-align: center;
    font-size: 1rem;
    opacity: 0.7;
}

tr.dragging {
    opacity: 0.5;
}


/* ---------- LAYOUT: Sticky Footer ---------- */
body.bg-gradient {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem 1.2rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    opacity: 0.8;
    border-top: 1px solid rgba(148,163,184,0.25);
    background: linear-gradient(to top, rgba(15,23,42,0.95), rgba(15,23,42,0.7));
    backdrop-filter: blur(14px);
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.footer .version {
    color: #8b5cf6;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.78rem;
}
