:root {
    --orange: #ff5a1f;
    --orange-deep: #e7460d;
    --orange-soft: #ffe9df;
    --ink: #161b26;
    --muted: #63718b;
    --bg: #f4f7fd;
    --card: #ffffff;
    --line: #e3e8f2;
    --shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
    --nav-bg: #0f1626;
    --nav-bg-soft: #192237;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    font-family: "Sora", "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 90, 31, 0.16), transparent 30%),
        radial-gradient(circle at 85% 10%, rgba(255, 90, 31, 0.09), transparent 28%),
        linear-gradient(180deg, #f8f9ff 0%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    grid-template-rows: 78px 1fr;
    min-height: 100vh;
}

.menu-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    opacity: 0;
    pointer-events: none;
}

.topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(255, 90, 31, 0.14);
    background: linear-gradient(180deg, #ffffff 0%, #fff4ef 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2.5px;
    background: var(--ink);
    border-radius: 999px;
    transform-origin: center;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.club-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.club-name {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.club-logo {
    width: auto;
    max-width: 170px;
    height: 44px;
    object-fit: contain;
}

.sidebar-logo {
    width: auto;
    max-width: 210px;
    height: 56px;
    object-fit: contain;
}

.club-logo-fallback {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
}

.topbar-user {
    font-size: 0.88rem;
    color: var(--muted);
}

.topbar-user span {
    display: inline-block;
    margin-left: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--orange-soft);
    color: var(--orange-deep);
    font-weight: 600;
}

.sidebar {
    grid-column: 1;
    grid-row: 2;
    background: linear-gradient(180deg, var(--nav-bg) 0%, var(--nav-bg-soft) 100%);
    color: #f9fbff;
    padding: 20px 18px 22px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 14px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-head p {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(244, 247, 255, 0.8);
}

.nav {
    display: grid;
    gap: 14px;
}

.nav-section {
    display: grid;
    gap: 8px;
}

.nav-section-title {
    padding: 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(244, 247, 255, 0.58);
}

.nav-section-links {
    display: grid;
    gap: 8px;
}

.nav-section-links-subtle {
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: rgba(244, 247, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 90, 31, 0.18);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
}

.nav a.active .nav-badge {
    background: rgba(255, 255, 255, 0.2);
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.nav a.active {
    background: linear-gradient(130deg, var(--orange) 0%, var(--orange-deep) 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.menu-backdrop {
    display: none;
}

.content {
    grid-column: 2;
    grid-row: 2;
    padding: 28px clamp(16px, 3vw, 36px) 34px;
}

.page-head {
    margin-bottom: 22px;
}

.page-head h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2.3vw, 2rem);
    letter-spacing: 0.01em;
}

.page-head-title-row,
.page-head-title-copy {
    display: flex;
    align-items: center;
    gap: 14px;
}

.page-head-title-row {
    justify-content: space-between;
}

.page-head-count {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 11px;
    border-radius: 999px;
    color: var(--orange-deep);
    background: var(--orange-soft);
    font-size: 0.84rem;
    font-weight: 700;
}

.page-head-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
    box-shadow: 0 12px 26px rgba(255, 90, 31, 0.24);
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
}

.page-head-add:hover {
    color: #fff;
    transform: translateY(-1px);
}

.member-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.member-list-toggle {
    width: auto;
    padding: 8px 12px;
    font-size: 0.82rem;
}

#participant-editor,
#course-editor,
#exam-editor,
#trainer-editor,
#technique-editor {
    scroll-margin-top: 96px;
}

.guest-shell {
    grid-template-columns: minmax(0, 1fr);
}

.guest-shell .content {
    grid-column: 1;
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    padding-top: 34px;
}

.page-head-guest {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.guest-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 600;
}

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

.dashboard-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
    gap: 18px;
    align-items: stretch;
}

.dashboard-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.card h3 {
    margin: 0;
    font-size: 1.08rem;
}


.dashboard-tile {
    display: block;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-tile::after {
    content: "";
    position: absolute;
    inset: auto -28px -28px auto;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 90, 31, 0.20) 0%, rgba(255, 90, 31, 0) 72%);
}

.dashboard-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 90, 31, 0.28);
    box-shadow: 0 26px 54px rgba(15, 23, 42, 0.12);
}

.dashboard-tile-kicker {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--orange-deep);
}

.dashboard-tile-value {
    margin: 14px 0 0;
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    line-height: 1;
    font-weight: 700;
}

