:root {
    --white: #E6E6E6;
    --white-rgb: 230, 230, 230;
    --brand-deep: #330532;
    --brand-deep-rgb: 51, 5, 50;
    --accent-rgb: 178, 27, 176;
    --accent: #B21BB0;
    --accent-hover: #E04DE0;
    --accent-deep: #330532;
    --accent-soft: rgba(var(--accent-rgb), 0.2);
    --accent-glow: rgba(var(--accent-rgb), 0.35);
    --bg: #E6E6E6;
    --bg-glow: #330532;
    --surface: #330532;
    --surface-2: #4A0A48;
    --surface-elevated: #5C1260;
    --text: #330532;
    --muted: rgba(51, 5, 50, 0.62);
    --border: rgba(51, 5, 50, 0.14);
    --border-strong: rgba(51, 5, 50, 0.28);
    --danger: #dc4b5a;
    --success: #16a34a;
    --warning: #d97706;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 18px;
    --sidebar-w: clamp(220px, 19vw, 260px);
    --page-pad-x: clamp(1rem, 2.4vw, 2rem);
    --page-pad-y: clamp(1rem, 2vw, 1.5rem);
    --font: "Inter", "Segoe UI", system-ui, sans-serif;
    --shadow-sm: 0 8px 24px rgba(51, 5, 50, 0.12);
    --shadow-md: 0 18px 42px rgba(51, 5, 50, 0.18);
    --shadow-glow: 0 0 36px rgba(var(--accent-rgb), 0.22);
    --text-sm: clamp(0.8rem, 0.75rem + 0.2vw, 0.9rem);
    --text-base: clamp(0.92rem, 0.86rem + 0.25vw, 1rem);
    --text-lg: clamp(1.2rem, 1.05rem + 0.55vw, 1.5rem);
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--text-base);
    background:
        radial-gradient(ellipse 110% 80% at -15% -15%, rgba(224, 77, 224, 0.72), transparent 50%),
        radial-gradient(ellipse 100% 75% at 115% -5%, rgba(51, 5, 50, 0.58), transparent 48%),
        radial-gradient(ellipse 95% 70% at 85% 115%, rgba(178, 27, 176, 0.65), transparent 50%),
        radial-gradient(ellipse 80% 65% at 10% 90%, rgba(178, 27, 176, 0.5), transparent 48%),
        radial-gradient(ellipse 70% 55% at 45% 45%, rgba(224, 77, 224, 0.35), transparent 55%),
        linear-gradient(145deg, #D9A8E0 0%, #D4A0DC 20%, #C888D4 45%, #B870C8 70%, #A858B8 100%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg, video {
    max-width: 100%;
    height: auto;
}

.login-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 1rem;
    overflow: hidden;
    background:
        radial-gradient(ellipse 100% 70% at 50% -10%, rgba(224, 77, 224, 0.65), transparent 52%),
        radial-gradient(ellipse 80% 55% at 0% 100%, rgba(51, 5, 50, 0.4), transparent 52%),
        linear-gradient(165deg, #D9A8E0 0%, #C888D4 45%, #B870C8 100%);
}

.login-page::before {
    display: none;
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: clamp(1.5rem, 3.5vw, 2.25rem);
    background: linear-gradient(165deg, #4A0A48 0%, var(--brand-deep) 100%);
    border: 1px solid rgba(var(--white-rgb), 0.18);
    border-radius: var(--radius-lg);
    color: var(--white);
    box-shadow:
        var(--shadow-md),
        0 0 0 1px rgba(var(--accent-rgb), 0.35),
        0 0 48px rgba(var(--accent-rgb), 0.22);
}

.login-card h1 {
    margin: 0 0 0.25rem;
    font-size: var(--text-lg);
    font-weight: 800;
    color: var(--white);
}

.login-sub {
    margin: 0 0 1.25rem;
    color: rgba(var(--white-rgb), 0.72);
}

.login-card .stack-form > label,
.login-card .field-label {
    color: rgba(var(--white-rgb), 0.72);
}

.login-card .stack-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.login-card .stack-form textarea,
.login-card .stack-form select {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(var(--white-rgb), 0.22);
    color: var(--white);
}

.login-card .stack-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):hover,
.login-card .stack-form textarea:hover,
.login-card .stack-form select:hover {
    border-color: rgba(var(--white-rgb), 0.4);
}

.login-card .stack-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.login-card .stack-form textarea:focus,
.login-card .stack-form select:focus {
    background: rgba(0, 0, 0, 0.35);
    border-color: var(--accent-hover);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.25);
}

.login-card .panel-credit {
    color: rgba(var(--white-rgb), 0.55);
}

.login-card .panel-credit a {
    color: var(--accent-hover);
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.stack-form > label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: var(--text-sm);
    color: rgba(var(--white-rgb), 0.72);
}

.stack-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.stack-form textarea,
.stack-form select {
    font: inherit;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(var(--white-rgb), 0.22);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    color: var(--white);
    width: 100%;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.stack-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):hover,
.stack-form textarea:hover,
.stack-form select:hover {
    border-color: rgba(var(--white-rgb), 0.4);
}

.stack-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.stack-form textarea:focus,
.stack-form select:focus {
    outline: none;
    border-color: var(--accent-hover);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: rgba(0, 0, 0, 0.32);
}

.stack-form .btn-secondary {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text);
}

.field-block {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field-label {
    font-size: var(--text-sm);
    color: rgba(var(--white-rgb), 0.72);
}

.password-option {
    position: relative;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.15rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.45rem 0.75rem;
    border-radius: 9px;
    border: 1px solid rgba(var(--white-rgb), 0.22);
    background: rgba(0, 0, 0, 0.22);
    color: var(--white);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.password-option:hover {
    background: rgba(var(--white-rgb), 0.08);
    border-color: rgba(var(--white-rgb), 0.35);
}

.password-option.is-checked {
    background: rgba(var(--accent-rgb), 0.28);
    border-color: rgba(var(--accent-rgb), 0.55);
    color: var(--white);
}

.password-option input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.password-option-box {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    border: 1.5px solid var(--border-strong);
    border-radius: 4px;
    background: var(--surface);
    display: inline-grid;
    place-items: center;
}

.password-option.is-checked .password-option-box {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.35);
}

.password-option.is-checked .password-option-box::after {
    content: "";
    width: 0.25rem;
    height: 0.45rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

#member-password-block.is-no-password #member-password {
    opacity: 0.45;
    cursor: not-allowed;
}

.role-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.4rem;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(var(--white-rgb), 0.16);
    border-radius: 10px;
    max-height: min(38vh, 280px);
    overflow: auto;
}

.role-picker.role-picker-compact {
    max-height: none;
    overflow: visible;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.role-picker.role-picker-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack-form .role-chip {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    border: 1px solid transparent;
    color: var(--white);
    cursor: pointer;
    font-size: 0.85rem;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.stack-form .role-chip:hover {
    background: rgba(var(--white-rgb), 0.08);
}

.stack-form .role-chip.is-checked {
    background: rgba(var(--accent-rgb), 0.28);
    border-color: rgba(var(--accent-rgb), 0.55);
}

.stack-form .role-chip input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.role-chip-box {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    border: 1.5px solid rgba(var(--white-rgb), 0.35);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.25);
    display: inline-grid;
    place-items: center;
}

.stack-form .role-chip.is-checked .role-chip-box {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.35);
}

.stack-form .role-chip.is-checked .role-chip-box::after {
    content: "";
    width: 0.25rem;
    height: 0.45rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.role-chip-text {
    line-height: 1.2;
}

.role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.muted-dash {
    color: var(--muted);
}

.flash-error,
.flash-ok {
    border-radius: 12px;
    padding: 0.75rem 0.95rem;
    font-size: var(--text-sm);
    font-weight: 500;
    border: 1px solid transparent;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.flash-error {
    color: #ffc9c9;
    background: linear-gradient(180deg, rgba(232, 93, 93, 0.18), rgba(232, 93, 93, 0.08));
    border-color: rgba(232, 93, 93, 0.45);
}

.flash-ok {
    color: #c8f5d6;
    background: linear-gradient(180deg, rgba(39, 174, 96, 0.2), rgba(39, 174, 96, 0.08));
    border-color: rgba(39, 174, 96, 0.45);
    margin-bottom: 1rem;
}

.flash-info {
    color: #E6E6E6;
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-rgb), 0.08));
    border-color: rgba(var(--accent-rgb), 0.45);
    margin-bottom: 1rem;
}

