:root {
    --bg: #0b1220;
    --surface: #0f1a2e;
    --surface-2: #101f38;
    --text: #e8eefc;
    --muted: #b7c3df;
    --border: rgba(255,255,255,.10);
    --shadow: 0 10px 30px rgba(0,0,0,.35);
    --radius: 14px;
    --radius-round: 999px;
    --brand: #7c3aed;
    --gear: #0ea5e9;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
    color: var(--text);
    background: radial-gradient(1200px 600px at 15% 10%, rgba(124,58,237,.25), transparent 60%), radial-gradient(900px 500px at 85% 0%, rgba(14,165,233,.18), transparent 55%), var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border);
    background: rgba(11,18,32,.72);
    backdrop-filter: blur(10px);
}

.app-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.app-brand {
    font-weight: 700;
    letter-spacing: .2px;
    padding: 8px 10px;
    border-radius: 10px;
}

    .app-brand:hover {
        background: rgba(255,255,255,.06);
        text-decoration: none;
    }

.app-header__menus {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Main */
.app-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 22px 18px 60px;
}

/* Icon menus (details/summary dropdown) */
.icon-menu {
    position: relative;
}

    .icon-menu > summary {
        list-style: none;
    }

        .icon-menu > summary::-webkit-details-marker {
            display: none;
        }

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-round);
    border: 1px solid var(--border);
    background: rgba(255,255,255,.06);
    cursor: pointer;
    user-select: none;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

    .icon-button svg {
        width: 22px;
        height: 22px;
        fill: rgba(255,255,255,.92);
    }

.icon-button--user {
    background: radial-gradient(circle at 30% 25%, rgba(124,58,237,.95), rgba(124,58,237,.35));
}

.icon-button--gear {
    background: radial-gradient(circle at 30% 25%, rgba(14,165,233,.95), rgba(14,165,233,.35));
}

.icon-menu[open] .icon-button {
    outline: 2px solid rgba(255,255,255,.22);
    outline-offset: 2px;
}

.dropdown {
    position: absolute;
    right: 0;
    margin-top: 10px;
    min-width: 240px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(16,31,56,.98), rgba(15,26,46,.98));
    box-shadow: var(--shadow);
    padding: 8px;
}

.dropdown__meta {
    padding: 10px 12px;
    color: var(--muted);
    font-size: .9rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown__item {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
}

    .dropdown__item:hover {
        background: rgba(255,255,255,.07);
        text-decoration: none;
    }

.dropdown__item--danger:hover {
    background: rgba(239,68,68,.16);
}

.dropdown__item--disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* Nice default content styling */
h1, h2, h3 {
    line-height: 1.15;
    margin: 0 0 14px;
}

p {
    color: var(--muted);
}

/* Focus */
:where(a, summary, button, input, select, textarea):focus-visible {
    outline: 2px solid rgba(255,255,255,.35);
    outline-offset: 2px;
    border-radius: 10px;
}

/* Forms & buttons (modern defaults) */
label {
    display: inline-block;
    margin: 10px 0 6px;
    color: var(--muted);
    font-size: .95rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.05);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

    /* Disabled / readonly inputs should still match the theme */
    input:disabled,
    select:disabled,
    textarea:disabled,
    input[readonly],
    select[readonly],
    textarea[readonly] {
        width: 100%;
        padding: 12px 12px;
        border-radius: 12px;
        opacity: 1; /* kill browser grey fade */
        color: rgba(183,195,223,.85);
        background: repeating-linear-gradient( 135deg, rgba(255,255,255,.03) 0px, rgba(255,255,255,.03) 8px, rgba(255,255,255,.06) 8px, rgba(255,255,255,.06) 16px );
        border: 1px dashed rgba(255,255,255,.22);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    }

/* Remove "blocked" look on WebKit */
input:disabled {
    -webkit-text-fill-color: rgba(183,195,223,.85);
}

    /* Placeholder (falls mal readonly mit placeholder) */
    input:disabled::placeholder,
    input[readonly]::placeholder {
        color: rgba(183,195,223,.55);
    }


::placeholder {
    color: rgba(183,195,223,.7);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--brand);
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.06);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(0,0,0,.22);
}

    button:hover,
    input[type="submit"]:hover,
    input[type="button"]:hover,
    input[type="reset"]:hover,
    .btn:hover {
        background: rgba(255,255,255,.10);
    }

    button:disabled,
    input[type="submit"]:disabled,
    input[type="button"]:disabled,
    input[type="reset"]:disabled,
    .btn:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

.validation-summary-errors,
.text-danger {
    color: #fca5a5;
}
/* CSS-only toggle for checkboxes inside labels */
label > input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.08);
    position: relative;
    vertical-align: middle;
    margin: 0 10px 0 0;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
    transition: background 160ms ease, border-color 160ms ease;
}

    /* Thumb */
    label > input[type="checkbox"]::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 3px;
        width: 20px;
        height: 20px;
        transform: translateY(-50%);
        border-radius: 999px;
        background: rgba(255,255,255,.92);
        box-shadow: 0 10px 18px rgba(0,0,0,.25);
        transition: left 160ms ease;
    }

    /* ON */
    label > input[type="checkbox"]:checked {
        background: rgba(124, 58, 237, .85);
        border-color: rgba(124, 58, 237, .55);
    }

        label > input[type="checkbox"]:checked::after {
            left: 23px;
        }

    /* Focus */
    label > input[type="checkbox"]:focus-visible {
        outline: none;
        box-shadow: 0 0 0 4px rgba(124, 58, 237, .25), inset 0 1px 0 rgba(255,255,255,.08);
    }

    /* Disabled */
    label > input[type="checkbox"]:disabled {
        opacity: .55;
        cursor: not-allowed;
    }