.dashboard-tile-alert {
    border-color: rgba(255, 90, 31, 0.28);
    background: linear-gradient(180deg, #fff8f4 0%, #ffffff 100%);
}

.trainer-dashboard-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 90, 31, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.trainer-dashboard-head,
.trainer-dashboard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.trainer-dashboard-head h3,
.trainer-dashboard-main h3,
.trainer-dashboard-preview h4 {
    margin: 0;
}

.trainer-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 0.9fr) minmax(220px, 0.9fr);
    gap: 14px;
}

.trainer-dashboard-main,
.trainer-dashboard-preview {
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
}

.trainer-dashboard-main {
    border-color: rgba(255, 90, 31, 0.2);
    background: #fff8f4;
}

.trainer-dashboard-main p {
    margin: 0;
}

.trainer-dashboard-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    color: #fff;
    background: var(--orange);
    font-weight: 700;
}

.trainer-dashboard-participants,
.trainer-dashboard-techniques {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trainer-dashboard-participants span,
.trainer-dashboard-techniques span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 90, 31, 0.14);
    background: #fff8f4;
    font-size: 0.84rem;
}

.trainer-dashboard-participants i {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1.5px solid rgba(255, 90, 31, 0.55);
    background: #fff;
}

.trainer-dashboard-participants small {
    color: var(--muted);
}

.dashboard-focus-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 20px 22px;
    border: 1px solid rgba(255, 90, 31, 0.2);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 90, 31, 0.12), rgba(255, 255, 255, 0.98));
}

.dashboard-focus-banner h3 {
    margin: 0 0 8px;
}

.dashboard-focus-banner p {
    margin: 0;
}

.dashboard-focus-card {
    display: grid;
    gap: 14px;
}

.dashboard-focus-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-open-history-list {
    display: grid;
    gap: 10px;
}

.dashboard-open-history-item {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 90, 31, 0.16);
    background: #fff8f4;
    color: inherit;
    text-decoration: none;
}

.dashboard-open-history-item:hover {
    border-color: rgba(255, 90, 31, 0.3);
    background: #fff3ec;
}

.dashboard-open-history-item span {
    color: var(--muted);
}

.dashboard-success-note {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(48, 110, 84, 0.18);
    background: linear-gradient(135deg, rgba(48, 110, 84, 0.08), rgba(255, 255, 255, 0.98));
}

.dashboard-success-note span {
    color: var(--muted);
}

.dashboard-admin-card {
    display: grid;
    gap: 16px;
}

.dashboard-testdata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.dashboard-testdata-stat {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 90, 31, 0.14);
    background: #fff8f4;
}

.dashboard-testdata-stat strong {
    font-size: 1.55rem;
    line-height: 1;
}

.dashboard-testdata-stat span {
    color: var(--muted);
}

.dashboard-testdata-meta {
    margin: -4px 0 0;
}

.dashboard-testdata-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.capture-shell,
.capture-form,
.capture-section {
    display: grid;
    gap: 16px;
}

.capture-picker {
    display: grid;
    gap: 14px;
}

.capture-current {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 90, 31, 0.18);
    background: #fff8f4;
}

.capture-current strong {
    font-size: 1.2rem;
}

.capture-current span {
    color: var(--muted);
}

.capture-training-select {
    display: grid;
    gap: 10px;
}

.capture-open-past {
    display: grid;
    gap: 10px;
    padding-top: 2px;
}

.capture-open-past-list {
    display: grid;
    gap: 8px;
}

.capture-open-past-list a {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 90, 31, 0.16);
    background: #fff8f4;
}

.capture-open-past-list a:hover,
.capture-open-past-list a.is-active {
    border-color: rgba(255, 90, 31, 0.32);
    background: #fff3ec;
}

.capture-open-past-list span {
    color: var(--muted);
    font-size: 0.88rem;
}

.capture-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.capture-section-head p {
    margin: 6px 0 0;
}

.capture-mini-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.capture-mini-actions button {
    padding: 8px 12px;
    font-size: 0.84rem;
}

.capture-participant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.capture-check-tile,
.capture-check-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.capture-check-tile:has(input:checked),
.capture-check-row:has(input:checked) {
    border-color: rgba(255, 90, 31, 0.34);
    background: #fff4ef;
}

.capture-check-tile input,
.capture-check-row input {
    width: 22px;
    height: 22px;
}

.capture-check-tile span,
.capture-check-row span {
    display: grid;
    gap: 2px;
}