.login-access-info p {
    margin: 0 0 0.85rem;
    line-height: 1.45;
}

.login-access-info .login-access-actions {
    margin: 0;
}

.login-access-info .btn {
    width: 100%;
}

.app {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    isolation: isolate;
}

.sidebar,
.main,
.mobile-nav-toggle,
.sidebar-backdrop {
    position: relative;
    z-index: 2;
}

.sidebar {
    background: linear-gradient(180deg, #4A0A48 0%, var(--brand-deep) 55%, #220322 100%);
    border-right: 1px solid rgba(var(--white-rgb), 0.12);
    box-shadow: 8px 0 32px rgba(var(--brand-deep-rgb), 0.18);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0.85rem;
    gap: 1.25rem;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    backdrop-filter: none;
    color: var(--white);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 0.4rem;
}

.brand-logo {
    width: 3.25rem;
    height: 3.25rem;
    object-fit: cover;
    border-radius: 10px;
    flex: 0 0 auto;
    border: 1px solid rgba(var(--white-rgb), 0.2);
    filter: drop-shadow(0 0 16px rgba(var(--accent-rgb), 0.55));
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    background: var(--accent);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.55);
}

.brand-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--white);
    text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.45);
}

.login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 0.85rem;
}

.login-logo {
    width: min(12rem, 56vw);
    border-radius: 14px;
    height: auto;
    object-fit: contain;
    border: 1px solid rgba(var(--accent-rgb), 0.28);
    box-shadow: 0 12px 36px rgba(var(--accent-rgb), 0.28);
    filter: drop-shadow(0 8px 28px rgba(var(--accent-rgb), 0.35));
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.62rem 0.75rem;
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    text-transform: none;
    opacity: 0.82;
    transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.nav-link-inner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    opacity: 0.75;
    transition: opacity var(--transition), color var(--transition);
}

.nav-icon svg {
    width: 100%;
    height: 100%;
}

.nav-link:hover .nav-icon,
.nav-link.is-active .nav-icon {
    opacity: 1;
    color: var(--accent-hover);
}

.nav-link-label {
    min-width: 0;
}

.nav-unread-badge {
    display: inline-grid;
    place-items: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.22), 0 4px 12px rgba(239, 68, 68, 0.35);
    flex-shrink: 0;
    animation: nav-unread-pulse 2s ease-in-out infinite;
}

.nav-unread-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25), 0 0 10px rgba(239, 68, 68, 0.55);
    flex-shrink: 0;
    animation: nav-unread-pulse 2s ease-in-out infinite;
}

@keyframes nav-unread-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.82; transform: scale(0.92); }
}

.nav-link:hover {
    color: var(--white);
    opacity: 1;
    background: rgba(var(--white-rgb), 0.08);
    border-color: rgba(var(--white-rgb), 0.16);
}

.nav-link.is-active {
    color: var(--white);
    opacity: 1;
    border-color: rgba(var(--white-rgb), 0.22);
    background:
        linear-gradient(135deg, rgba(var(--accent-rgb), 0.45), rgba(var(--brand-deep-rgb), 0.55));
    box-shadow:
        inset 3px 0 0 var(--white),
        0 0 28px rgba(var(--accent-rgb), 0.35),
        inset 0 1px 0 rgba(var(--white-rgb), 0.18);
}

.nav-logout {
    color: #ffb4a8;
    opacity: 1;
    background: rgba(232, 93, 93, 0.12);
    border-color: rgba(232, 93, 93, 0.4);
}

.nav-logout:hover {
    color: #ffd4ce;
    background: rgba(232, 93, 93, 0.2);
    border-color: rgba(232, 93, 93, 0.55);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    border-top: 1px solid rgba(var(--white-rgb), 0.16);
    padding-top: 0.85rem;
}

.sidebar-user {
    font-size: 0.8rem;
    color: var(--white);
    font-weight: 600;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-credit {
    margin: 0.5rem 0 0;
    padding: 0 0.7rem;
    font-size: 0.68rem;
    line-height: 1.55;
    color: var(--muted);
}

.sidebar .panel-credit {
    margin: 0.35rem 0 0;
    padding: 0 0.55rem;
    color: rgba(var(--white-rgb), 0.65);
}

.panel-credit a {
    color: var(--accent-hover);
    text-decoration: none;
    font-weight: 700;
    transition: color var(--transition);
}

.sidebar .panel-credit a {
    color: var(--accent-hover);
}

.panel-credit a:hover {
    color: var(--text);
    text-decoration: underline;
}

.sidebar .panel-credit a:hover {
    color: var(--white);
    text-decoration: underline;
}

.login-card .panel-credit {
    margin-top: 1.25rem;
    padding: 0;
    text-align: center;
    border-top: 1px solid rgba(var(--accent-rgb), 0.12);
    padding-top: 1rem;
}

.main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
}

.main-header {
    padding: var(--page-pad-y) var(--page-pad-x) 0.85rem;
    border-bottom: 1px solid rgba(var(--brand-deep-rgb), 0.12);
    background: transparent;
}

.main-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    text-shadow: none;
}

.main-header h1 {
    margin: 0 auto;
    width: 100%;
    max-width: 1200px;
    font-size: var(--text-lg);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--brand-deep);
    text-shadow: none;
}

.main-content {
    padding: var(--page-pad-y) var(--page-pad-x) clamp(1.25rem, 3vw, 2rem);
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.85rem 0.7rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table th {
    color: var(--muted);
    font-weight: 600;
    font-size: var(--text-sm);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: rgba(var(--accent-rgb), 0.06);
}

.table-link {
    color: var(--accent-hover);
    text-decoration: none;
    font-weight: 600;
}

.table-link:hover {
    text-decoration: underline;
}

.actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    align-items: center;
}

.inline-form {
    display: inline;
}

.empty-state {
    color: var(--muted);
    padding: 0.35rem 0 1rem;
}

.panel-card {
    background: linear-gradient(165deg, #4A0A48 0%, var(--brand-deep) 100%);
    border: 1px solid rgba(var(--white-rgb), 0.14);
    border-radius: var(--radius-lg);
    padding: clamp(1.1rem, 1.9vw, 1.45rem);
    margin-bottom: 1rem;
    color: var(--white);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(var(--accent-rgb), 0.2);
    backdrop-filter: none;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    position: relative;
    overflow: hidden;
}

.panel-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--white), var(--accent-hover), var(--white), transparent);
    opacity: 1;
    pointer-events: none;
    animation: none;
}

.panel-card:hover {
    border-color: rgba(var(--white-rgb), 0.28);
    box-shadow: var(--shadow-md), 0 0 32px rgba(var(--accent-rgb), 0.25);
    transform: translateY(-2px);
}

.panel-card h2,
.panel-card .event-title {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--white);
}

.panel-card .event-title {
    font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
}

.panel-card .panel-copy,
.panel-card .event-meta,
.panel-card .panel-copy-tight {
    color: rgba(var(--white-rgb), 0.72);
}

.panel-card .event-kicker {
    color: var(--accent-hover);
}

.panel-card .page-stat-chip {
    background: rgba(var(--white-rgb), 0.08);
    border-color: rgba(var(--white-rgb), 0.18);
    color: var(--white);
}

.panel-card .page-stat-chip strong {
    color: var(--accent-hover);
}

.panel-card .data-table th,
.panel-card .data-table td {
    border-bottom-color: rgba(var(--white-rgb), 0.12);
    color: var(--white);
}

.panel-card .data-table th {
    color: rgba(var(--white-rgb), 0.62);
}

.panel-card .data-table tbody tr:hover,
.panel-card .data-table.wow-table tbody tr:hover {
    background: rgba(var(--white-rgb), 0.06);
    box-shadow: inset 3px 0 0 var(--accent-hover);
}

.panel-card .table-link,
.panel-card a:not(.btn) {
    color: var(--accent-hover);
}

.panel-card .btn-ghost {
    color: rgba(var(--white-rgb), 0.78);
}

