/* ===============================
   RESET & BASE
   =============================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
    font-family: var(--font-primary);
    background: var(--color-bg);
    background-image: url('../img/background.png');
    background-repeat: repeat;
    background-size: auto;
    background-position: top left;
    background-attachment: fixed;
    color: var(--color-text);
    margin: 0;
    padding: 0;
    font-weight: 400;
    line-height: 1.6;
}

body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: auto;
}

body.app-page {
    display: block;
    background: var(--color-bg);
    color: var(--color-text);
}

/* ===============================
   TYPOGRAPHY
   =============================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-accent-solid);
    line-height: 1.3;
}

p {
    margin: 0.5rem 0;
}

strong {
    color: #fff;
}

/* ===============================
   LINKS
   =============================== */
a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #f0cc5b;
}

/* Standalone-Links (z.B. unter Formularen) */
a.link-block {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ===============================
   BUTTONS
   =============================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-family: var(--font-fantasy);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.3;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

/* Primary (Gold) */
.btn-primary {
    background: var(--color-accent-solid);
    color: var(--color-bg);
    border-color: var(--color-accent-solid);
}

.btn-primary:hover {
    background: #e0bd42;
    border-color: #e0bd42;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
    color: var(--color-bg);
}

/* Secondary (Dunkelrot) */
.btn-secondary {
    background: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}

.btn-secondary:hover {
    background: var(--color-secondary-light);
    border-color: var(--color-secondary-light);
    box-shadow: 0 4px 12px rgba(139, 38, 53, 0.35);
    color: #fff;
}

/* Danger (Rot) */
.btn-danger {
    background: #c0392b;
    color: #fff;
    border-color: #c0392b;
}

.btn-danger:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.35);
    color: #fff;
}

/* Outline (transparent mit Border) */
.btn-outline {
    background: transparent;
    color: var(--color-accent-solid);
    border-color: var(--color-accent-solid);
}

.btn-outline:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #f0cc5b;
    border-color: #f0cc5b;
}

/* Ghost (nur Text) */
.btn-ghost {
    background: transparent;
    color: var(--color-text);
    border-color: transparent;
    padding: 0.4rem 0.8rem;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Sizes */
.btn-small,
.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-large {
    padding: 0.85rem 1.8rem;
    font-size: 1.05rem;
}

.btn-fixed {
    min-width: 180px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Disabled state */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Button Groups */
.btn-group {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ===============================
   BARE BUTTON RESET
   (for button elements not using .btn)
   =============================== */
button {
    font-family: var(--font-fantasy);
    background: var(--color-accent);
    border: none;
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    font-weight: bold;
    cursor: pointer;
    color: #000;
    transition: all 0.2s ease;
}

button:hover {
    background: #e0bd42;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}

/* ===============================
   ALERTS & NOTIFICATIONS
   =============================== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.4);
    color: #5ddb7d;
}

.alert-error,
.alert-danger {
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.35);
    color: var(--color-danger);
}

.alert-warning {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #e0bd42;
}

.alert-info {
    background: rgba(100, 160, 255, 0.12);
    border: 1px solid rgba(100, 160, 255, 0.3);
    color: #8ab4f8;
}

/* Legacy .error class */
.error {
    color: var(--color-danger);
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid var(--color-danger);
    padding: 0.6rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

/* ===============================
   FORMS
   =============================== */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    text-align: left;
    font-size: 0.9rem;
    color: #aaa;
    font-weight: 500;
}

input,
select,
textarea {
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--color-text);
    background: #181818;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.6rem 0.8rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-accent-solid);
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: #666;
}

/* Select */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--color-surface);
    cursor: pointer;
    padding-right: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
}

select option {
    background: var(--color-surface);
    color: var(--color-text);
}

/* Textarea */
textarea {
    resize: vertical;
    min-height: 80px;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Multi-select */
select[multiple] {
    background-color: var(--color-surface);
    padding: 0.4rem;
    height: auto;
    min-height: 120px;
    background-image: none;
}

select[multiple] option {
    padding: 0.3rem 0.6rem;
}

select[multiple] option:checked {
    background: var(--color-accent-solid);
    color: var(--color-bg);
}

/* ===============================
   FORM INLINE (Row-Layout)
   =============================== */
.form-inline .row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-inline .col,
.form-inline .col-1,
.form-inline .col-2,
.form-inline .col-3,
.form-inline .col-4,
.form-inline .col-6,
.form-inline .col-12,
.form-inline .col-auto {
    display: flex;
    align-items: center;
}

.form-inline input[type="text"],
.form-inline input[type="number"],
.form-inline input[type="email"],
.form-inline input[type="password"],
.form-inline select,
.form-inline textarea {
    width: 100%;
    height: 42px;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    line-height: 1.2;
}

.form-inline select {
    cursor: pointer;
    padding-right: 2rem;
}

.form-inline button {
    height: 42px;
    padding: 0 1.2rem;
}

.form-inline label {
    color: var(--color-accent-solid);
    font-weight: bold;
}

/* ===============================
   CHECKBOX & RADIO
   =============================== */
input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    margin: 0 0.5rem 0 0;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-bg);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

input[type="checkbox"]:checked {
    background: var(--color-accent-solid);
    border-color: var(--color-accent-solid);
}

input[type="checkbox"]:checked::after {
    content: "\2714";
    position: absolute;
    top: -2px;
    left: 2px;
    font-size: 0.9rem;
    color: var(--color-bg);
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="radio"]:checked {
    background: var(--color-accent-solid);
    border-color: var(--color-accent-solid);
}

input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-bg);
}