.capture-check-tile small,
.capture-check-row small {
    color: var(--muted);
}

.capture-extra {
    display: grid;
    gap: 12px;
    padding-top: 4px;
}

.capture-extra summary {
    cursor: pointer;
    color: var(--orange-deep);
    font-weight: 600;
}

.capture-extra[open] {
    gap: 12px;
}

.capture-extra-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.capture-quick-techniques {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.capture-last-techniques {
    display: grid;
    gap: 0;
    padding: 12px 14px 4px;
    border-radius: 16px;
    border: 1px solid rgba(255, 90, 31, 0.16);
    background: #fff8f4;
}

.technique-quick-chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    box-shadow: none;
    font-size: 0.86rem;
}

.technique-quick-chip.is-selected,
.technique-quick-chip:hover {
    background: var(--orange-soft);
    border-color: rgba(255, 90, 31, 0.3);
    color: var(--orange-deep);
}

.technique-quick-chip-suggested {
    border-color: rgba(255, 90, 31, 0.26);
}

.capture-selected-techniques {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 28px;
}

.capture-selected-list {
    display: grid;
    gap: 8px;
}

.capture-trainer-picker {
    display: grid;
    gap: 10px;
}

.capture-selected-techniques span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff8f4;
    border: 1px solid rgba(255, 90, 31, 0.16);
    color: var(--orange-deep);
    font-size: 0.84rem;
}

.capture-savebar {
    position: sticky;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px -4px 0;
    padding: 12px;
    border: 1px solid rgba(255, 90, 31, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.capture-savebar button {
    min-height: 48px;
}

.capture-savebar span {
    text-align: right;
    font-size: 0.82rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 0.93rem;
    overflow: hidden;
}

th,
td {
    text-align: left;
    padding: 11px 8px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    color: #36425a;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.table-sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    box-shadow: none;
}

.table-sort::after {
    content: "\2195";
    color: var(--muted);
    font-size: 0.9rem;
}

.table-sort[data-direction="asc"]::after {
    content: "\2191";
}

.table-sort[data-direction="desc"]::after {
    content: "\2193";
}

.member-import-card {
    grid-column: 1 / -1;
}

.course-detail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.course-detail-heading .export-link-button {
    padding: 8px 12px;
    white-space: nowrap;
}

.course-registration-actions,
.list-export-actions,
.document-entry-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.list-export-actions .export-link-button {
    padding: 7px 10px;
    white-space: nowrap;
}

.exam-detail-toggle {
    display: block;
    margin-top: 8px;
    padding: 7px 10px;
    font-size: 0.78rem;
}

.participant-type-badge {
    display: inline-flex;
    margin-left: 8px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--orange-soft);
    color: var(--orange-deep);
    font-size: 0.72rem;
    font-weight: 700;
}

.document-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.document-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f8fafc;
}

.document-entry-copy {
    min-width: 0;
}

.document-entry-copy p {
    margin: 6px 0;
}

.document-entry-actions form {
    margin: 0;
}

@media (max-width: 720px) {
    .document-entry {
        align-items: stretch;
        flex-direction: column;
    }
}

.member-contact-list {
    display: grid;
    gap: 3px;
}

.user-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.user-editor-actions a.button-secondary {
    display: inline-flex;
    align-items: center;
    padding: 11px 16px;
    border-radius: 999px;
    font-weight: 600;
}

#user-editor {
    scroll-margin-top: 96px;
}

#training-entry {
    scroll-margin-top: 96px;
}

#group-editor {
    scroll-margin-top: 96px;
}

form {
    display: grid;
    gap: 12px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(255, 90, 31, 0.22);
    border-color: rgba(255, 90, 31, 0.38);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button {
    width: fit-content;
    padding: 11px 16px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(231, 70, 13, 0.25);
}

button:hover {
    filter: brightness(0.98);
}

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.group-schedule-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 14px;
    margin-bottom: 18px;
}

.group-time-field {
    display: grid;
    gap: 8px;
}

.field-label {
    display: block;
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--ink);
}

.time-range-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.trainer-role-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.trainer-role-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 90, 31, 0.16);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 244, 239, 0.88) 0%, #ffffff 100%);
}

.trainer-role-card[hidden] {
    display: none !important;
}

.trainer-role-head {
    display: grid;
    gap: 4px;
}

.trainer-picker-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.trainer-picker-row button {
    min-width: 44px;
    padding-inline: 0;
    white-space: nowrap;
    font-size: 1.3rem;
    line-height: 1;
}