.panel-card .btn-ghost:hover {
    color: var(--white);
    background: rgba(var(--white-rgb), 0.08);
}

.panel-card .btn-soft {
    background: rgba(var(--accent-rgb), 0.22);
    border-color: rgba(var(--white-rgb), 0.2);
    color: var(--white);
}

.panel-card .btn-secondary {
    background: rgba(var(--white-rgb), 0.06);
    border-color: rgba(var(--white-rgb), 0.22);
    color: var(--white);
}

.panel-card .btn-secondary:hover {
    background: rgba(var(--white-rgb), 0.12);
    border-color: rgba(var(--white-rgb), 0.4);
}

.panel-copy {
    margin: 0 0 0.9rem;
    color: var(--muted);
}

.page-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* —— Button system —— */
.btn,
a.btn,
button.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-soft,
.btn-danger-soft,
.stack-form button[type="submit"] {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.1;
    padding: 0.65rem 1.1rem;
    border-radius: 11px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.15s ease;
}

.btn:active,
a.btn:active,
button.btn:active,
.btn-primary:active,
.btn-secondary:active,
.btn-ghost:active,
.btn-soft:active,
.btn-danger-soft:active,
.stack-form button[type="submit"]:active {
    transform: translateY(1px);
}

.btn-primary,
.stack-form button[type="submit"],
.stack-form .btn-primary,
.modal-actions .btn-primary,
.modal-actions button.btn-primary {
    background: linear-gradient(135deg, #F06AF0 0%, #E04DE0 28%, #B21BB0 62%, #330532 100%);
    border-color: rgba(var(--white-rgb), 0.35);
    color: var(--white);
    box-shadow:
        0 10px 30px rgba(var(--accent-rgb), 0.48),
        0 0 28px rgba(var(--accent-rgb), 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-primary:hover,
.stack-form button[type="submit"]:hover,
.stack-form .btn-primary:hover,
.modal-actions .btn-primary:hover {
    background: linear-gradient(135deg, #FF7CFF 0%, #F06AF0 35%, #E04DE0 100%);
    box-shadow:
        0 14px 40px rgba(var(--accent-rgb), 0.58),
        0 0 36px rgba(var(--accent-rgb), 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-secondary {
    background: rgba(var(--brand-deep-rgb), 0.04);
    border-color: rgba(var(--brand-deep-rgb), 0.22);
    color: var(--brand-deep);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(var(--brand-deep-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.4);
}

.stack-form .btn-secondary,
.modal-actions .btn-secondary {
    background: rgba(var(--white-rgb), 0.06);
    border-color: rgba(var(--white-rgb), 0.22);
    color: var(--white);
}

.stack-form .btn-secondary:hover,
.modal-actions .btn-secondary:hover {
    background: rgba(var(--white-rgb), 0.12);
    border-color: rgba(var(--white-rgb), 0.4);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
    padding: 0.5rem 0.8rem;
}

.btn-ghost:hover {
    color: var(--brand-deep);
    background: rgba(var(--brand-deep-rgb), 0.06);
}

.btn-soft {
    background: rgba(var(--accent-rgb), 0.12);
    border-color: rgba(var(--accent-rgb), 0.35);
    color: var(--accent);
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
}

.btn-soft:hover {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: rgba(var(--accent-rgb), 0.5);
    color: var(--accent);
}

.btn-danger-soft {
    background: rgba(232, 93, 93, 0.1);
    border-color: rgba(232, 93, 93, 0.35);
    color: #ffb4a8;
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
}

.btn-danger-soft:hover {
    background: rgba(232, 93, 93, 0.2);
    border-color: rgba(232, 93, 93, 0.55);
    color: #ffd4ce;
}

.btn-block {
    width: 100%;
}

.btn-link {
    color: var(--accent-hover);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.btn-danger {
    color: #ffb4a8;
}

.cal-month-label {
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.role-tag {
    display: inline-block;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.28), rgba(var(--accent-rgb), 0.12));
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    color: #E6E6E6;
    font-size: 0.78rem;
    font-weight: 600;
}

.cal-event {
    display: block;
    width: 100%;
    text-align: left;
    font-size: 0.7rem;
    color: var(--white);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.18rem;
    padding: 0.22rem 0.35rem;
    border: 1px solid rgba(var(--accent-rgb), 0.28);
    border-radius: 7px;
    background: rgba(var(--accent-rgb), 0.14);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cal-event:hover {
    text-decoration: none;
    background: rgba(var(--accent-rgb), 0.28);
    border-color: rgba(var(--accent-rgb), 0.45);
}

body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    padding: 0;
}

.modal.is-open {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-rgb), 0.7) rgba(255, 255, 255, 0.08);
}

.modal.is-open::before,
.modal.is-open::after {
    content: "";
    flex: 1 1 0.75rem;
    min-height: 0.75rem;
    width: 100%;
    pointer-events: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 4, 12, 0.78);
}

.modal-dialog {
    position: relative;
    z-index: 1;
    width: min(480px, calc(100% - 1.5rem));
    min-width: 0;
    flex: 0 0 auto;
    background: linear-gradient(180deg, #4A0A48 0%, var(--brand-deep) 100%);
    border: 1px solid rgba(var(--white-rgb), 0.16);
    border-radius: 16px;
    padding: clamp(0.95rem, 1.8vw, 1.3rem) clamp(1rem, 1.8vw, 1.4rem);
    color: var(--white);
    box-shadow: 0 24px 64px rgba(51, 5, 50, 0.35);
}

.modal.is-open::-webkit-scrollbar,
.dlc-matrix-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.modal.is-open::-webkit-scrollbar-track,
.dlc-matrix-wrap::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
}

.modal.is-open::-webkit-scrollbar-thumb,
.dlc-matrix-wrap::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-rgb), 0.55);
    border-radius: 999px;
}

.modal.is-open::-webkit-scrollbar-thumb:hover,
.dlc-matrix-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--accent-rgb), 0.8);
}

.modal-close {
    width: 2rem;
    height: 2rem;
    display: inline-grid;
    place-items: center;
    font: inherit;
    font-size: 1.25rem;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--white);
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.modal-close:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(var(--white-rgb), 0.25);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
    padding-top: 0.35rem;
}

.modal-dialog-wide {
    width: min(980px, 94vw);
    padding: clamp(1.1rem, 2vw, 1.45rem) clamp(1.15rem, 2.2vw, 1.6rem);
}

.modal-dialog-wide .convoy-form {
    gap: 0.7rem;
}

.modal-dialog-wide .convoy-form label {
    gap: 0.28rem;
    font-size: 0.84rem;
}

.modal-dialog-wide .convoy-form input,
.modal-dialog-wide .convoy-form textarea {
    padding: 0.55rem 0.7rem;
    font-size: 0.95rem;
}

.modal-dialog-wide .convoy-form textarea {
    min-height: 6.5rem;
}

.modal-dialog-wide .modal-header h2 {
    font-size: 1.2rem;
}

.form-grid-2,
.form-grid-4 {
    display: grid;
    gap: 0.55rem 0.75rem;
}

.form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
}

.cal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.cal-head,
.cal-cell {
    background: var(--surface);
    min-height: clamp(3.75rem, 8vh, 5.5rem);
    padding: 0.35rem;
}

.cal-head {
    min-height: 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    padding: 0.4rem 0.2rem;
}

.cal-cell.is-muted {
    opacity: 0.45;
}