/* Fieldset & Legend */
fieldset {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1rem 0;
    background: var(--color-surface);
}

legend {
    padding: 0 0.5rem;
    color: var(--color-accent-solid);
    font-weight: bold;
}

.fieldset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.6rem 1rem;
    margin-top: 0.5rem;
}

.fieldset-grid label {
    display: flex;
    align-items: center;
    background: #181818;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.fieldset-grid label:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--color-accent-solid);
}

/* ===============================
   DROPDOWN SEARCH
   =============================== */
.dropdown-search {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 300px;
}

.dropdown-search input {
    height: 40px;
}

.dropdown-search select {
    height: 40px;
}

/* ===============================
   MULTISELECT
   =============================== */
.multiselect-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.multiselect-display {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 0.6rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s;
}

.multiselect-display:hover {
    border-color: var(--color-accent-solid);
}

.multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.multiselect-dropdown.open {
    display: block;
}

.multiselect-option {
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background 0.15s;
}

.multiselect-option:hover {
    background: rgba(212, 175, 55, 0.1);
}

.multiselect-option input[type="checkbox"] {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    margin: 0;
}

.multiselect-option span {
    flex: 1;
}

/* ===============================
   GRID SYSTEM
   =============================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.col {
    flex: 1;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.col-auto { flex: 0 0 auto; }
.col-1  { flex: 0 0 8.33%; }
.col-2  { flex: 0 0 16.66%; }
.col-3  { flex: 0 0 25%; }
.col-4  { flex: 0 0 33.33%; }
.col-6  { flex: 0 0 50%; }
.col-12 { flex: 0 0 100%; }

.row.center { justify-content: center; align-items: center; }
.row.right { justify-content: flex-end; }
.row.space-between { justify-content: space-between; }
.align-center { align-items: center; }

/* ===============================
   LOGIN BOX
   =============================== */
.login-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 350px;
    max-width: 90%;
    padding: 2rem;
    text-align: center;
}

.login-container h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--color-accent-solid);
}