.participant-role-card {
    margin-bottom: 18px;
}

.participant-role-card label {
    margin-top: 2px;
}


.message {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--orange-soft);
    color: #7f2e12;
    border: 1px solid rgba(255, 90, 31, 0.25);
}

.message.is-error {
    background: #fff1ef;
    color: #9d2c1f;
    border-color: rgba(201, 56, 38, 0.24);
}

.login-wrap {
    max-width: 520px;
    margin: 4vh auto 0;
}

.muted {
    color: var(--muted);
}

.text-link {
    color: var(--orange-deep);
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 12px;
    background: var(--orange-soft);
    color: var(--orange-deep);
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.icon-link:hover {
    background: rgba(255, 90, 31, 0.18);
    box-shadow: 0 8px 18px rgba(231, 70, 13, 0.12);
    transform: translateY(-1px);
}

.icon-link:focus-visible {
    outline: 2px solid rgba(255, 90, 31, 0.28);
    outline-offset: 2px;
}

.icon-link span[aria-hidden="true"] {
    font-size: 1rem;
    line-height: 1;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-note {
    margin: -4px 0 0;
    font-size: 0.82rem;
}

.search-select {
    position: relative;
}

.search-select-input {
    padding-right: 42px;
}

.search-select-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    display: none;
    max-height: 240px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(255, 90, 31, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
}

.search-select-results.is-open {
    display: grid;
    gap: 6px;
}

.search-select-option {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    box-shadow: none;
}

.search-select-option:hover,
.search-select-option.is-active {
    background: var(--orange-soft);
    color: var(--orange-deep);
}

.button-danger {
    background: linear-gradient(135deg, #c93826 0%, #a32819 100%);
}

#selected-participants,
#selected-primary-trainers,
#selected-assistant-trainers,
#selected-tournament-participants {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.table-search-panel {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.copy-link-row {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto auto;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.copy-link-row input {
    min-width: 0;
    padding: 8px 9px;
    font-size: 0.8rem;
}

.copy-link-row button {
    min-width: 112px;
    padding: 8px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.registration-link-row {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto auto;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.registration-link-row input {
    min-width: 0;
    padding: 8px 9px;
    font-size: 0.8rem;
}

.registration-link-row button {
    min-width: 112px;
    padding: 8px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.registration-form-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.event-participant-details {
    margin-top: 8px;
}

.event-participant-details summary {
    color: var(--orange-deep);
    cursor: pointer;
    font-weight: 700;
}

.event-participant-details .table-wrap {
    margin-top: 10px;
    max-width: min(760px, 80vw);
}

.event-participant-details table {
    min-width: 720px;
}

.registration-list {
    display: grid;
    gap: 10px;
}

.registration-entry {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 90, 31, 0.14);
    border-radius: 14px;
    background: #fff8f4;
}

.registration-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.84rem;
}

.registration-entry-meta span {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
}

.course-detail-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
    gap: 18px;
}

.course-day-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.course-day-list span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 90, 31, 0.16);
    background: #fff8f4;
    color: #7f2e12;
    font-size: 0.84rem;
}

.public-course-days {
    margin: 0 0 4px;
}

.public-form-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.public-form-card {
    display: grid;
    gap: 16px;
}