.cal-daynum {
    display: inline-block;
    color: var(--text);
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.cal-daynum:hover {
    color: var(--accent-hover);
}

/* Large / ultrawide */
@media (min-width: 1400px) {
    .main-header h1,
    .main-content {
        max-width: 1280px;
    }

    .modal-dialog-wide {
        width: min(1040px, 88vw);
    }
}

@media (max-width: 1100px) {
    .form-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .app {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 0.85rem;
        gap: 0.85rem;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .modal-dialog-wide {
        width: min(640px, 96vw);
    }
}

@media (max-width: 700px) {
    .form-grid-2,
    .form-grid-4 {
        grid-template-columns: 1fr;
    }

    .role-picker {
        grid-template-columns: 1fr;
        max-height: min(32vh, 220px);
    }

    .role-picker.role-picker-compact {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .cal-head {
        font-size: 0.65rem;
    }

    .cal-cell {
        min-height: 3.4rem;
        padding: 0.25rem;
    }

    .cal-event {
        font-size: 0.62rem;
    }

    .page-toolbar {
        justify-content: stretch;
    }

    .page-toolbar .btn-primary {
        width: 100%;
    }
}

@media (max-height: 900px) {
    .modal-dialog:not(.event-modal) {
        padding: 0.8rem 0.95rem 0.9rem;
    }

    .modal-header {
        margin-bottom: 0.45rem;
    }

    .modal.is-open .stack-form {
        gap: 0.55rem;
    }

    .modal.is-open .role-picker {
        max-height: min(28vh, 190px);
        padding: 0.3rem;
        gap: 0.25rem;
    }

    .modal.is-open .stack-form textarea {
        min-height: 3.2rem;
    }
}

@media (max-height: 820px) {
    .modal-dialog-wide {
        max-height: 96vh;
        max-height: 96dvh;
    }

    .modal-dialog-wide .convoy-form {
        gap: 0.4rem;
    }

    .modal-dialog-wide .convoy-form textarea {
        min-height: 3.8rem;
    }

    .modal-header {
        margin-bottom: 0.45rem;
    }
}

/* —— DLC matrix —— */
body.app:has(.dlc-matrix),
body.app:has(.dlc-toolbar),
.app:has(.dlc-matrix),
.app:has(.dlc-toolbar) {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    grid-template-rows: minmax(0, 1fr);
}

.main:has(.dlc-matrix),
.main:has(.dlc-toolbar) {
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.main:has(.dlc-matrix) .main-content,
.main:has(.dlc-toolbar) .main-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 0;
    overflow: hidden;
    padding-bottom: 0.85rem;
}

.main:has(.dlc-matrix) .page-shell,
.main:has(.dlc-toolbar) .page-shell {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

.main:has(.dlc-matrix) .page-hero,
.main:has(.dlc-toolbar) .page-hero {
    flex: 0 0 auto;
}

.dlc-toolbar {
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex: 0 0 auto;
}

.dlc-toolbar-main {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.dlc-meta {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--muted);
}

.dlc-meta-sep {
    opacity: 0.55;
}

.dlc-autosave-hint {
    font-size: var(--text-sm);
    color: var(--muted);
    min-height: 1.2em;
    font-weight: 500;
    white-space: nowrap;
}

.dlc-autosave-hint.is-ok {
    color: #c8f5d6;
}

.dlc-autosave-hint.is-error {
    color: #ffb4a8;
}

.dlc-matrix-wrap {
    flex: 1 1 0;
    min-height: 0;
    padding: 0.55rem 0.55rem 0.7rem;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-rgb), 0.7) rgba(255, 255, 255, 0.08);
    margin-bottom: 0;
}

.dlc-matrix {
    width: max-content;
    max-width: 100%;
    min-width: 0;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

.dlc-matrix th,
.dlc-matrix td {
    border-bottom: 1px solid rgba(42, 32, 56, 0.9);
}

.dlc-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, #1d1629 0%, #171222 100%);
    vertical-align: bottom;
    padding: 0.55rem 0.18rem 0.4rem;
    border-bottom: 1px solid var(--border-strong);
}

.dlc-col-name {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #171222;
    width: 7.5rem;
    min-width: 7.5rem;
    max-width: 7.5rem;
    text-align: left;
    padding: 0.5rem 0.7rem !important;
}

.dlc-matrix thead .dlc-col-name {
    z-index: 4;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: bottom;
}

.dlc-matrix tbody .dlc-col-name {
    z-index: 1;
    background: var(--surface);
    font-weight: 600;
}

.dlc-member-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
}

.dlc-matrix tbody tr:nth-child(even) .dlc-col-name,
.dlc-matrix tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.015);
}

.dlc-matrix tbody tr:hover .dlc-col-name,
.dlc-matrix tbody tr:hover td {
    background: rgba(var(--accent-rgb), 0.07);
}

.dlc-col-dlc {
    width: 3.35rem;
    min-width: 3.35rem;
    max-width: 3.35rem;
    text-align: center;
}

.dlc-col-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem;
    position: relative;
    min-height: 0;
}

.dlc-col-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    writing-mode: horizontal-tb;
    transform: none;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.15;
    text-transform: none;
    letter-spacing: 0;
    color: #efe7ff;
    width: 3.1rem;
    max-height: none;
    text-align: center;
}

.dlc-col-menu-wrap {
    position: relative;
}

.dlc-icon-btn {
    appearance: none;
    width: 1.35rem;
    height: 1.35rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dlc-icon-btn:hover,
.dlc-col-menu-wrap.is-open .dlc-icon-btn {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-strong);
}

.dlc-col-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 9.5rem;
    padding: 0.3rem;
    background: #1c1529;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
    z-index: 12;
}

.dlc-menu-form {
    margin: 0;
}

.dlc-menu-item {
    appearance: none;
    width: 100%;
    display: block;
    text-align: left;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 7px;
    padding: 0.5rem 0.65rem;
    cursor: pointer;
}

.dlc-menu-item:hover {
    background: rgba(var(--accent-rgb), 0.16);
}

.dlc-menu-item.is-danger {
    color: #ffb4a8;
}

.dlc-menu-item.is-danger:hover {
    background: rgba(232, 93, 93, 0.14);
}

.dlc-cell {
    text-align: center;
    padding: 0.35rem 0.1rem !important;
}

.dlc-check {
    display: inline-grid;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    margin: 0 auto;
    cursor: pointer;
    position: relative;
}