/* Login-Page links as block */
.login-container a {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ===============================
   LAYOUT (Sidebar / Navbar / Content)
   =============================== */
.layout {
    display: flex;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.sidebar, .navbar, .content {
    margin: 0;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    height: 100vh;
    background: var(--color-surface);
    background-image: url('../img/sidebarbackground.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    border-right: 1px solid var(--color-border);
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    margin-top: 0;
}

.sidebar-logo {
    height: 120px;
    width: auto;
    max-width: 100%;
}

.sidebar-title {
    font-family: var(--font-fantasy-decorative);
    font-size: 1.8rem;
    color: #ff4444;
    margin: 0;
    font-weight: 700;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.sidebar-footer .logout {
    display: block;
    background: var(--color-secondary);
    color: #fff;
    font-weight: bold;
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-footer .logout:hover {
    background: var(--color-secondary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 38, 53, 0.4);
    color: #fff;
}

/* Sidebar Navigation */
.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar li {
    margin: 0.2rem 0;
}

.sidebar .menu-section {
    margin-bottom: 1rem;
    border-top: 1px solid var(--color-border);
    padding-top: 0.5rem;
}

.sidebar .menu-toggle {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 600;
    padding: 0.6rem 1rem;
    text-align: center;
    cursor: pointer;
    font-size: 1rem;
    display: block;
    border-radius: var(--radius);
    transition: all 0.2s;
    margin: 0.2rem 0;
    letter-spacing: 0.8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.sidebar .menu-toggle:hover {
    background: rgba(255, 68, 68, 0.3);
    color: #fff;
    border-color: rgba(255, 68, 68, 0.5);
}

.sidebar .menu > li > a {
    display: block;
    padding: 0.6rem 1rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.2s;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0.2rem 0;
    letter-spacing: 0.8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.sidebar .menu > li > a:hover {
    background: rgba(255, 68, 68, 0.3);
    color: #fff;
    border-color: rgba(255, 68, 68, 0.5);
}

/* Submenu */
.submenu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-top: 0.5rem;
}

.submenu.active {
    display: block;
}

.submenu a {
    display: block;
    padding: 0.3rem 0.6rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: background 0.2s;
    text-align: center;
    margin: 0.1rem 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.submenu a:hover {
    background: rgba(255, 68, 68, 0.3);
    color: #fff;
    border-color: rgba(255, 68, 68, 0.5);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 320px;
    right: 0;
    height: 60px;
    background: var(--color-surface);
    background-image: url('../img/background.png');
    background-repeat: repeat;
    background-size: auto;
    background-position: top left;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.navbar-logo {
    height: 80px;
    width: auto;
}

.navbar h1 {
    font-size: 1.4rem;
    color: var(--color-accent);
    margin: 0;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.navbar li a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: bold;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
}

.navbar li a:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #fff;
}

.navbar li a.logout {
    background: var(--color-secondary);
    color: #fff;
    font-weight: bold;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.navbar li a.logout:hover {
    background: var(--color-secondary-light);
    box-shadow: 0 4px 12px rgba(139, 38, 53, 0.4);
}

.navbar-quote {
    font-size: 0.9rem;
    color: var(--color-accent-solid);
    margin-left: 2rem;
    font-style: italic;
}

#header-spruch {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-accent-solid);
    font-weight: 600;
    font-style: italic;
    margin: 0;
    justify-self: center;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Content Area */
.content {
    position: fixed;
    top: 60px;
    left: 320px;
    right: 0;
    bottom: 0;
    padding: 2rem;
    background-image: url('../img/background.png');
    background-repeat: repeat;
    background-size: auto;
    background-position: top left;
    background-attachment: fixed;
    overflow-y: auto;
    z-index: 1;
    margin: 0;
}

/* ===============================
   SUBNAV
   =============================== */
.subnav {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    overflow: visible;
    position: relative;
    z-index: 50;
}

.subnav > ul {
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
    align-items: center;
}

.subnav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: bold;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.subnav a:hover,
.subnav a.active {
    color: var(--color-accent-solid);
    background: rgba(212, 175, 55, 0.1);
}

/* Subnav Dropdown (Charaktere) */
.subnav-dropdown {
    position: relative;
}

.subnav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 0.3rem 0;
    min-width: 240px;
    z-index: 200;
    margin: 0.25rem 0 0 0;
    list-style: none;
}

.subnav-dropdown.open > .subnav-dropdown-menu {
    display: block;
}

.subnav-dropdown-menu li {
    list-style: none;
    display: block;
}

.subnav-dropdown-menu a {
    display: block;
    padding: 0.35rem 0.75rem;
    font-size: 0.88rem;
    border-radius: 0;
    white-space: nowrap;
}

.subnav-dropdown-menu a:hover {
    background: rgba(212, 175, 55, 0.1);
}

.subnav-dropdown-menu a.active {
    color: var(--color-accent-solid);
    background: rgba(212, 175, 55, 0.08);
}

.subnav-dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 0.2rem 0;
}

/* ===============================
   BREADCRUMBS
   =============================== */
.breadcrumb {
    display: inline-block;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.25rem;
    transition: color 0.2s;
}

.breadcrumb::after {
    content: ' /';
    color: #555;
    margin-left: 0.15rem;
}

.breadcrumb:hover {
    color: var(--color-accent-solid);
}

/* ===============================
   ADMIN HEADER
   =============================== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    margin: 0;
}

.admin-header .text-muted {
    margin-top: 0.25rem;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ===============================
   DM LIST (inline badge list)
   =============================== */
.dm-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* ===============================
   BADGES
   =============================== */

/* Universal badge base */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* Badge color variants (used in views) */
.badge-admin {
    background: rgba(212, 175, 55, 0.2);
    color: #d4af37;
    border-color: rgba(212, 175, 55, 0.3);
}

.badge-moderator {
    background: rgba(212, 175, 55, 0.15);
    color: #e0bd42;
    border-color: rgba(212, 175, 55, 0.25);
}

.badge-user {
    background: rgba(100, 160, 255, 0.15);
    color: #8ab4f8;
    border-color: rgba(100, 160, 255, 0.25);
}

.badge-gast {
    background: rgba(255, 255, 255, 0.08);
    color: #999;
    border-color: rgba(255, 255, 255, 0.12);
}

.badge-success {
    background: rgba(40, 167, 69, 0.15);
    color: #5ddb7d;
    border-color: rgba(40, 167, 69, 0.3);
}

.badge-warning {
    background: rgba(212, 175, 55, 0.15);
    color: #e0bd42;
    border-color: rgba(212, 175, 55, 0.3);
}

.badge-info {
    background: rgba(100, 160, 255, 0.12);
    color: #8ab4f8;
    border-color: rgba(100, 160, 255, 0.25);
}

.badge-secondary {
    background: rgba(108, 117, 125, 0.2);
    color: #adb5bd;
    border-color: rgba(108, 117, 125, 0.3);
}

.badge-danger {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
}

/* Legacy role-badge */
.role-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: bold;
    color: #000;
}

.role-dm {
    background: #d4af37;
}

.role-spieler {
    background: #00c853;
    color: #fff;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: bold;
}

.status-geplant     { background: #d4af37; color: #000; }
.status-findet-statt { background: #00c853; color: #fff; }
.status-abgesagt    { background: #e53935; color: #fff; }
.status-abgeschlossen { background: #6c757d; color: #fff; }

.anwesenheit-badge {
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
}

.anwesenheit-badge.status-anwesend { background: #28a745; color: #fff; }
.anwesenheit-badge.status-online   { background: #007bff; color: #fff; }
.anwesenheit-badge.status-abgesagt { background: #dc3545; color: #fff; }
.anwesenheit-badge.status-offen    { background: #6c757d; color: #fff; }

/* ===============================
   CARDS
   =============================== */

/* Base Card */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card h2,
.card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.card p {
    color: #bbb;
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

/* Card as Link */
.card-link {
    display: block;
    text-decoration: none;
    color: var(--color-text);
    cursor: pointer;
}

.card-link:hover {
    border-color: var(--color-accent-solid);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.15);
    color: var(--color-text);
}

.card-link h2,
.card-link h3 {
    color: var(--color-accent-solid);
    transition: color 0.2s;
}

.card-link:hover h2,
.card-link:hover h3 {
    color: #f0cc5b;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Card Sections */
.card-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.card-body {
    font-size: 0.9rem;
    line-height: 1.5;
}

.card-meta {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
    color: #888;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Session Cards */
.session-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.session-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.session-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.session-info {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

.anwesenheit-form {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.anwesenheit-form label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

.teilnehmer-liste {
    list-style: none;
    margin: 0;
    padding: 0;
}

.teilnehmer-liste li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin: 2px 0;
}

/* Session Notes */
.session-notes {
    margin-top: 1rem;
    padding: 0.8rem;
    background: #222;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.session-note {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333;
    font-size: 0.9rem;
}

.session-note:last-child {
    border-bottom: none;
}

/* Notes */
.note {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    background: var(--color-surface);
}

.note-header {
    font-weight: bold;
    margin-bottom: 0.5rem;
    position: relative;
}

.pin-btn {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 2px 4px;
    color: var(--color-accent-solid);
    border-radius: 50%;
    transition: background 0.2s;
}

.pin-btn:hover {
    background: rgba(212, 175, 55, 0.2);
}

.pin-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ===============================
   KLASSE PROFIL
   =============================== */
.klasse-profil {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.klasse-profil h2 {
    color: var(--color-accent-solid);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.klasse-profil p {
    margin: 0.4rem 0;
}

.klasse-profil .row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.klasse-profil .col-6 {
    flex: 1;
    min-width: 250px;
}

.klasse-profil ul {
    list-style: disc;
    padding-left: 1.2rem;
    margin: 0.5rem 0 0 0;
}

.klasse-profil h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-accent-solid);
    font-size: 1.2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.3rem;
}

.klasse-profil .meta {
    font-size: 0.9rem;
    color: #aaa;
    margin-top: 0.5rem;
}

/* ===============================
   INFO & WARNING BOXES
   =============================== */
.info-box {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    background-color: #1f1f1f;
    color: #e0e0e0;
    border: 1px solid #333;
}

.info-box h2 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4da3ff;
}

.info-box ul {
    margin: 0.5rem 0 0 1.2rem;
    padding: 0;
}

.info-box li {
    margin: 0.3rem 0;
}

.info-box code {
    background: #2a2a2a;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #d4af37;
}

.info-box p {
    margin-top: 0.5rem;
}

.warning-box {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    background-color: #3a2f00;
    color: #d4af37;
    border: 1px solid #d4af37;
}

/* ===============================
   UTILITY
   =============================== */
.inline-form {
    display: inline;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: #777; }
.text-accent { color: var(--color-accent-solid); }
.text-danger { color: var(--color-danger); }
.text-success { color: #5ddb7d; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ===============================
   SCROLLBARS (in global for consistency)
   =============================== */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) var(--color-surface);
}