.checkbox-label {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    color: var(--ink);
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

tr.is-active-row td {
    background: linear-gradient(135deg, rgba(255, 90, 31, 0.12), rgba(255, 255, 255, 0.98));
    border-top: 1px solid rgba(255, 90, 31, 0.18);
    border-bottom: 1px solid rgba(255, 90, 31, 0.18);
}

tr.is-active-row td:first-child {
    border-left: 4px solid var(--orange);
    padding-left: calc(1rem - 4px);
}

tr.is-active-row td:last-child {
    border-right: 1px solid rgba(255, 90, 31, 0.18);
}


.selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.selected-item span {
    flex: 1 1 220px;
    min-width: 0;
    overflow-wrap: anywhere;
}

button.remove-selected {
    background: transparent;
    color: var(--orange-deep);
    border: 0;
    padding: 0;
    border-radius: 0;
    text-decoration: underline;
    box-shadow: none;
}

@media (max-width: 1024px) {
    .app-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 78px 1fr;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .topbar {
        padding: 0 14px;
    }

    .club-name {
        display: none;
    }

    .sidebar {
        position: fixed;
        top: 78px;
        bottom: 0;
        left: 0;
        width: min(84vw, 320px);
        z-index: 80;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        box-shadow: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 32px;
    }

    .menu-backdrop {
        position: fixed;
        inset: 78px 0 0;
        background: rgba(9, 13, 22, 0.44);
        z-index: 70;
        display: none;
    }

    .menu-toggle-input:checked ~ .sidebar {
        transform: translateX(0);
        box-shadow: 16px 0 36px rgba(8, 12, 20, 0.35);
    }

    .menu-toggle-input:checked ~ .menu-backdrop {
        display: block;
    }

    .menu-toggle-input:checked ~ .topbar .menu-toggle {
        background: linear-gradient(180deg, #fff3ec 0%, #ffe2d4 100%);
        border-color: rgba(255, 90, 31, 0.24);
    }

    .menu-toggle-input:checked ~ .topbar .menu-toggle span:nth-child(1) {
        transform: translateY(6.5px) rotate(45deg);
    }

    .menu-toggle-input:checked ~ .topbar .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle-input:checked ~ .topbar .menu-toggle span:nth-child(3) {
        transform: translateY(-6.5px) rotate(-45deg);
    }

    .content {
        grid-column: 1;
        grid-row: 2;
        padding: 20px 14px 26px;
    }

    .grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .trainer-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .trainer-dashboard-head,
    .trainer-dashboard-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .trainer-dashboard-head .button-secondary,
    .trainer-dashboard-actions a {
        width: 100%;
    }

    .dashboard-focus-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .two-col,
    .group-schedule-row,
    .trainer-picker-row,
    .time-range-fields,
    .capture-section-head,
    .capture-savebar,
    .course-detail-grid,
    .registration-entry {
        grid-template-columns: minmax(0, 1fr);
    }

    .capture-section-head,
    .capture-savebar {
        display: grid;
    }

    .capture-mini-actions {
        justify-content: stretch;
    }

    .capture-mini-actions button,
    .capture-savebar button {
        width: 100%;
    }

    .capture-savebar span {
        text-align: left;
    }

    .copy-link-row,
    .registration-link-row {
        grid-template-columns: 1fr;
    }

    .inline-role-form {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-role-form select,
    .inline-role-form button {
        width: 100%;
    }

    .topbar-user {
        display: none;
    }

    .selected-item {
        align-items: flex-start;
    }

    .selected-item span {
        flex-basis: 100%;
    }

    th,
    td {
        padding: 9px 6px;
    }
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.calendar-toolbar-center {
    text-align: center;
}

.calendar-toolbar-center h3 {
    margin-bottom: 6px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.day-card {
    min-height: 190px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.day-card-select {
    display: block;
    color: inherit;
    text-decoration: none;
}

.day-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 90, 31, 0.28);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.day-card.selected {
    border-color: rgba(255, 90, 31, 0.46);
    box-shadow: 0 18px 36px rgba(255, 90, 31, 0.14);
    background: linear-gradient(180deg, #fff8f4 0%, #ffffff 100%);
}

.day-card.today {
    outline: 2px solid rgba(255, 90, 31, 0.16);
}

.day-card-head {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
}

.day-card-title {
    font-weight: 700;
}

.day-card-date {
    color: var(--orange-deep);
    font-weight: 700;
    font-size: 0.95rem;
}

.day-card-list {
    display: grid;
    gap: 8px;
}

.calendar-entry {
    display: grid;
    gap: 4px;
    padding: 10px 10px 11px;
    border-radius: 12px;
    background: #f7f9fc;
    border: 1px solid #ebeff6;
    color: inherit;
    text-decoration: none;
}

.calendar-entry-link:hover {
    border-color: rgba(255, 90, 31, 0.3);
    background: #fff6f2;
}

.calendar-entry-badge {
    display: inline-flex;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--orange-soft);
    color: var(--orange-deep);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.calendar-panel {
    align-content: start;
}

.schedule-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.calendar-hint {
    display: grid;
    gap: 6px;
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px dashed rgba(255, 90, 31, 0.28);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 90, 31, 0.08), rgba(255, 255, 255, 0.96));
    color: var(--ink);
}

.calendar-hint strong {
    color: var(--orange-deep);
}

.checkbox-list {
    display: grid;
    gap: 8px;
    margin-bottom: 6px;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
}

.checkbox-row-static {
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.checkbox-row-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--orange);
}

.training-form-panel {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.training-form-panel-highlight {
    border-color: rgba(255, 90, 31, 0.24);
    background: linear-gradient(135deg, rgba(255, 90, 31, 0.08), rgba(255, 255, 255, 0.98));
    box-shadow: inset 0 0 0 1px rgba(255, 90, 31, 0.08);
}

.training-form-panel-actions {
    background: #fff8f4;
}

.training-form-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.training-form-panel-head h4 {
    margin: 0 0 4px;
    color: var(--orange-deep);
}

.training-form-panel-head p {
    margin: 0;
    color: var(--muted);
}

.training-group-summary {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 90, 31, 0.16);
}

.training-group-summary strong {
    color: var(--ink);
}

.training-group-summary span {
    color: var(--muted);
}

.training-action-row {
    margin-top: 4px;
}

.history-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.history-status-card {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.history-status-card strong {
    font-size: 1.8rem;
    line-height: 1;
}

.history-status-card span,
.history-status-card small {
    color: var(--muted);
}

.history-status-card-open {
    border-color: rgba(255, 90, 31, 0.24);
    background: linear-gradient(135deg, rgba(255, 90, 31, 0.08), rgba(255, 255, 255, 0.98));
}

.history-open-list {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.history-open-item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 90, 31, 0.16);
    background: #fff8f4;
    color: inherit;
    text-decoration: none;
}

.history-open-item:hover {
    border-color: rgba(255, 90, 31, 0.3);
    background: #fff3ec;
}

.history-training-summary {
    margin-bottom: 10px;
}

.history-section-label {
    display: inline-flex;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--orange-deep);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.history-quick-techniques {
    margin-top: 4px;
}

.history-quick-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.technique-quick-chip {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 90, 31, 0.18);
    background: #fff;
    color: var(--orange-deep);
    box-shadow: none;
}

.technique-quick-chip.is-active,
.technique-quick-chip:hover {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
    color: #fff;
    border-color: transparent;
}

.attendance-toolbar-form,
.attendance-stats-form {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}
.attendance-term-field {
    display: grid;
    gap: 8px;
}

.attendance-term-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--orange-deep);
    letter-spacing: 0.01em;
}