.dlc-check input {
    position: absolute;
    opacity: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.dlc-check-mark {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 8px;
    border: 1.5px solid #4a3c63;
    background: rgba(20, 2, 20, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.12s ease;
}

.dlc-check:hover .dlc-check-mark {
    border-color: rgba(var(--accent-rgb), 0.55);
    transform: translateY(-1px);
}

.dlc-check.is-on .dlc-check-mark,
.dlc-check input:checked + .dlc-check-mark {
    background: linear-gradient(145deg, var(--accent-hover) 0%, #330532 100%);
    border-color: rgba(196, 140, 255, 0.85);
    box-shadow:
        0 0 14px rgba(var(--accent-rgb), 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.dlc-check.is-on .dlc-check-mark::after,
.dlc-check input:checked + .dlc-check-mark::after {
    content: "";
    display: block;
    width: 0.28rem;
    height: 0.55rem;
    margin: 0.22rem auto 0;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.dlc-check input:disabled + .dlc-check-mark {
    opacity: 0.5;
}

@media (max-width: 900px) {
    .dlc-col-name {
        width: 6.5rem;
        min-width: 6.5rem;
        max-width: 6.5rem;
        padding-left: 0.5rem !important;
        padding-right: 0.4rem !important;
    }

    .dlc-col-dlc {
        width: 3.1rem;
        min-width: 3.1rem;
        max-width: 3.1rem;
    }

    .dlc-col-title {
        width: 2.9rem;
        font-size: 0.64rem;
    }

    .dlc-check {
        width: 1.55rem;
        height: 1.55rem;
    }

    .dlc-check-mark {
        width: 1.2rem;
        height: 1.2rem;
    }
}

@media (max-width: 720px) {
    body.app:has(.dlc-matrix),
    body.app:has(.dlc-toolbar) {
        overflow: auto;
        height: auto;
    }

    .main:has(.dlc-matrix),
    .main:has(.dlc-toolbar) {
        max-height: none;
        overflow: auto;
    }

    .main:has(.dlc-matrix) .main-content,
    .main:has(.dlc-toolbar) .main-content {
        overflow: visible;
    }

    .dlc-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dlc-toolbar-main .btn-primary {
        width: 100%;
    }

    .dlc-matrix-wrap {
        overflow: auto;
    }
}

.flash-info {
    color: #ffd4d4;
    background: linear-gradient(180deg, rgba(232, 93, 93, 0.22), rgba(232, 93, 93, 0.1));
    border: 1px solid rgba(232, 93, 93, 0.5);
    border-radius: 12px;
    padding: 0.75rem 0.95rem;
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(232, 93, 93, 0.12);
}

.absences-empty {
    text-align: center;
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.absence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1rem;
    align-items: stretch;
}

.absence-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 16rem;
    background: linear-gradient(165deg, #4A0A48 0%, var(--brand-deep) 100%);
    border: 1px solid rgba(var(--white-rgb), 0.14);
    border-radius: 18px;
    padding: 1.15rem 1.2rem 1rem;
    color: var(--white);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(var(--accent-rgb), 0.18);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.absence-card.is-expanded {
    overflow: visible;
}

.absence-card-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
}

.absence-card-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.absence-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--accent-rgb), 0.45);
    box-shadow:
        0 20px 48px rgba(0, 0, 0, 0.32),
        0 0 40px rgba(var(--accent-rgb), 0.2);
}

.absence-card.is-new {
    border-color: rgba(232, 93, 93, 0.75);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(232, 93, 93, 0.25),
        0 0 28px rgba(232, 93, 93, 0.18);
    background: linear-gradient(180deg, #5A1830 0%, var(--brand-deep) 55%);
}

.absence-badge {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(180deg, #ef4444, #dc2626);
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.absence-card-head h2 {
    margin: 0 0 0.35rem;
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
    padding-right: 3.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--white);
}

.absence-meta {
    display: block;
    color: rgba(var(--white-rgb), 0.65);
    font-size: var(--text-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.absence-details {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0.85rem 0 0;
    flex: 1;
    min-height: 0;
}

.absence-details dt {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(var(--white-rgb), 0.55);
}

.absence-details dd {
    margin: 0.15rem 0 0;
    font-weight: 600;
}

.absence-duration dd {
    font-weight: 500;
    line-height: 1.45;
}

.absence-clamp-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.absence-card.is-expanded .absence-clamp-text {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.absence-read-more {
    align-self: flex-start;
    flex-shrink: 0;
    margin-top: 0.2rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
}

.absence-read-more:hover {
    color: var(--accent-hover);
}

.absence-open-tag {
    display: inline-block;
    margin-left: 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffd9a8;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
    vertical-align: middle;
}

.absence-reason {
    grid-column: 1 / -1;
}

.absence-reason dd {
    font-weight: 500;
    line-height: 1.45;
    color: rgba(var(--white-rgb), 0.85);
}

.absence-footnote {
    margin: 0;
    color: rgba(var(--white-rgb), 0.58);
    font-size: var(--text-sm);
}

.absence-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
    flex-shrink: 0;
}

.absence-delete-form {
    margin: 0;
    flex-shrink: 0;
}

.btn-sm {
    padding: 0.38rem 0.65rem;
    font-size: 0.72rem;
}

@media (max-width: 720px) {
    .absence-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .absence-card {
        min-height: 18rem;
    }
}

/* —— Ticket templates —— */
.ticket-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
    gap: 1rem;
    align-items: stretch;
}

.ticket-template-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 0;
    min-height: 0;
}

.ticket-template-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
}

.ticket-template-category {
    margin: 0 0 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.ticket-template-head h2 {
    margin: 0;
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.12rem);
    line-height: 1.3;
}

.ticket-template-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: auto;
}

.ticket-template-category.is-empty {
    visibility: hidden;
}

.ticket-template-body {
    margin: 0;
    flex: 1;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(var(--accent-rgb), 0.12);
    border-radius: 12px;
    background: rgba(10, 7, 12, 0.72);
    color: #eceaf3;
    font: inherit;
    font-size: var(--text-sm);
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .ticket-template-head {
        flex-direction: column;
        align-items: stretch;
    }

    .ticket-template-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ticket-template-actions .btn,
    .ticket-template-actions .inline-form {
        width: 100%;
    }

    .ticket-template-actions .inline-form .btn {
        width: 100%;
    }
}

/* --- VTC Dashboard --- */

.brand-tagline {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(var(--white-rgb), 0.72);
    margin-top: 0.1rem;
}

.sidebar-brand > div {
    min-width: 0;
}

.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 120;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: rgba(21, 17, 33, 0.92);
    cursor: pointer;
    padding: 0.45rem;
    flex-direction: column;
    justify-content: center;
    gap: 0.28rem;
}

.mobile-nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 90;
}

.dash-stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 0;
}

.dash-stat-card {
    background: linear-gradient(165deg, #4A0A48 0%, var(--brand-deep) 100%);
    border: 1px solid rgba(var(--white-rgb), 0.16);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.dash-stat-card.is-warn {
    border-color: rgba(232, 93, 93, 0.55);
}

.dash-stat-card.is-accent {
    border-color: rgba(var(--accent-rgb), 0.55);
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(var(--accent-rgb), 0.35);
    background: linear-gradient(165deg, #5C1260 0%, var(--brand-deep) 100%);
}

.dash-stat-value {
    display: block;
    font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.85rem);
    font-weight: 800;
    line-height: 1.1;
}

.dash-stat-label {
    display: block;
    margin-top: 0.25rem;
    color: rgba(var(--white-rgb), 0.65);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dash-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.panel-card-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.panel-card-head-row h2 {
    margin: 0;
}

.panel-copy-tight {
    margin: 0.25rem 0 0;
    font-size: var(--text-sm);
}

.event-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.event-hero-glow {
    display: none;
}

.event-hero-grid {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.event-kicker {
    margin: 0 0 0.35rem;
    color: var(--accent-hover);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.event-title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.2rem, 1rem + 0.8vw, 1.65rem);
}

.event-meta {
    margin: 0;
    color: var(--muted);
}

.event-countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(3.2rem, 1fr));
    gap: 0.45rem;
}

.event-countdown-compact .countdown-segment {
    min-width: 2.6rem;
    padding: 0.45rem 0.35rem;
}

.countdown-segment {
    text-align: center;
    background: rgba(20, 2, 20, 0.65);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 0.55rem 0.4rem;
}

.countdown-segment span {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.1;
}

.countdown-segment small {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.62rem;
    text-transform: uppercase;
}

.member-avatar {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    background: hsl(var(--avatar-hue, 270), 65%, 45%);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08), 0 8px 20px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.member-avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.72rem;
}

.team-status-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 0.65rem;
}

.team-status-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
}

.team-status-name {
    font-size: 0.68rem;
    color: var(--muted);
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-dot {
    position: absolute;
    top: 0;
    right: calc(50% - 1.35rem);
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    border: 2px solid var(--surface);
}

.status-dot.is-available { background: #22c55e; }
.status-dot.is-absent { background: #ef4444; }

.podium-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.podium-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.podium-item.podium-rank-1 {
    border-color: rgba(250, 204, 21, 0.45);
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.12), transparent);
}

.podium-item.podium-rank-2 {
    border-color: rgba(148, 163, 184, 0.45);
}

.podium-item.podium-rank-3 {
    border-color: rgba(180, 83, 9, 0.45);
}

.podium-rank {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--muted);
    min-width: 1.5rem;
}

.podium-info span {
    display: block;
    color: var(--muted);
    font-size: var(--text-sm);
}

.stats-hero-grid,
.stats-totals {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.stats-totals {
    gap: 0.75rem;
}

.stat-total-box {
    min-width: 8rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: rgba(20, 2, 20, 0.45);
    text-align: center;
}

.stat-total-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
}

.stat-total-label {
    display: block;
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: var(--text-sm);
}

.stats-month-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.stats-notes {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
    line-height: 1.55;
}

.stats-notes li + li {
    margin-top: 0.45rem;
}

@media (max-width: 960px) {
    .mobile-nav-toggle {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 100;
        width: min(85vw, 280px);
        height: 100vh;
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        box-shadow: 24px 0 48px rgba(0, 0, 0, 0.35);
    }

    body.nav-open .sidebar {
        transform: translateX(0);
    }

    .main {
        padding-top: 3.25rem;
    }

    .dash-stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* —— RRL Design polish —— */

.brand-name {
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, #fff 0%, var(--white) 35%, var(--accent-hover) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 18px rgba(var(--accent-rgb), 0.4));
}

.sidebar-user-wrap {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.55rem;
    margin-bottom: 0.15rem;
    border-radius: 10px;
    background: rgba(var(--white-rgb), 0.06);
    border: 1px solid rgba(var(--white-rgb), 0.1);
}

.sidebar-user-avatar {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 800;
    border: 1px solid rgba(var(--white-rgb), 0.3);
    box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.4);
    flex-shrink: 0;
}