.attendance-filter-grid {
    display: grid;
    grid-template-columns: 132px 264px minmax(0, 1fr);
    gap: 12px;
    align-items: end;
}

.attendance-quarter-picker {
    display: grid;
    gap: 8px;
}

.attendance-quarter-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.attendance-quarter-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.attendance-quarter-button {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.attendance-quarter-button:hover,
.attendance-quarter-button:focus-visible {
    border-color: rgba(255, 90, 31, 0.35);
    transform: translateY(-1px);
    outline: none;
}

.attendance-quarter-button.is-active {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(255, 90, 31, 0.18);
}

.attendance-summary-card {
    display: grid;
    gap: 6px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 90, 31, 0.16);
    background: linear-gradient(135deg, rgba(255, 90, 31, 0.08), rgba(255, 255, 255, 0.98));
}

.attendance-summary-card span {
    color: var(--muted);
}

.attendance-toolbar-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.attendance-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.export-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 999px;
    font-weight: 600;
}

.inline-role-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-role-form select {
    min-width: 150px;
}

.danger-button {
    border-color: rgba(201, 56, 38, 0.24);
    color: #8e2419;
}

.danger-button:hover,
.danger-button:focus-visible {
    border-color: rgba(201, 56, 38, 0.45);
    background: rgba(201, 56, 38, 0.08);
}

.attendance-member-list {
    display: grid;
    gap: 8px;
    margin: 10px 0 14px;
}

.attendance-member-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.attendance-member-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--orange);
}

.attendance-member-row span {
    display: grid;
    gap: 2px;
}

.attendance-member-row small {
    color: var(--muted);
}

.attendance-member-row.is-checked {
    border-color: rgba(255, 90, 31, 0.24);
    background: #fff8f4;
}

#selected-attendance-participants {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.attendance-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.attendance-stat-card {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.attendance-stat-card strong {
    font-size: 1.9rem;
    line-height: 1;
}

.attendance-stat-card span,
.attendance-stat-card small {
    color: var(--muted);
}

.empty-state {
    margin: 0;
    padding: 12px;
    border-radius: 12px;
    background: #f7f9fc;
    color: var(--muted);
}