.member-avatar {
    background: linear-gradient(135deg, hsl(var(--avatar-hue, 320), 75%, 48%), hsl(var(--avatar-hue, 320), 65%, 38%));
}

.dash-stat-card {
    border-color: rgba(var(--white-rgb), 0.16);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.dash-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--white-rgb), 0.32);
    box-shadow: var(--shadow-glow);
}

.dash-stat-card.is-accent {
    border-color: rgba(var(--accent-rgb), 0.55);
    background: linear-gradient(165deg, #5C1260 0%, var(--brand-deep) 100%);
    box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.18);
}

.mobile-nav-toggle {
    border-color: rgba(var(--white-rgb), 0.22);
    background: rgba(12, 2, 12, 0.92);
}

.mobile-nav-toggle:hover {
    border-color: rgba(var(--accent-rgb), 0.55);
    box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.35);
}

.data-table tbody tr:hover {
    background: rgba(var(--accent-rgb), 0.06);
}

.modal-dialog {
    border-color: rgba(var(--accent-rgb), 0.15);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.cal-day.is-today {
    border-color: rgba(var(--accent-rgb), 0.55);
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.25);
}

@media (max-width: 900px) {
    .app .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 100;
        width: min(85vw, 280px);
        height: 100vh;
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        box-shadow: 24px 0 48px rgba(0, 0, 0, 0.45);
        border-right: 1px solid rgba(var(--accent-rgb), 0.15);
    }

    body.nav-open .app .sidebar {
        transform: translateX(0);
    }

    .sidebar-nav {
        flex-direction: column;
    }
}

/* ═══════════════════════════════════════
   RRL WOW — Layout & Motion
   ═══════════════════════════════════════ */

.app-ambient,
.app-orb,
.app-grid-lines {
    display: none;
}

@keyframes kel-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(2%, 3%) scale(1.06); }
}

.sidebar-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--accent), var(--accent-hover), transparent);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.6);
    border-radius: 0 4px 4px 0;
}

.sidebar {
    overflow: hidden;
}

@keyframes kel-fade-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wow-stagger > .wow-card {
    animation: kel-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(0.06s * var(--i, 0));
}

.wow-card {
    position: relative;
}

.wow-hero {
    overflow: hidden;
}

.event-hero-border {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(var(--accent-rgb), 0.85),
        rgba(var(--white-rgb), 0.55) 45%,
        rgba(var(--accent-rgb), 0.7)
    );
    background-size: 200% 200%;
    animation: kel-border-shift 6s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes kel-border-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.pulse-dot {
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.35rem;
    border-radius: 50%;
    background: var(--accent-hover);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6);
    animation: kel-pulse 2s ease infinite;
    vertical-align: middle;
}

@keyframes kel-pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

/* Dashboard layout */
.dash-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dash-stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.15rem 1.15rem 1rem;
    overflow: hidden;
}

.dash-stat-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 5rem;
    height: 5rem;
    background: radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.15), transparent 70%);
    pointer-events: none;
}

.dash-stat-icon {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(var(--white-rgb), 0.1);
    color: var(--accent-hover);
    margin-bottom: 0.15rem;
}

.dash-stat-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.dash-stat-icon.is-success { color: #86efac; background: rgba(74, 222, 128, 0.16); }
.dash-stat-icon.is-warn { color: #fca5a5; background: rgba(240, 113, 120, 0.16); }
.dash-stat-icon.is-accent { color: var(--accent-hover); background: rgba(var(--accent-rgb), 0.22); }

.dash-stat-value {
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.dash-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.dash-action-tile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 4.5rem;
    padding: 0.95rem 1.05rem;
    border-radius: 14px;
    border: 1px solid rgba(var(--white-rgb), 0.16);
    background: linear-gradient(165deg, #4A0A48 0%, var(--brand-deep) 100%);
    text-decoration: none;
    color: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.dash-action-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--white-rgb), 0.3);
    box-shadow: var(--shadow-glow);
    background: linear-gradient(165deg, #5C1260 0%, var(--brand-deep) 100%);
}

.dash-action-tile.is-primary {
    border-color: rgba(var(--accent-rgb), 0.55);
    background: linear-gradient(165deg, #5C1260 0%, #3D0740 55%, var(--brand-deep) 100%);
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(var(--accent-rgb), 0.28);
}

.dash-action-icon {
    display: inline-flex;
    width: 2.35rem;
    height: 2.35rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(var(--white-rgb), 0.1);
    color: var(--accent-hover);
}

.dash-action-icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.dash-action-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.dash-action-text strong {
    font-size: 0.88rem;
    font-weight: 700;
}

.dash-action-text small {
    color: rgba(var(--white-rgb), 0.65);
    font-size: 0.72rem;
}

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
    gap: 0.85rem;
    align-items: start;
}

.dash-grid-side {
    position: sticky;
    top: 1rem;
}

.dash-hero,
.stats-hero.wow-hero {
    position: relative;
    padding: clamp(1.25rem, 2vw, 1.65rem);
}

.event-hero-copy .event-title {
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem);
    margin-bottom: 0.5rem;
}

.event-meta-sub {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: var(--text-sm);
}

.event-countdown-hero {
    grid-template-columns: repeat(4, minmax(4rem, 1fr));
    gap: 0.5rem;
}

.event-countdown-hero .countdown-segment {
    padding: 0.65rem 0.45rem;
    background: rgba(10, 7, 12, 0.75);
    border-color: rgba(var(--accent-rgb), 0.2);
}

.event-countdown-hero .countdown-segment span {
    font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem);
}

.event-countdown-hero .countdown-segment.is-live span {
    color: var(--accent-hover);
    text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.45);
}

.event-hero-actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.1rem;
}

.event-hero-glow {
    display: none;
}

.dash-upcoming {
    max-height: calc(100vh - 8rem);
    overflow: auto;
}

.event-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.event-timeline-item {
    position: relative;
    padding-left: 1rem;
    border-left: 2px solid rgba(var(--accent-rgb), 0.2);
}

.event-timeline-item:last-child {
    border-left-color: transparent;
}

.event-timeline-link {
    display: grid;
    gap: 0.15rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.event-timeline-link:hover {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.2);
    transform: translateX(4px);
}

.event-timeline-date {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-hover);
}

.event-timeline-time {
    font-size: 0.75rem;
    color: var(--muted);
}

.event-timeline-title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
}

.event-timeline-loc {
    font-size: 0.78rem;
    color: var(--muted);
}

.dash-empty-hero {
    text-align: center;
    padding: clamp(2rem, 4vw, 3rem);
}

.dash-empty-hero .event-title {
    margin-bottom: 0.5rem;
}

.dash-empty-hero .panel-copy {
    max-width: 28rem;
    margin-inline: auto;
}

/* Podium WOW */
.podium-item.podium-rank-1 {
    border-color: rgba(250, 204, 21, 0.55);
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.14), rgba(var(--accent-rgb), 0.06));
    box-shadow: 0 0 24px rgba(250, 204, 21, 0.08);
}

.podium-item.podium-rank-2 {
    border-color: rgba(192, 192, 192, 0.45);
}

.podium-item.podium-rank-3 {
    border-color: rgba(205, 127, 50, 0.45);
}

.stat-total-box {
    background: linear-gradient(165deg, rgba(var(--accent-rgb), 0.1), rgba(10, 7, 12, 0.6));
    border-color: rgba(var(--accent-rgb), 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Page shells — Team, Kalender, Abwesenheiten, DLC, Blacklist */
.page-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.page-hero {
    position: relative;
    padding: clamp(1.15rem, 2vw, 1.5rem);
    margin-bottom: 0;
}

.page-hero-grid {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.page-hero .event-title {
    font-size: clamp(1.2rem, 1rem + 0.8vw, 1.55rem);
}

.page-hero-meta {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.page-hero-flash {
    margin: 0.65rem 0 0;
    margin-bottom: 0;
}

.page-stat-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(var(--white-rgb), 0.18);
    background: rgba(var(--white-rgb), 0.08);
    min-width: 5rem;
    color: var(--white);
}

.page-stat-chip strong {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
}

.page-stat-chip span {
    font-size: 0.68rem;
    color: rgba(var(--white-rgb), 0.65);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.page-stat-chip.is-warn {
    border-color: rgba(240, 113, 120, 0.45);
    background: rgba(240, 113, 120, 0.1);
}

.page-stat-chip.is-warn strong {
    color: var(--danger);
}

.panel-card.wow-card {
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.panel-card.wow-card:not(.wow-hero):hover {
    transform: translateY(-2px);
    border-color: rgba(var(--accent-rgb), 0.45);
    box-shadow:
        0 22px 52px rgba(0, 0, 0, 0.38),
        0 0 48px rgba(var(--accent-rgb), 0.28);
}

.data-table.wow-table tbody tr {
    transition: background var(--transition), box-shadow var(--transition);
}

.data-table.wow-table tbody tr:hover {
    background: rgba(var(--accent-rgb), 0.08);
    box-shadow: inset 3px 0 0 var(--accent-hover);
}

.absence-card.wow-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--accent-rgb), 0.35);
    box-shadow: var(--shadow-glow), 0 16px 40px rgba(0, 0, 0, 0.22);
}

.cal-panel .cal-grid {
    border-color: rgba(var(--accent-rgb), 0.15);
}

.cal-panel .cal-cell:not(.is-muted) {
    transition: background var(--transition);
}

.cal-panel .cal-cell:not(.is-muted):hover {
    background: rgba(var(--accent-rgb), 0.06);
}

.cal-panel .cal-head {
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-hover);
    font-weight: 700;
}

.dlc-toolbar-hero {
    flex-direction: column;
    align-items: flex-end;
}

.dlc-toolbar-hero .dlc-autosave-hint {
    font-size: var(--text-sm);
    color: var(--muted);
}

@keyframes kel-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.main-content {
    animation: kel-fade-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (max-width: 1100px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }

    .dash-grid-side {
        position: static;
    }

    .dash-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dash-action-grid {
        grid-template-columns: 1fr;
    }

    .event-countdown-hero {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .event-hero-grid {
        flex-direction: column;
    }

    .page-hero-grid {
        flex-direction: column;
    }

    .page-hero-actions {
        width: 100%;
    }

    .page-hero-actions .btn-primary {
        width: 100%;
    }

    .dlc-toolbar-hero {
        align-items: stretch;
        width: 100%;
    }
}

/* Event modal — structured convoy form */
.event-modal {
    display: flex;
    flex-direction: column;
    width: min(720px, 94vw);
    max-height: min(90vh, 90dvh);
    overflow: hidden;
    padding: 0;
}

.event-modal-header {
    flex-shrink: 0;
    margin: 0;
    padding: 1.15rem 1.35rem 1rem;
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.12);
    align-items: flex-start;
}

.event-modal-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-hover);
}

.event-modal-headcopy h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--white);
}

.event-modal-sub {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: rgba(var(--white-rgb), 0.72);
    line-height: 1.45;
    max-width: 36rem;
}

.event-modal-error {
    flex-shrink: 0;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.event-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.event-form-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.35rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.form-section {
    padding: 1rem 1.05rem;
    border-radius: var(--radius);
    border: 1px solid rgba(var(--accent-rgb), 0.1);
    background: rgba(10, 7, 12, 0.45);
}

.form-section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.form-section-num {
    display: inline-grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    flex-shrink: 0;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--accent-hover);
    background: rgba(var(--accent-rgb), 0.14);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
}

.form-section-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
}

.form-section-desc {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: rgba(var(--white-rgb), 0.62);
    line-height: 1.4;
}

.form-section-head .form-section-toggle {
    margin-left: auto;
    flex-shrink: 0;
}

.form-section-fields {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.form-section.is-collapsed .form-section-fields {
    display: none;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    min-width: 0;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-field-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(var(--white-rgb), 0.88);
}

.form-field-label .req {
    color: var(--accent-hover);
    font-weight: 700;
}

.form-field-label .opt {
    font-weight: 500;
    font-size: 0.72rem;
    color: rgba(var(--white-rgb), 0.5);
    margin-left: 0.25rem;
}

.form-field-hint {
    font-size: 0.72rem;
    color: rgba(var(--white-rgb), 0.55);
    line-height: 1.35;
}

.event-form .form-field input:not([type="hidden"]),
.event-form .form-field textarea {
    font: inherit;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(var(--white-rgb), 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    color: var(--white);
    caret-color: var(--white);
    width: 100%;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    color-scheme: dark;
}

.event-form .form-field input::placeholder,
.event-form .form-field textarea::placeholder {
    color: rgba(var(--white-rgb), 0.42);
}

.event-form .form-field input:not([type="hidden"]):hover,
.event-form .form-field textarea:hover {
    border-color: rgba(var(--white-rgb), 0.35);
}

.event-form .form-field input:not([type="hidden"]):focus,
.event-form .form-field textarea:focus {
    outline: none;
    border-color: var(--accent-hover);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.event-form .form-field input:-webkit-autofill,
.event-form .form-field input:-webkit-autofill:hover,
.event-form .form-field input:-webkit-autofill:focus,
.event-form .form-field textarea:-webkit-autofill {
    -webkit-text-fill-color: var(--white);
    caret-color: var(--white);
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.45) inset;
    transition: background-color 99999s ease-out;
}

.event-modal .btn-ghost {
    color: rgba(var(--white-rgb), 0.72);
}

.event-modal .btn-ghost:hover {
    color: var(--white);
    background: rgba(var(--white-rgb), 0.08);
}

.event-form .form-field textarea {
    min-height: 5.5rem;
    resize: vertical;
    line-height: 1.5;
}

.event-form .form-grid-2,
.event-form .form-grid-4 {
    display: grid;
    gap: 0.65rem 0.75rem;
}

.event-form .form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.event-form .form-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.event-modal-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0;
    padding: 0.85rem 1.35rem 1.1rem;
    border-top: 1px solid rgba(var(--accent-rgb), 0.12);
    background: rgba(10, 7, 12, 0.65);
}

.event-modal-footer-end {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.event-modal-footer .btn-primary {
    min-width: 8.5rem;
    font-weight: 700;
}

@media (max-width: 720px) {
    .event-form .form-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .event-form .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .event-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .event-modal-footer-start,
    .event-modal-footer-end {
        width: 100%;
    }

    .event-modal-footer-end {
        flex-direction: column-reverse;
        margin-left: 0;
    }

    .event-modal-footer-end .btn {
        width: 100%;
    }
}

/* —— UI polish: toasts, delete modal, podium, mobile tables, role badges —— */
.toast-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: rgba(12, 8, 14, 0.94);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    font-size: 0.88rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast.is-leaving {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
}

.toast-ok {
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(34, 197, 94, 0.12);
}

.toast-error {
    border-color: rgba(240, 113, 120, 0.5);
    color: #ffd6d9;
}

.toast-info {
    border-color: rgba(var(--accent-rgb), 0.45);
}

.modal-dialog-sm {
    width: min(420px, 94vw);
}

.delete-confirm-copy {
    margin: 0;
    padding: 0 1.25rem 1rem;
    color: rgba(var(--white-rgb), 0.88);
    line-height: 1.5;
}

.btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: kel-spin 0.65s linear infinite;
}

@keyframes kel-spin {
    to { transform: rotate(360deg); }
}

.role-tag-owner {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.38), rgba(var(--accent-rgb), 0.16));
    border-color: rgba(var(--accent-rgb), 0.55);
    color: #E6E6E6;
}

.role-tag-deputy {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.32), rgba(168, 85, 247, 0.12));
    border-color: rgba(168, 85, 247, 0.45);
    color: #f3e8ff;
}

.role-tag-hr {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(56, 189, 248, 0.1));
    border-color: rgba(56, 189, 248, 0.4);
    color: #e0f2fe;
}

.role-tag-event {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.28), rgba(250, 204, 21, 0.1));
    border-color: rgba(250, 204, 21, 0.42);
    color: #fef9c3;
}

.role-tag-social {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.28), rgba(244, 114, 182, 0.1));
    border-color: rgba(244, 114, 182, 0.42);
    color: #fce7f3;
}