@media (max-width: 1180px) {
    .week-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .checkbox-row-static {
        align-items: flex-start;
    }

    .checkbox-row-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .attendance-filter-grid {
        grid-template-columns: 1fr;
    }

    .attendance-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .attendance-toolbar-actions {
        width: 100%;
    }

    .calendar-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-toolbar-center {
        text-align: left;
    }

    .week-grid {
        grid-template-columns: 1fr;
    }

    .day-card {
        min-height: auto;
    }
}

.day-card.holiday {
    border-color: rgba(201, 56, 38, 0.32);
    background: linear-gradient(180deg, #fff3f1 0%, #ffffff 100%);
}

.day-card.holiday .day-card-date {
    color: #b92d1f;
}

.holiday-badge {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(201, 56, 38, 0.12);
    color: #b92d1f;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.holiday-note {
    background: #fff0ed;
    color: #a82a1c;
    border-color: rgba(201, 56, 38, 0.2);
}

.calendar-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inline-form {
    display: inline-flex;
}

.button-secondary {
    background: #ffffff;
    color: var(--orange-deep);
    border: 1px solid rgba(255, 90, 31, 0.24);
    box-shadow: none;
}

.inventory-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.inventory-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 72px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.inventory-summary-item span {
    color: var(--muted);
    font-size: 0.86rem;
}

.inventory-summary-item strong {
    color: var(--ink);
    font-size: 1.45rem;
}

.inventory-layout {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.inventory-editor-card {
    width: min(100%, 760px);
}

.inventory-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.inventory-section-head p {
    margin: 6px 0 0;
}

.inventory-section-head > .button-secondary,
.inventory-filter-actions .button-secondary,
.inventory-row-actions .button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 13px;
    border-radius: 999px;
    font-weight: 600;
}

.inventory-type-fields[hidden] {
    display: none !important;
}

.inventory-tabs {
    display: flex;
    align-items: stretch;
    gap: 4px;
    margin: 2px 0 16px;
    border-bottom: 1px solid var(--line);
}

.inventory-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 150px;
    min-height: 46px;
    padding: 10px 16px;
    border-bottom: 3px solid transparent;
    color: var(--muted);
    font-weight: 700;
}

.inventory-tab strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    min-height: 26px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #edf1f7;
    color: #44516a;
    font-size: 0.76rem;
}

.inventory-tab:hover,
.inventory-tab.is-active {
    color: var(--orange-deep);
}

.inventory-tab.is-active {
    border-bottom-color: var(--orange);
}

.inventory-tab.is-active strong {
    background: var(--orange-soft);
    color: var(--orange-deep);
}

.inventory-filter-grid {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(240px, 1fr) auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
}

.inventory-search-field {
    grid-column: auto;
}

.inventory-filter-actions,
.inventory-row-actions {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 8px;
}

.inventory-row-actions form {
    display: block;
}

.inventory-row-actions button {
    min-height: 42px;
    padding: 9px 13px;
}

.inventory-condition {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.inventory-condition-new {
    background: #e8f7ef;
    color: #16643a;
}

.inventory-condition-used {
    background: #fff3df;
    color: #86510b;
}

.inventory-list-card,
.table-wrap {
    min-width: 0;
}

.inventory-evaluation-section {
    display: grid;
    gap: 14px;
}

.inventory-evaluation-heading h3,
.inventory-evaluation-title h4 {
    margin: 0;
}

.inventory-evaluation-heading p {
    margin: 5px 0 0;
}

.inventory-evaluation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.inventory-evaluation-card {
    min-width: 0;
}

.inventory-evaluation-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.inventory-evaluation-title h4 {
    color: var(--ink);
    font-size: 1rem;
}

.inventory-evaluation-title span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.8rem;
}

.inventory-evaluation-card table {
    margin-top: 12px;
}

.table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 780px) {
    .inventory-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inventory-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inventory-filter-actions {
        grid-column: 1 / -1;
    }

    .inventory-evaluation-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    .inventory-summary-grid,
    .inventory-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .inventory-search-field {
        grid-column: auto;
    }

    .inventory-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inventory-tab {
        min-width: 0;
        padding-inline: 8px;
    }

    .inventory-filter-actions {
        grid-column: auto;
    }

    .inventory-filter-actions > *,
    .inventory-section-head .list-export-actions,
    .inventory-section-head .list-export-actions > * {
        width: 100%;
    }
}

.email-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.email-layout textarea {
    min-height: 260px;
}

.email-config-warning {
    margin: 16px 0;
    padding: 14px 16px;
    border: 1px solid rgba(201, 56, 38, 0.24);
    border-radius: 12px;
    background: #fff7f5;
    color: #8d2c1f;
}