.role-tag-driver {
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

.role-tag-probation {
    background: rgba(251, 146, 60, 0.16);
    border-color: rgba(251, 146, 60, 0.38);
    color: #ffedd5;
}

.joined-date {
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}

.joined-date-probation {
    color: #f87171;
}

.joined-date-driver {
    color: #4ade80;
}

.member-name-cell {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 7rem;
}

.member-name {
    font-weight: 650;
    color: var(--white);
}

.probation-row-ended {
    background: rgba(239, 68, 68, 0.08);
}

.probation-row-ended:hover {
    background: rgba(239, 68, 68, 0.12) !important;
}

.probation-row-soon {
    background: rgba(251, 146, 60, 0.1);
}

.probation-row-soon:hover {
    background: rgba(251, 146, 60, 0.14) !important;
}

tr.is-highlighted {
    outline: 1px solid rgba(251, 146, 60, 0.55);
    outline-offset: -1px;
}

.panel-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1.1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
}

.panel-alert-warn {
    background: rgba(251, 146, 60, 0.12);
    border-color: rgba(251, 146, 60, 0.35);
}

.panel-alert-icon {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fdba74;
    background: rgba(251, 146, 60, 0.16);
}

.panel-alert-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.panel-alert-body {
    flex: 1 1 auto;
    min-width: 0;
}

.panel-alert-body strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #ffedd5;
}

.panel-alert-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text);
    line-height: 1.45;
}

.panel-alert-list a {
    color: #fdba74;
    font-weight: 600;
    text-decoration: none;
}

.panel-alert-list a:hover {
    text-decoration: underline;
}

.team-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 0.85rem;
    padding: 0.85rem 1rem;
}

.team-search {
    position: relative;
    flex: 1 1 18rem;
    margin: 0;
}

.team-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: rgba(var(--white-rgb), 0.55);
    pointer-events: none;
}

.team-search-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.team-search input {
    width: 100%;
    padding: 0.7rem 0.9rem 0.7rem 2.4rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.28);
    color: var(--white);
    caret-color: var(--white);
}

.team-search input::placeholder {
    color: rgba(var(--white-rgb), 0.45);
}

.team-search input:focus {
    outline: none;
    border-color: rgba(var(--accent-rgb), 0.55);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

.team-search-meta {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(var(--white-rgb), 0.72);
    white-space: nowrap;
}

.probation-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.probation-badge-active {
    background: rgba(251, 146, 60, 0.14);
    border-color: rgba(251, 146, 60, 0.35);
    color: #ffedd5;
}

.probation-badge-ended {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fecaca;
}

.probation-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
    min-width: 12rem;
    max-width: 22rem;
}

.probation-meta {
    font-size: 0.74rem;
    color: var(--muted);
}

.probation-reason {
    display: block;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #fca5a5;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: visible;
    max-width: none;
}

.actions-compact {
    flex-wrap: nowrap;
    gap: 0.35rem;
}

.btn-compact {
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    white-space: nowrap;
}

.boot-loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    background:
        radial-gradient(ellipse at 50% 20%, rgba(var(--accent-rgb), 0.12), transparent 55%),
        var(--white);
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.boot-loader.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.boot-loader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    text-align: center;
    padding: 1.5rem;
}

.boot-loader-logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border: 1px solid rgba(var(--brand-deep-rgb), 0.18);
    border-radius: 14px;
    filter: drop-shadow(0 10px 28px rgba(var(--accent-rgb), 0.28));
}

.boot-loader-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(var(--brand-deep-rgb), 0.12);
    border-top-color: var(--accent);
    border-right-color: var(--brand-deep);
    animation: boot-spin 0.85s linear infinite;
}

.boot-loader-text {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--brand-deep);
}

body.is-booting {
    overflow: hidden;
}

@keyframes boot-spin {
    to {
        transform: rotate(360deg);
    }
}

.role-tag-default {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text);
}

.dash-empty-hero .btn {
    margin-top: 0.85rem;
}

.stats-leaderboard-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.stats-leaderboard-head h2 {
    margin-bottom: 0;
}

.stats-leaderboard-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.podium-stage {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1.25rem;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.podium-place-1 {
    order: 2;
}

.podium-place-2 {
    order: 1;
}

.podium-place-3 {
    order: 3;
}

.podium-pedestal {
    width: 100%;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.18), rgba(10, 7, 12, 0.5));
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    border-bottom: none;
}

.podium-place-1 .podium-pedestal { height: 4.5rem; }
.podium-place-2 .podium-pedestal { height: 3rem; }
.podium-place-3 .podium-pedestal { height: 2rem; }

.podium-place-1 .podium-pedestal {
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.22), rgba(10, 7, 12, 0.55));
    border-color: rgba(250, 204, 21, 0.35);
}

.podium-place-2 .podium-pedestal {
    border-color: rgba(148, 163, 184, 0.35);
}

.podium-place-3 .podium-pedestal {
    border-color: rgba(180, 83, 9, 0.35);
}

.podium-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem 0.65rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    text-align: center;
}

.podium-place-1 .podium-card {
    border-color: rgba(250, 204, 21, 0.45);
    box-shadow: 0 0 28px rgba(250, 204, 21, 0.1);
}

.podium-medal {
    font-size: 1.35rem;
    line-height: 1;
}

.member-avatar-md {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1rem;
}

.podium-name {
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.2;
}

.podium-stat {
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent-hover);
}

.podium-jobs {
    font-size: 0.72rem;
    color: var(--muted);
}

.podium-rest {
    margin-top: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.dlc-check.is-on .dlc-check-mark {
    animation: kel-pop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes kel-pop {
    0% { transform: scale(0.6); }
    70% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .toast-stack {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }

    .podium-stage {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .podium-place,
    .podium-place-1,
    .podium-place-2,
    .podium-place-3 {
        order: unset;
    }

    .podium-pedestal {
        display: none;
    }

    .podium-card {
        flex-direction: row;
        text-align: left;
        flex-wrap: wrap;
        align-items: center;
    }

    .podium-name {
        flex: 1 1 100%;
    }

    .responsive-table .data-table thead {
        display: none;
    }

    .responsive-table .data-table,
    .responsive-table .data-table tbody,
    .responsive-table .data-table tr,
    .responsive-table .data-table td {
        display: block;
        width: 100%;
    }

    .responsive-table .data-table tr {
        margin-bottom: 0.85rem;
        padding: 0.85rem;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.02);
    }

    .responsive-table .data-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.45rem 0;
        border: none;
    }

    .responsive-table .data-table td::before {
        content: attr(data-label);
        flex: 0 0 38%;
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--muted);
    }

    .responsive-table .data-table td[data-label='Aktionen'] {
        flex-direction: column;
        align-items: stretch;
        padding-top: 0.65rem;
        margin-top: 0.35rem;
        border-top: 1px solid var(--border);
    }

    .responsive-table .data-table td[data-label='Aktionen']::before {
        margin-bottom: 0.25rem;
    }

    .responsive-table .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .responsive-table .actions .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wow-stagger > .wow-card,
    .main-content,
    .app-orb,
    .event-hero-border,
    .pulse-dot,
    .event-hero-glow,
    .panel-card.wow-card:not(.wow-hero):hover,
    .absence-card.wow-card:hover {
        animation: none !important;
        transform: none !important;
    }

    .toast,
    .btn.is-loading::after,
    .dlc-check.is-on .dlc-check-mark {
        animation: none !important;
        transition: none !important;
    }
}

.main {
    position: relative;
}

.main::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 55% at 100% 0%, rgba(224, 77, 224, 0.5), transparent 52%),
        radial-gradient(ellipse 70% 50% at 0% 20%, rgba(51, 5, 50, 0.35), transparent 50%),
        radial-gradient(ellipse 90% 55% at 50% 100%, rgba(178, 27, 176, 0.42), transparent 52%),
        linear-gradient(180deg, rgba(178, 27, 176, 0.2), rgba(224, 77, 224, 0.12) 40%, rgba(51, 5, 50, 0.18) 100%);
    z-index: 0;
}

.main > * {
    position: relative;
    z-index: 1;
}

.panel-card.wow-hero .event-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: rgba(var(--white-rgb), 0.1);
    border: 1px solid rgba(var(--white-rgb), 0.2);
    color: var(--accent-hover);
}