.email-config-warning p,
.email-config-warning ul {
    margin-bottom: 0;
}

.email-recipient-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7fafc;
}

.email-recipient-summary span {
    color: var(--muted);
}

.email-info-card {
    position: sticky;
    top: 92px;
}

.email-config-summary {
    display: grid;
    gap: 0;
    margin: 16px 0 0;
}

.email-config-summary div {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.email-config-summary dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
}

.email-config-summary dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
}

.email-result-card {
    margin-bottom: 18px;
}

.custom-event-config-row {
    display: grid;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.custom-event-config-row:last-child {
    border-bottom: 0;
}

.email-failure-list {
    padding-left: 20px;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

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

    .email-info-card {
        position: static;
    }
}

.technique-filter-bar {
    display: grid;
    gap: 12px;
    justify-items: start;
}

.filter-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 90, 31, 0.2);
    background: #fff;
    color: var(--orange-deep);
    text-decoration: none;
    font-weight: 600;
}

.filter-chip.is-active {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
    color: #fff;
    box-shadow: 0 10px 20px rgba(231, 70, 13, 0.18);
}

.technique-belt-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.evaluation-toolbar {
    margin-bottom: 18px;
}

.evaluation-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
    align-items: end;
    gap: 12px;
}

.evaluation-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.evaluation-headline-stats {
    margin-top: 0;
    margin-bottom: 18px;
}

.evaluation-detail-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.evaluation-detail-head h3 {
    margin-bottom: 4px;
}

.evaluation-detail-head p {
    margin: 0;
}

.evaluation-detail-head label {
    width: min(100%, 360px);
}

.evaluation-summary-table th:not(:first-child),
.evaluation-summary-table td:not(:first-child) {
    text-align: right;
}

.evaluation-type {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #fff0e9;
    color: var(--orange-deep);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 1080px) {
    .evaluation-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .evaluation-filter-actions {
        grid-column: 1 / -1;
    }
}

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

    .evaluation-filter-actions {
        grid-column: auto;
        align-items: stretch;
    }

    .evaluation-filter-actions button,
    .evaluation-filter-actions a {
        flex: 1 1 150px;
    }

    .evaluation-detail-head {
        align-items: stretch;
        flex-direction: column;
    }

    .evaluation-detail-head label {
        width: 100%;
    }
}

/* Hilfe / Gebrauchsanweisung */
.help-page {
    scroll-behavior: smooth;
}

.help-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
}

.help-toc {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 116px);
    overflow: auto;
}

.help-toc > strong {
    display: block;
    margin-bottom: 12px;
    color: var(--orange-deep);
    font-size: 1.05rem;
}

.help-toc nav {
    display: grid;
    gap: 3px;
}

.help-toc a {
    padding: 8px 10px;
    border-radius: 10px;
    color: #36425a;
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.35;
}

.help-toc a:hover,
.help-toc a:focus-visible {
    background: #fff0e9;
    color: var(--orange-deep);
}

.help-document {
    min-width: 0;
    padding: clamp(22px, 4vw, 46px);
}

.help-document h1 {
    margin: 0 0 10px;
    color: #172033;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1.15;
}

.help-document h2,
.help-document h3 {
    scroll-margin-top: 96px;
}

.help-document h2 {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin: 44px 0 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: #172033;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.help-document h3 {
    margin: 28px 0 10px;
    color: #253149;
    font-size: 1.08rem;
}

.help-document p {
    margin: 10px 0;
    line-height: 1.72;
}

.help-document .help-list {
    margin: 10px 0 18px;
    padding-left: 24px;
}

.help-document .help-list li {
    margin: 7px 0;
    line-height: 1.55;
}

.help-document .help-list-level-1 {
    margin-left: 22px;
}

.help-back-top {
    flex: 0 0 auto;
    color: var(--orange-deep);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
}

.help-table-wrap {
    max-width: 100%;
    margin: 14px 0 24px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.help-table {
    min-width: 620px;
    margin: 0;
}

.help-table th,
.help-table td {
    padding: 12px;
}

.help-table tbody tr:last-child td {
    border-bottom: 0;
}

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

    .help-toc {
        position: static;
        max-height: none;
    }

    .help-toc nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .help-toc nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .help-document {
        padding: 20px;
    }

    .help-document h2 {
        align-items: flex-start;
    }

    .help-back-top {
        padding-top: 3px;
    }
}
