:root {
    --dark: #2D2D2D;
    --mid: #343434;
    --soft: #4B4A48;
    --beige: #DDD1C3;
    --light: #FFF8EF;
    --brand: #de8216;
    --accent: #E47A09;
    --green: #219653;
    --red: #ED1010;
    --surface: #383735;
    --surface-2: #292929;
    --ink: #171717;
    --line: rgba(255, 248, 239, 0.13);
    --line-strong: rgba(255, 248, 239, 0.22);
    --shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] {
    --dark: #FFF8EF;
    --mid: #F2E8DC;
    --soft: #DDD1C3;
    --beige: #4B4A48;
    --light: #2D2D2D;
    --surface: #FFFFFF;
    --surface-2: #F7EFE5;
    --ink: #171717;
    --line: rgba(45, 45, 45, 0.12);
    --line-strong: rgba(45, 45, 45, 0.2);
    --shadow: 0 18px 45px rgba(45, 45, 45, 0.12);
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
    margin: 0;
    background: var(--dark);
    color: var(--light);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    text-rendering: geometricPrecision;
}

a { color: inherit; }
h2, h3, p { overflow-wrap: anywhere; }
h2 { margin: 0 0 16px; font-size: 20px; }
h3 { margin: 0 0 8px; font-size: 17px; }

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(228, 122, 9, 0.18), transparent 34%),
        linear-gradient(180deg, var(--mid), var(--dark));
}

.auth-panel {
    width: min(440px, 100%);
    background: var(--mid);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: clamp(22px, 5vw, 34px);
    box-shadow: var(--shadow);
}

.auth-redirect-note { font-size: 12px; color: var(--beige); overflow-wrap: anywhere; }

.brand,
.mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand { margin-bottom: 30px; }
.sidebar-collapse-button {
    position: relative;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    width: 28px;
    min-height: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: transparent;
    color: var(--beige);
    cursor: pointer;
}
.sidebar-collapse-button:hover, .sidebar-collapse-button:focus-visible { color: var(--light); border-color: var(--accent); }
.sidebar-collapse-button::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 80;
    top: calc(100% + 7px);
    right: 0;
    width: max-content;
    max-width: 190px;
    padding: 6px 9px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--light);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}
.sidebar-collapse-button:hover::after, .sidebar-collapse-button:focus-visible::after { opacity: 1; }
@media (min-width: 821px) {
    :root[data-sidebar="collapsed"] .sidebar-collapse-button svg { transform: rotate(180deg); }
    :root[data-sidebar="collapsed"] .sidebar-collapse-button::after { display: none; }
}

.brand-logo { display: block; width: 220px; max-width: 100%; height: auto; }
.mobile-brand .brand-logo { width: 180px; }

.mobile-bar {
    display: none;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: var(--dark);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}

.icon-button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--mid);
    display: inline-grid;
    place-content: center;
    gap: 5px;
    padding: 0;
}

.icon-button span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--light);
}

.scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 60;
}

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

@media (min-width: 821px) {
    :root[data-sidebar="collapsed"] .app-shell { grid-template-columns: 48px minmax(0, 1fr); }
    :root[data-sidebar="collapsed"] .sidebar { padding: 16px 9px; }
    :root[data-sidebar="collapsed"] .brand,
    :root[data-sidebar="collapsed"] .nav > :not(.sidebar-platform-head),
    :root[data-sidebar="collapsed"] .sidebar-platform-head .nav-section { display: none; }
    :root[data-sidebar="collapsed"] .nav { margin: 0; }
    :root[data-sidebar="collapsed"] .sidebar-platform-head { justify-content: center; margin: 0; padding: 0; border: 0; }
}

.sidebar {
    background: var(--surface-2);
    border-right: 1px solid var(--line);
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.nav {
    display: grid;
    gap: 8px;
    margin-top: 28px;
}

.sidebar-platform-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 18px 10px 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.sidebar-platform-head .nav-section { margin: 0; padding: 0; border: 0; }

.nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--beige);
    text-decoration: none;
    font-weight: 720;
    border: 1px solid transparent;
}

.nav > a { margin-left: 14px; }

.nav-section {
    color: var(--beige);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    margin: 18px 10px 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    text-transform: uppercase;
}

.nav a:hover,
.nav a.is-active {
    background: var(--mid);
    color: var(--light);
    border-color: var(--line);
}

.main {
    min-width: 0;
    padding: 30px clamp(18px, 3vw, 46px) 44px;
}

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

.topbar-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    min-width: 0;
}


.display-settings { position: relative; flex: 0 0 auto; }

.display-settings-toggle {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    padding: 0;
    color: var(--light);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.display-settings-toggle:hover,
.display-settings-toggle[aria-expanded="true"] { border-color: var(--accent); }

.display-settings-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 70;
    display: grid;
    gap: 8px;
    width: min(290px, calc(100vw - 24px));
    padding: 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.display-settings-panel[hidden] { display: none; }
.display-settings-panel button { width: 100%; min-width: 0; text-align: left; }
.display-settings-panel .bug-menu-action {
    background: transparent;
    color: var(--light);
    border: 1px solid var(--red);
    border-radius: 8px;
    white-space: normal;
}
.display-settings-panel .bug-menu-action:hover { border-color: var(--red); color: var(--red); }
.display-settings-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.page-title { min-width: 0; }
.topbar-tools .user-chip { flex: 0 1 auto; }

.account-switcher { position: relative; flex: 0 0 auto; }
.account-switcher > summary { display: flex; align-items: center; justify-content: center; box-sizing: border-box; height: 60px; cursor: pointer; list-style: none; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--light); padding: 0 12px; font-weight: 700; }
.account-switcher > summary::-webkit-details-marker { display: none; }
.account-switcher-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 75; width: min(300px, 85vw); display: grid; gap: 8px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.account-switcher-panel > strong { color: var(--light); overflow-wrap: anywhere; }
.account-switcher-panel form, .account-switcher-panel .button, .account-switcher-panel form button { width: 100%; }
.account-switcher-row { justify-content: flex-start; background: transparent; color: var(--light); border: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
.account-switcher-row .avatar { width: 32px; height: 32px; }
.google-auth-widget { display: grid; gap: 10px; margin-top: 18px; }
.google-auth-widget p { margin: 0; }
.google-account-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.google-account-row span { flex: 1 1 170px; overflow-wrap: anywhere; }
.google-account-row input { flex: 1 1 170px; }
@media (max-width: 700px) {
    .account-switcher > summary { display: grid; place-items: center; width: 48px; height: 60px; padding: 0; font-size: 0; }
    .account-switcher > summary::after { content: "⇄"; font-size: 25px; }
    .account-switcher-panel { left: 0; right: auto; }
}

.theme-toggle,
.density-toggle {
    width: auto;
    min-width: 118px;
    background: var(--surface-2);
    color: var(--light);
    border: 1px solid var(--line);
}

.density-toggle[aria-pressed="true"] {
    border-color: var(--accent);
}

.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: 0;
    line-height: 1.08;
}

.page-title-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.page-title p {
    margin: 8px 0 0;
    color: var(--beige);
    max-width: 760px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 190px;
    color: var(--beige);
    text-decoration: none;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
}

.user-chip span {
    display: grid;
    line-height: 1.2;
}

.user-chip strong {
    color: var(--light);
    font-size: 14px;
}

.user-chip small {
    color: var(--beige);
    margin-top: 3px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--soft);
    border: 1px solid var(--line);
}

.location-logo {
    display: block;
    width: 120px;
    max-height: 90px;
    margin: 12px 0;
    object-fit: contain;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack-gap { margin-top: 18px; }

.card,
.table-wrap,
.form-panel {
    background: linear-gradient(180deg, var(--surface), var(--mid));
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
}

.card { padding: clamp(18px, 2.5vw, 24px); }

.metric {
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--beige);
    font-size: 14px;
    border-top: 3px solid var(--accent);
}

.metric strong {
    display: block;
    color: var(--light);
    font-size: 36px;
    line-height: 1;
    margin-top: 12px;
}

.personal-metric {
    min-height: 100px;
    padding: 16px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface-2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    color: var(--beige);
}

.personal-metric strong { color: var(--light); font-size: 30px; line-height: 1; }

.calendar-head { align-items: center; }
.calendar-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.calendar-nav .button { min-width: 42px; text-align: center; }
.calendar-scroll { overflow-x: auto; }
.calendar-grid {
    min-width: 760px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--line-strong);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    overflow: hidden;
}
.calendar-weekday { padding: 9px; background: var(--surface-2); text-align: center; font-weight: 700; }
.calendar-day { min-height: 126px; padding: 8px; background: var(--surface); }
.calendar-day.is-outside { opacity: .5; }
.calendar-day.is-selected { box-shadow: inset 0 0 0 2px var(--accent); }
.calendar-day.is-today .calendar-day-number { background: var(--accent); color: #171717; }
.calendar-day-number {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-bottom: 5px;
    border-radius: 50%;
    font-weight: 700;
    text-decoration: none;
}
.calendar-entry {
    display: block;
    margin: 3px 0;
    padding: 4px 6px;
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    background: rgba(228, 122, 9, .16);
    font-size: 12px;
    line-height: 1.3;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.calendar-entry.pitch { border-color: #418dc3; background: rgba(65, 141, 195, .18); }
.calendar-more { display: inline-block; padding: 2px 4px; font-size: 12px; }
.calendar-detail {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
    text-decoration: none;
}
.calendar-detail:hover strong, .calendar-entry:hover { text-decoration: underline; }
.calendar-detail > :last-child { margin-left: auto; }
.calendar-detail small { display: block; }
.calendar-kind {
    display: inline-block;
    flex: 0 0 auto;
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.calendar-kind.pitch { border-color: #418dc3; }

.form-panel { padding: clamp(18px, 2.6vw, 24px); }

.spec-editor-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.spec-editor-toolbar button { min-height: 34px; padding: 7px 11px; }
.spec-editor-status { color: var(--beige); font-size: 14px; }
.spec-editor-status.is-error { color: #ef6262; }
.spec-tree-frame { max-height: 65vh; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.spec-node-list { list-style: none; margin: 0; padding: 0; }
.spec-node-list .spec-node-list { margin: 7px 0 7px 16px; padding-left: 14px; border-left: 1px solid var(--line); }
.spec-node { margin: 0 0 7px; }
.spec-node-row { display: flex; align-items: center; gap: 6px; min-height: 38px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.spec-node-name { flex: 1; min-width: 90px; overflow-wrap: anywhere; }
.spec-node-id { color: var(--beige); font-size: 11px; }
button.spec-node-button { min-height: 25px; padding: 3px 7px; border: 1px solid var(--line); background: var(--surface-2); color: var(--light); font-size: 12px; font-weight: 500; }
button.spec-drag-handle { width: 26px; min-width: 26px; padding: 0; cursor: grab; touch-action: none; font-size: 17px; }
button.spec-drag-handle:active { cursor: grabbing; }
button.spec-delete { border-color: #c94747; color: #ee8888; }
.spec-dragging > .spec-node-row { opacity: .5; }
.spec-node-row.spec-drop-child { outline: 2px solid var(--accent); outline-offset: 1px; }
.spec-node-row.spec-drop-before { border-top: 3px solid var(--accent); }
.spec-node-row.spec-drop-after { border-bottom: 3px solid var(--accent); }
.spec-root-drop { margin-top: 10px; padding: 9px; border: 1px dashed var(--line); border-radius: 7px; color: var(--beige); font-size: 12px; text-align: center; }
.spec-root-drop.spec-drop-root { border-color: var(--accent); color: var(--light); background: var(--surface); }
.spec-root-drop[hidden] { display: none !important; }
@media (max-width: 700px) {
    .spec-node-row { flex-wrap: wrap; }
    .spec-node-name { flex-basis: calc(100% - 40px); }
    .spec-node-id { margin-left: 30px; margin-right: auto; }
    button.spec-node-button { width: auto; }
}

label {
    display: grid;
    gap: 7px;
    color: var(--beige);
    font-size: 14px;
    margin-bottom: 14px;
}

.field-with-tip { display: grid; gap: 7px; align-content: start; margin-bottom: 14px; color: var(--beige); font-size: 14px; }
.field-label-row { display: flex; align-items: center; gap: 5px; }
.field-label-row label { display: inline; margin: 0; }
.info-tip-wrap { position: relative; display: inline-flex; align-items: center; flex: none; }
button.info-tip { width: 15px; min-width: 15px; min-height: 15px; height: 15px; padding: 0; border-radius: 50%; font-size: 10px; line-height: 1; }
.info-tip-text { position: absolute; left: 21px; top: 50%; z-index: 10; width: max-content; max-width: min(260px, 72vw); transform: translateY(-50%); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--light); box-shadow: 0 4px 15px rgba(0, 0, 0, .25); visibility: hidden; opacity: 0; pointer-events: none; }
.info-tip-wrap:hover .info-tip-text, .info-tip-wrap:focus-within .info-tip-text { visibility: visible; opacity: 1; }
.user-extra-info-field { grid-column: 1 / -1; }
.user-extra-info-field textarea { min-height: 105px; }
.user-additional-info { white-space: pre-wrap; overflow-wrap: anywhere; }
.upload-progress { display: grid; gap: 5px; margin: 8px 0 14px; }
.upload-progress progress { width: 100%; accent-color: var(--accent); }
.upload-error { color: #c62828; font-weight: 700; }
.upload-progress[hidden], .upload-error[hidden] { display: none !important; }

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(255, 248, 239, 0.2);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--light);
    padding: 12px 13px;
    font: inherit;
    outline: none;
}

select { font-weight: 700; }
select option { font-weight: 400; }
select option:checked { font-weight: 700; }

.event-form input[data-event-end-date]:disabled {
    background: #494949;
    border-color: #626262;
    color: #b8b8b8;
    opacity: 1;
    cursor: not-allowed;
}

:root[data-theme="light"] .event-form input[data-event-end-date]:disabled {
    background: #e2ddd7;
    border-color: #c9c1b8;
    color: #766e66;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(228, 122, 9, 0.18);
}

input[autocomplete="one-time-code"] {
    border: 2px solid #9a8d80;
}

:root[data-theme="light"] input[autocomplete="one-time-code"] {
    background: #fff;
    border-color: #8f7d6d;
}

input[autocomplete="one-time-code"]:focus,
:root[data-theme="light"] input[autocomplete="one-time-code"]:focus {
    border-color: var(--accent);
}

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

textarea.coe-comment {
    background: #242424;
    border: 2px solid #9a8d80;
}

:root[data-theme="light"] textarea.coe-comment {
    background: #fff;
    border-color: #8f7d6d;
}

textarea.coe-comment:focus { border-color: var(--accent); }

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-row input {
    width: 18px;
    min-height: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.coe-notify-option { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.coe-notify-option > .check-row { margin: 0; }
.coe-notify-option > .is-unavailable { opacity: 0.55; }

.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: 6px 18px;
    margin: 2px 0 18px;
}

.role-grid .check-row {
    min-height: 32px;
    margin: 0;
}

.role-grid .check-row input { flex: none; }

.score-field { gap: 12px; }
.score-heading,
.score-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.score-heading output { color: var(--light); font-size: 16px; font-weight: 700; }
.score-control > span { color: var(--beige); font-variant-numeric: tabular-nums; }
input[type="range"][data-score-range] {
    min-width: 0;
    min-height: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    accent-color: var(--accent);
    cursor: pointer;
}

input[type="range"][data-score-range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

button,
.button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: var(--ink);
    padding: 10px 16px;
    font-weight: 820;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.2;
    white-space: nowrap;
}

.nav .nav-logout {
    width: 100%;
    justify-content: flex-start;
    background: transparent;
    color: var(--beige);
    border: 1px solid transparent;
    padding: 10px 12px;
}

.nav .nav-logout:hover {
    background: var(--mid);
    color: var(--light);
    border-color: var(--line);
}

button:disabled,
.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.button.secondary,
button.secondary { background: var(--soft); color: var(--light); }
.button.danger,
button.danger { background: var(--red); color: #fff; }

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

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert.success {
    color: #dff8e9;
    background: rgba(33, 150, 83, 0.14);
    border-color: rgba(33, 150, 83, 0.36);
}

.alert.error {
    color: #ffe5e5;
    background: rgba(237, 16, 16, 0.14);
    border-color: rgba(237, 16, 16, 0.34);
}

:root[data-theme="light"] .alert.success {
    color: #195638;
    background: #e6f2e8;
    border-color: #8bbf9c;
}

:root[data-theme="light"] .alert.error {
    color: #842626;
    background: #fce9e9;
    border-color: #dba0a0;
}

.table-wrap {
    overflow: hidden;
}

.partner-table { overflow-x: auto; }
.partner-table table { min-width: 1150px; }
.partner-form { max-width: 960px; }
.security-panel { max-width: 760px; }
.security-qr { display: block; width: min(260px, 100%); background: #fff; padding: 12px; border-radius: 8px; }
.security-secret { overflow-wrap: anywhere; user-select: all; }
.security-recovery-codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.security-recovery-codes code { background: var(--soft); padding: 8px; border-radius: 5px; }
.security-sessions { margin-top: 16px; overflow-x: auto; }
.security-sessions table { min-width: 760px; }
.security-sessions td:first-child { max-width: 340px; overflow-wrap: anywhere; }
.audit-table-wrap { overflow-x: auto; }
.audit-table-wrap table { min-width: 820px; }
.audit-details { max-width: 36rem; white-space: pre-wrap; overflow-wrap: anywhere; }

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    color: var(--beige);
    font-size: 13px;
    font-weight: 760;
}

tr:last-child td { border-bottom: 0; }

.location-table-name { display: flex; align-items: center; gap: 12px; }
.location-table-name span { display: grid; gap: 3px; min-width: 0; }
.location-table-name small { font-size: 12px; line-height: 1.35; }
.location-table-logo { width: 44px; height: 44px; flex: 0 0 auto; object-fit: contain; }
.location-create-open { min-height: 32px; padding: 5px 12px; font-size: 14px; line-height: 1.2; transform: translateY(3px); }
.location-table-name a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.location-profile-actions { margin-bottom: 14px; }
.location-profile-heading { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.location-profile-heading h2 { margin-bottom: 4px; }
.location-profile-heading p { margin: 0; }
.location-profile-logo { width: 104px; height: 104px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.location-logo-editor { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.location-logo-editor img { width: 80px; height: 80px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px; }
.location-logo-editor img[hidden], .location-logo-editor span[hidden] { display: none; }
.location-media-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.location-media-item { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.location-media-item img, .location-media-item video { display: block; width: 100%; height: auto; background: #171717; }
.location-media-comment { margin: 0; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.location-media-comment-edit { padding: 0 12px 12px; }
.location-media-comment-edit summary { cursor: pointer; color: var(--beige); }
.location-media-comment-edit form { margin-top: 12px; }
.location-media-comment-edit textarea, .location-media-upload textarea { min-height: 90px; }
.location-media-actions { padding: 0 12px 12px; }
.location-media-actions form { margin: 0; }
.location-media-actions button { min-height: 34px; padding: 6px 10px; }
.location-media-upload { margin-top: 18px; }
.location-media-upload p { margin: 0 0 12px; }
.location-leader { display: grid; gap: 2px; min-width: 180px; }
.location-leader small { color: var(--beige); overflow-wrap: anywhere; }

.location-dialog {
    width: min(580px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--light);
    box-shadow: var(--shadow);
}

.location-dialog::backdrop { background: rgba(0, 0, 0, 0.68); }
.location-dialog .form-panel { border: 0; box-shadow: none; }
.location-dialog .actions { justify-content: flex-end; }

.bug-report-dialog { width: min(740px, calc(100vw - 32px)); }
.bug-confirmation-dialog { width: min(420px, calc(100vw - 32px)); }
.bug-confirmation-dialog h2, .bug-confirmation-dialog p { margin: 0; }
.bug-report-dialog [readonly] { background: var(--surface-2); color: var(--light); }
.bug-report-dialog input.bug-login-readonly,
.bug-report-dialog input.bug-login-readonly:focus {
    background: #494949;
    border-color: #626262;
    color: #b8b8b8;
    box-shadow: none;
    cursor: not-allowed;
}
:root[data-theme="light"] .bug-report-dialog input.bug-login-readonly,
:root[data-theme="light"] .bug-report-dialog input.bug-login-readonly:focus {
    background: #e2ddd7;
    border-color: #c9c1b8;
    color: #766e66;
}
.bug-report-dialog .form-panel { display: grid; gap: 12px; }
.bug-report-dialog .form-panel > label { margin: 0; }
.bug-report-dialog textarea { min-height: 145px; }
.bug-paste-area { padding: 16px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--beige); }
.bug-paste-area:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bug-voice-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.bug-voice-controls button { width: auto; }
.bug-queued-files { display: grid; gap: 8px; }
.bug-queued-item { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.bug-queued-details { min-width: 0; display: grid; gap: 8px; overflow-wrap: anywhere; }
.bug-queued-details img { max-width: 180px; max-height: 110px; object-fit: contain; }
.bug-queued-details audio { width: min(350px, 100%); }
.bug-queued-item button { width: auto; flex: 0 0 auto; }
.bug-upload-progress progress { width: 100%; }
.bug-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.bug-filter label { min-width: 220px; margin: 0; }
.bug-filter button { width: auto; }
.bug-table { min-width: 720px; }
.bug-url-cell { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bug-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.bug-facts p { margin: 0; overflow-wrap: anywhere; }
.bug-facts p:last-child { grid-column: 1 / -1; }
.bug-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.bug-attachment { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.bug-attachment-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; overflow-wrap: anywhere; }
.bug-attachment-heading a { margin-left: auto; }
.bug-attachment img { display: block; max-width: 100%; max-height: 600px; object-fit: contain; }
.bug-attachment audio { width: min(420px, 100%); }
.bug-status-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.bug-status-form label { min-width: 220px; margin: 0; }
.bug-status-form button { width: auto; }

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 820;
    background: rgba(221, 209, 195, 0.14);
    color: var(--beige);
}

.badge.green { background: rgba(33, 150, 83, 0.17); color: #a9efc7; }
:root[data-theme="light"] .badge.green { background: rgba(33, 150, 83, 0.16); color: #176b3a; }
.badge.red { background: rgba(237, 16, 16, 0.16); color: #ffb8b8; }
:root[data-theme="light"] .badge.red { background: rgba(237, 16, 16, 0.12); color: #a12626; }
.badge.orange { background: rgba(228, 122, 9, 0.18); color: #ffc27f; }

.news-item + .news-item {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    margin-top: 16px;
}

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

.person-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 248, 239, 0.035);
    text-decoration: none;
}

:root[data-theme="light"] .person-row {
    background: rgba(45, 45, 45, 0.035);
}

.person-row span {
    display: grid;
    min-width: 0;
}

.person-row strong,
.person-row small {
    overflow-wrap: anywhere;
}

.person-row small {
    color: var(--beige);
}

.admin-user-filters {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(2, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
    margin: 16px 0 8px;
}

button.admin-user-add { width: auto; min-height: 32px; padding: 5px 12px; font-size: 14px; line-height: 1.2; transform: translateY(3px); }
button.admin-user-roles-open { width: auto; min-height: 32px; padding: 5px 12px; font-size: 14px; line-height: 1.2; transform: translateY(3px); }
.admin-user-dialog { width: min(900px, calc(100vw - 32px)); }
.admin-roles-dialog { width: min(760px, calc(100vw - 32px)); }
.admin-roles-dialog:has(.rights-matrix-wrap) { width: min(1320px, calc(100vw - 32px)); max-height: 90vh; }
.rights-matrix-wrap { display: grid; gap: 14px; min-width: 0; }
.rights-matrix-shared-scroll { max-width: 100%; overflow-x: auto; }
.rights-matrix-shared-scroll.rights-matrix-enhanced { scrollbar-width: none; }
.rights-matrix-shared-scroll.rights-matrix-enhanced::-webkit-scrollbar { display: none; }
.rights-matrix-shared-scroll .rights-matrix-wrap { width: 100%; min-width: 2100px; }
.rights-matrix-shared-scroll .rights-table-scroll { max-width: none; overflow: visible; }
.rights-matrix-shared-scroll .rights-table { table-layout: fixed; min-width: 2100px; }
.rights-matrix-shared-scroll .rights-table th:first-child { width: 320px; }
.rights-matrix-viewport-scrollbar { position: fixed; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 30; height: 20px; padding: 2px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px; box-shadow: var(--shadow); cursor: pointer; touch-action: none; }
.rights-matrix-viewport-scrollbar[hidden] { display: none; }
.rights-matrix-viewport-scrollbar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rights-matrix-scrollbar-thumb { position: absolute; top: 2px; left: 2px; height: 14px; border-radius: 999px; background: var(--brand); cursor: grab; }
.rights-matrix-viewport-scrollbar:active .rights-matrix-scrollbar-thumb { cursor: grabbing; }
.rights-category { border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-width: 0; }
.rights-category summary { cursor: pointer; font-weight: 700; }
.rights-table-scroll { max-width: 100%; overflow: auto; margin-top: 10px; }
.admin-roles-dialog .rights-table-scroll { max-height: 55vh; }
.rights-table { border-collapse: separate; border-spacing: 0; min-width: 1850px; width: 100%; font-size: 13px; }
.rights-table th, .rights-table td { border-bottom: 1px solid var(--line); padding: 8px; text-align: center; vertical-align: middle; min-width: 120px; }
.rights-table th:first-child { position: sticky; left: 0; z-index: 2; min-width: 280px; max-width: 360px; text-align: left; background: var(--surface); }
.rights-table thead th { position: sticky; top: 0; z-index: 3; background: var(--surface); }
.rights-table thead th:first-child { z-index: 4; }
.rights-table th small { display: block; font-weight: 400; margin-top: 4px; }
.rights-table td select { min-width: 110px; width: 100%; padding: 6px; font-size: 12px; }
.rights-table td select.rights-none-selected { background: rgba(175, 175, 175, 0.18); border-color: rgba(175, 175, 175, 0.42); color: #c6c6c6; }
.rights-table td select option.rights-none-option { background: #555; color: #e2e2e2; }
.rights-table td span.rights-none-selected { display: inline-block; padding: 4px 7px; border-radius: 5px; background: rgba(175, 175, 175, 0.18); color: #c6c6c6; }
:root[data-theme="light"] .rights-table td select.rights-none-selected { background: rgba(100, 100, 100, 0.12); border-color: rgba(100, 100, 100, 0.36); color: #555; }
:root[data-theme="light"] .rights-table td select option.rights-none-option { background: #d8d8d8; color: #444; }
:root[data-theme="light"] .rights-table td span.rights-none-selected { background: rgba(100, 100, 100, 0.12); color: #555; }
.rights-table td input[type="checkbox"] { width: 18px; height: 18px; }
.rights-yes { font-weight: 700; }
.rights-save { margin-top: 18px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.course-card { min-width: 0; }
.course-card h2 { margin: 10px 0; }
.course-card a { text-decoration: none; }
.course-cover { width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; }
.course-hero-cover { display: block; width: min(100%, 680px); max-height: 420px; object-fit: contain; margin-bottom: 16px; }
.course-description { white-space: pre-wrap; }
.course-meta-form { display: grid; gap: 15px; }
.course-meta-form > button { justify-self: start; }
.course-cover-edit { max-width: 320px; max-height: 220px; object-fit: contain; }
.course-upload { display: grid; gap: 12px; }
.course-upload > button { justify-self: start; }
.course-upload-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 15px; }
.course-upload progress { width: 100%; }
.course-folder { border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; padding: 10px; }
.course-folder summary { cursor: pointer; font-weight: 700; }
.course-folder-body { padding: 10px 0 0 15px; }
.course-folder-actions, .course-item-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.course-folder-actions form, .course-item-actions form { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.course-folder-actions input, .course-item-actions input { width: min(230px, 100%); }
.course-folder-actions button, .course-item-actions button { width: auto; }
.course-file-row { border-top: 1px solid var(--line); padding: 12px 0; }
.course-file-main { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.course-file-main strong { overflow-wrap: anywhere; }
.course-file-main .button { width: auto; }
.course-media { display: block; width: min(100%, 900px); max-height: 600px; object-fit: contain; margin: 12px 0; background: #111; }
.course-conflict-dialog { width: min(560px, calc(100vw - 24px)); }
.admin-role-descriptions { display: grid; gap: 0; margin: 16px 0; }
.admin-role-descriptions > div { padding: 13px 0; border-top: 1px solid var(--line); }
.admin-role-descriptions dt { font-weight: 800; color: var(--light); margin-bottom: 4px; }
.admin-role-descriptions dd { margin: 0; color: var(--beige); line-height: 1.5; }
.admin-user-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.admin-user-dialog-heading h2 { margin: 0; }
button.admin-user-dialog-close { width: 34px; min-height: 34px; height: 34px; padding: 0; font-size: 24px; }
.admin-user-filters label { margin-bottom: 0; }
.admin-user-count { margin: 0 0 12px; }
.admin-user-details { display: grid; gap: 3px; min-width: 0; flex: 1; }
.admin-user-details a,
.admin-user-details small { overflow-wrap: anywhere; }
.admin-user-row .badge { flex: none; }
.admin-user-row[data-user-status="blocked"] {
    background: rgba(180, 180, 180, 0.16);
    border-color: rgba(190, 190, 190, 0.28);
}
:root[data-theme="light"] .admin-user-row[data-user-status="blocked"] {
    background: rgba(80, 80, 80, 0.12);
    border-color: rgba(80, 80, 80, 0.22);
}
.admin-user-back { margin-bottom: 18px; }
.admin-user-avatar-field { display: grid; justify-items: start; gap: 8px; min-width: 0; }
.admin-user-avatar-field label { width: 100%; }
.admin-user-avatar-preview { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--soft); border: 1px solid var(--line); }
.admin-user-row[hidden],
[data-user-filter-empty][hidden] { display: none !important; }

.inline-edit {
    display: grid;
    gap: 10px;
}

.inline-edit label {
    margin-bottom: 0;
}

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

.filters label {
    margin-bottom: 0;
}

.recruitment-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.recruitment-tabs a { padding: 9px 4px; border-bottom: 3px solid transparent; color: var(--beige); text-decoration: none; font-weight: 700; }
.recruitment-tabs a:hover { color: var(--light); }
.recruitment-tabs a.is-active { color: var(--light); border-bottom-color: var(--accent); }
.recruitment-explanation { margin-bottom: 18px; }
.recruitment-filters { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.recruitment-filter-actions { display: flex; gap: 8px; align-items: end; }
.recruitment-filter-actions .button, .recruitment-filter-actions button { flex: 1; }
.recruitment-candidate { min-width: 0; }
.recruitment-candidate.is-blocked { opacity: 0.68; }
.recruitment-candidate-head { display: flex; align-items: center; gap: 11px; }
.recruitment-candidate-head h3 { margin: 0; }
.recruitment-candidate-head .avatar { width: 50px; height: 50px; flex: none; }
.recruitment-candidate p { margin: 10px 0 0; overflow-wrap: anywhere; }
.recruitment-stat-cards .card { display: grid; gap: 3px; }
.recruitment-stat-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.recruitment-stat-cards strong { color: var(--accent); font-size: 28px; line-height: 1.15; }
.recruitment-stat-cards span { color: var(--beige); }
.recruitment-charts { margin-top: 18px; align-items: start; }
.recruitment-bar-row + .recruitment-bar-row { margin-top: 12px; }
.recruitment-bar-caption { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; font-size: 14px; }
.recruitment-bar-caption span { overflow-wrap: anywhere; }
.recruitment-bar-caption strong { font-variant-numeric: tabular-nums; }
.recruitment-bar-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.recruitment-bar-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 18px;
    margin-top: 18px;
}

.pagination-links,
.pagination-controls,
.pagination-page-jump {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.pagination-page-jump { flex-wrap: nowrap; }

.pagination .button,
.pagination-disabled,
.pagination-controls button {
    width: auto;
    height: 34px;
    min-height: 34px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
}

.pagination-disabled {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--beige);
    opacity: 0.55;
}

.pagination-status {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 8px;
    white-space: nowrap;
    font-size: 13px;
}

.pagination-controls label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    white-space: nowrap;
    font-size: 13px;
}

.pagination-controls input,
.pagination-controls select {
    height: 34px;
    min-height: 34px;
    box-sizing: border-box;
    padding: 5px 8px;
    font-size: 13px;
}

.pagination-controls input[type="number"] { width: 70px; }
.pagination-controls select { width: 74px; }

.compact-panel {
    margin: 16px 0;
    padding: 16px;
}

.compact-panel legend {
    padding: 0 6px;
    color: var(--light);
    font-weight: 820;
}

.readonly-note {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 12px 13px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 248, 239, 0.035);
    color: var(--beige);
}

:root[data-theme="light"] .readonly-note {
    background: rgba(45, 45, 45, 0.035);
}

.event-form [hidden] {
    display: none !important;
}
.event-form > button[type="submit"] { margin-top: 16px; }

.timeline-item {
    border-left: 2px solid var(--accent);
    padding: 0 0 14px 14px;
}

.timeline-item + .timeline-item {
    margin-top: 12px;
}

.timeline-item span {
    display: block;
    margin-top: 4px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.section-head p {
    margin: 0;
}

.coe-section-head,
.coe-expert-row {
    flex-wrap: wrap;
}

.coe-expert-row label {
    flex: 1 1 190px;
    margin-bottom: 0;
}

.coe-file-link {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}
.coe-pitch-video { display: block; width: 100%; max-height: 560px; border-radius: 8px; background: #000; }
.coe-review-expert { display: flex; align-items: center; gap: 12px; }
.coe-review-expert h3, .coe-review-expert p { margin: 0; }
.coe-review-avatar { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; object-fit: cover; background: var(--soft); border: 1px solid var(--line); }

.coe-cover {
    display: block;
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--soft);
}

.coe-table-wrap { overflow-x: auto; }
.coe-table-heading { margin: 0; padding: 20px 16px 8px; }
.coe-table { min-width: 760px; }
.coe-table th,
.coe-table td { padding: 12px; }
.coe-table th:first-child,
.coe-table td:first-child { min-width: 190px; }
.coe-table-idea { display: flex; align-items: flex-start; gap: 10px; }
.coe-table-idea > span { min-width: 0; }
.coe-table-title { display: block; font-weight: 750; overflow-wrap: anywhere; }
.coe-table-idea small,
.coe-table-note { display: block; margin-top: 5px; }
.coe-table-cover { width: 48px; height: 48px; flex: 0 0 auto; object-fit: cover; border-radius: 6px; }
.coe-table-action { white-space: nowrap; }
.coe-idea-status { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 13px; font-weight: 750; white-space: nowrap; }
.coe-idea-status-accepted { background: rgba(33, 150, 83, .24); color: #b9f0cd; }
.coe-idea-status-evaluating { background: rgba(234, 191, 48, .25); color: #ffe597; }
.coe-idea-status-rejected { background: rgba(237, 57, 57, .23); color: #ffc0c0; }
.coe-idea-status-pending { background: rgba(155, 102, 221, .25); color: #e4ccff; }
:root[data-theme="light"] .coe-idea-status-accepted { color: #156939; }
:root[data-theme="light"] .coe-idea-status-evaluating { color: #725200; }
:root[data-theme="light"] .coe-idea-status-rejected { color: #a12525; }
:root[data-theme="light"] .coe-idea-status-pending { color: #68339e; }
.coe-idea-type { font-weight: 750; }
.coe-idea-type-startup { color: #ffb35f; }
.coe-idea-type-educational { color: #9bc5ff; }
.coe-idea-type-research { color: #80ded4; }
.coe-idea-type-social { color: #f2aad7; }
.coe-idea-type-internal { color: #c2afff; }
.coe-idea-type-space { color: #e1c394; }
.coe-idea-type-mil { color: #ff9b9b; }
:root[data-theme="light"] .coe-idea-type-startup { color: #9d5100; }
:root[data-theme="light"] .coe-idea-type-educational { color: #205a9c; }
:root[data-theme="light"] .coe-idea-type-research { color: #08736c; }
:root[data-theme="light"] .coe-idea-type-social { color: #8c326d; }
:root[data-theme="light"] .coe-idea-type-internal { color: #6240a0; }
:root[data-theme="light"] .coe-idea-type-space { color: #795b24; }
:root[data-theme="light"] .coe-idea-type-mil { color: #a12b2b; }

.project-facts { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.project-facts > * { margin: 0; }
.project-text { white-space: pre-wrap; }
.project-action { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.project-action > summary { cursor: pointer; font-weight: 750; color: var(--light); }
.project-action > form { margin-top: 18px; }
.project-action [hidden] { display: none !important; }
.project-initial-team > p { margin: 12px 0; }
.project-initial-member { margin: 12px 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.project-initial-member-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.project-initial-member-heading h3 { margin: 0; }
.project-initial-member-heading button { min-height: 34px; padding: 6px 10px; }
.project-edit-team-heading { margin-top: 24px; }
.project-edit-member { margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.project-edit-member h3 { margin: 0 0 6px; }
.project-edit-member-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.project-edit-member-heading button { min-height: 34px; padding: 6px 10px; }
.project-edit-member .muted { margin: 0 0 10px; }
.project-edit-save { margin-top: 20px; }
.project-stage-table-wrap,
.project-team-table-wrap,
.project-gantt-scroll,
.project-team-scroll { overflow-x: auto; }
.project-stage-table { min-width: 1120px; table-layout: fixed; }
.project-stage-table th,
.project-stage-table td { padding: 14px 11px; vertical-align: middle; overflow-wrap: anywhere; }
.project-stage-table th { text-transform: uppercase; letter-spacing: .045em; font-size: 11px; }
.project-stage-table th:nth-child(1) { width: 4%; }
.project-stage-table th:nth-child(2) { width: 15%; }
.project-stage-table th:nth-child(3) { width: 20%; }
.project-stage-table th:nth-child(4),
.project-stage-table th:nth-child(5) { width: 10%; }
.project-stage-table th:nth-child(6) { width: 13%; }
.project-stage-table th:nth-child(7) { width: 15%; }
.project-stage-table th:nth-child(8) { width: 9%; }
.project-stage-table th:nth-child(9) { width: 4%; }
.project-stage-table td:first-child { color: var(--beige); }
.project-stage-text { white-space: pre-wrap; line-height: 1.5; }
.project-stage-menu { position: relative; }
.project-stage-menu > summary { list-style: none; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; border-radius: 6px; color: var(--light); font-size: 22px; font-weight: 800; }
.project-stage-menu > summary::-webkit-details-marker { display: none; }
.project-stage-menu > summary:hover,
.project-stage-menu[open] > summary { background: var(--soft); }
.project-stage-menu-content { position: relative; z-index: 3; width: 285px; margin-left: -253px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }
.project-stage-menu-content > * + * { margin-top: 10px; }
.project-stage-menu-content p { margin: 0; }
.project-stage-menu-content button { width: 100%; }
.project-stage-report > summary { cursor: pointer; font-weight: 700; }
.project-stage-report form { margin-top: 12px; }
.project-stage-report label { margin-top: 10px; }
.project-stage-report textarea,
.project-stage-report input { min-width: 0; }
.project-stage-menu-content a { display: block; padding: 6px 0; }
.project-stage-menu-content button { white-space: normal; }
.project-team-scroll { border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.project-team-map { position: relative; min-width: 760px; height: 520px; }
.project-team-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.project-team-links line { stroke: var(--line-strong); stroke-width: .2; }
.project-team-hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 145px; height: 145px; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center; border-radius: 50%; background: var(--accent); color: #19130c; box-shadow: 0 7px 24px rgba(0, 0, 0, .2); z-index: 1; }
.project-team-hub span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.project-team-hub strong { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; overflow-wrap: anywhere; }
.project-team-node { position: absolute; transform: translate(-50%, -50%); width: 136px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; z-index: 2; }
.project-team-node > a,
.project-team-unknown { width: 66px; height: 66px; display: block; border: 3px solid var(--accent); border-radius: 50%; background: var(--mid); overflow: hidden; }
.project-team-node.mentors > a,
.project-team-node.mentors .project-team-unknown { border-color: #79bbdd; }
.project-team-node.external_mentors > a,
.project-team-node.external_mentors .project-team-unknown { border-color: #aa91d6; }
.project-team-node img { width: 100%; height: 100%; object-fit: cover; }
.project-team-node [data-team-drag-handle] { cursor: grab; touch-action: none; user-select: none; -webkit-user-drag: none; }
.project-team-node.is-dragging [data-team-drag-handle] { cursor: grabbing; }
.project-team-node img { user-select: none; -webkit-user-drag: none; }
.project-team-unknown { display: grid; place-items: center; font-weight: 800; font-size: 25px; }
.project-team-node-name { max-width: 100%; color: var(--light); font-weight: 760; font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; }
.project-team-node small { color: var(--beige); font-size: 11px; line-height: 1.2; }
.project-team-table { min-width: 620px; }
.project-team-table th:last-child,
.project-team-table td:last-child { width: 96px; }
.project-team-role { display: block; line-height: 1.5; }
.project-team-role strong { color: var(--light); }
.project-team-table-avatar { width: 52px; height: 52px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }
.project-member-role-fieldset { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.project-member-role-fieldset legend { padding: 0 6px; color: var(--light); }
.project-member-role-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 16px; max-height: 290px; overflow: auto; }
.project-member-role-list .check-row { margin: 0; }
button.project-role-drag { width: 34px; min-height: 34px; padding: 4px; cursor: grab; touch-action: none; user-select: none; }
button.project-role-drag:active { cursor: grabbing; }
button.project-role-delete { min-height: 34px; margin-top: 9px; padding: 6px 10px; }
.profile-project-roles { margin: 12px 0 18px; }
.project-role-people > summary { cursor: pointer; }
.profile-role-picker { margin-top: 12px; }
.profile-role-selected { display: flex; flex-wrap: wrap; gap: 7px; }
.profile-role-selected:has(.profile-role-chip) { margin-bottom: 10px; }
.profile-role-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); padding: 3px 5px 3px 10px; }
.profile-role-chip > span { overflow-wrap: anywhere; }
.profile-role-chip button[data-profile-role-remove] { flex: none; width: 26px; min-height: 26px; padding: 0; border: 0; background: transparent; color: var(--beige); font-size: 20px; font-weight: 400; }
.profile-role-chip button[data-profile-role-remove]:hover, .profile-role-chip button[data-profile-role-remove]:focus-visible { color: var(--light); background: var(--soft); }
.profile-role-add-row { display: flex; align-items: flex-start; gap: 9px; }
button.profile-role-add { flex: none; width: auto; min-height: 34px; height: 34px; padding: 5px 12px; font-size: 14px; line-height: 1; }
.profile-role-search-wrap { flex: 1; min-width: 0; }
.profile-role-search-wrap input { min-height: 34px; height: 34px; padding: 5px 10px; }
.profile-role-suggestions { max-height: 240px; overflow-y: auto; margin-top: 5px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); }
.profile-role-suggestions button[role="option"] { display: block; width: 100%; min-height: 34px; padding: 7px 10px; border-radius: 0; background: transparent; color: var(--light); font-weight: 500; text-align: left; white-space: normal; }
.profile-role-suggestions button[role="option"]:hover, .profile-role-suggestions button[aria-selected="true"] { background: var(--soft); }
.profile-role-empty { margin: 7px 10px; font-size: 13px; }
.project-role-people + .project-role-people { margin-top: 8px; }
.project-role-people ul { padding-left: 20px; min-width: 260px; }
.project-role-people li + li { margin-top: 6px; }
.role-tree-counts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 6px 8px 11px 39px; }
.role-tree-counts .project-role-people { margin: 0; min-width: 135px; }
.role-tree-counts .project-role-people ul { margin: 7px 0; }
.role-tree-comment { margin: 5px 8px 0 39px; white-space: pre-wrap; }
.role-tree-group > .spec-node-row > .spec-node-name { font-weight: 800; }
[data-role-row].project-role-moving { opacity: .55; }
[data-role-row].project-role-drop-before { border-top: 3px solid var(--accent); }
[data-role-row].project-role-drop-after { border-bottom: 3px solid var(--accent); }
.project-completion-comment { white-space: pre-wrap; }
.project-gantt-scroll { border: 1px solid var(--line); border-radius: 8px; }
.project-gantt { display: grid; grid-template-columns: 210px minmax(660px, 1fr); min-width: 870px; }
.project-gantt-heading,
.project-gantt-axis { min-height: 52px; border-bottom: 1px solid var(--line); }
.project-gantt-heading { display: flex; align-items: center; padding: 10px 14px; font-weight: 760; }
.project-gantt-axis { position: relative; }
.project-gantt-axis span { position: absolute; top: 15px; transform: translateX(-50%); color: var(--beige); font-size: 11px; white-space: nowrap; }
.project-gantt-axis span:first-child { transform: none; }
.project-gantt-axis span:last-child { transform: translateX(-100%); }
.project-gantt-label,
.project-gantt-track { min-height: 47px; border-bottom: 1px solid var(--line); }
.project-gantt-label { display: flex; align-items: center; padding: 7px 14px; color: var(--light); font-size: 13px; overflow-wrap: anywhere; }
.project-gantt-track { position: relative; }
.project-gantt-gridline,
.project-gantt-today { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); pointer-events: none; }
.project-gantt-today { width: 2px; background: var(--accent); z-index: 1; }
.project-gantt-bar { position: absolute; top: 14px; height: 18px; min-width: 5px; border-radius: 5px; background: #56a7d3; z-index: 2; }
.project-gantt-bar.is-complete,
.project-gantt-key.is-complete { background: #68b88a; }
.project-gantt-bar:hover,
.project-gantt-bar:focus-visible { filter: brightness(1.25); outline: 2px solid var(--light); }
.project-gantt-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.project-gantt-key { display: inline-block; width: 18px; height: 9px; border-radius: 3px; background: #56a7d3; }
.mail-test { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.project-achievement-photo { display: block; max-width: 100%; max-height: 260px; object-fit: contain; border-radius: 6px; }
.personal-achievement-list { margin-top: 16px; }
.personal-achievement-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.personal-achievement img { display: block; width: 100%; max-height: 360px; object-fit: contain; border-radius: 6px; }
.coe-cell-label { display: none; }

.system-databases > summary,
.system-interfaces > summary { cursor: pointer; color: var(--light); font-size: 20px; font-weight: 700; }
.system-tab-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.system-tab-list [role="tab"] { background: var(--soft); color: var(--light); border: 1px solid var(--line); }
.system-tab-list [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.system-tab-panel[hidden] { display: none; }
.system-tab-panel > :first-child { margin-top: 0; }
.system-databases-content { margin-top: 18px; }
.system-integrity-results { margin-top: 22px; }
.system-integrity-result { padding: 12px 0; border-top: 1px solid var(--line); }
.system-integrity-result p { margin: 7px 0; }
.system-integrity-result ul { margin: 5px 0 10px; padding-left: 22px; overflow-wrap: anywhere; }
.system-integrity-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.integrity-ok { color: var(--green); font-weight: 700; }
.integrity-error { color: var(--red); font-weight: 700; }
.system-interface-row { display: grid; gap: 5px; }
.system-interface-row + .system-interface-row { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.system-interface-heading,
.system-interface-addresses { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 4px; }
.system-interface-row code { overflow-wrap: anywhere; }
.coe-weight-field { align-content: start; }
.system-db-card details { margin-top: 16px; }
.system-db-card summary { cursor: pointer; color: var(--light); font-weight: 700; }
.system-db-card ul { list-style: none; margin: 12px 0 0; padding: 0; }
.system-db-card li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line); }
.system-db-card li span { color: var(--beige); white-space: nowrap; }
#login-protection form > button[type="submit"] { margin-top: 18px; }

.network-card {
    overflow: hidden;
    padding-bottom: 24px;
}

.network-scroll {
    width: 100%;
    overflow-x: auto;
    padding: 8px 0;
    display: flex;
    justify-content: flex-start;
}

.network-graph {
    display: block;
    width: min(100%, 1200px);
    height: auto;
    min-width: 940px;
    flex: 0 0 auto;
    margin-inline: auto;
}

.network-people-links[hidden], .network-people-nodes[hidden] { display: none; }
.network-ukraine-map { opacity: 0; pointer-events: none; transition: opacity 340ms ease; }
.network-overview.is-ukraine-map .network-ukraine-map { opacity: .76; }

.network-link {
    stroke: var(--line-strong);
    stroke-width: 1.5;
}

.network-graph [data-map-node] {
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.network-graph.is-dragging,
.network-graph [data-map-node].is-dragging {
    cursor: grabbing;
}

.user-link {
    stroke-width: 1.1;
    stroke-dasharray: 5 7;
}

.center-node circle {
    fill: var(--accent);
    stroke: rgba(255, 248, 239, 0.48);
    stroke-width: 2;
}

.center-node text {
    fill: var(--ink);
    font-size: 15px;
    font-weight: 900;
    pointer-events: none;
}

.location-node circle {
    fill: var(--surface-2);
    stroke: var(--accent);
    stroke-width: 1.8;
}

.location-node text {
    fill: var(--light);
    font-size: 10px;
    font-weight: 820;
    pointer-events: none;
}

.user-node-link {
    text-decoration: none;
}

.user-node circle {
    fill: var(--mid);
    stroke: var(--line-strong);
    stroke-width: 1.5;
    transition: fill 160ms ease, stroke 160ms ease, transform 160ms ease;
}

.user-node.is-expert circle {
    stroke: var(--green);
    stroke-width: 2;
}

.user-avatar-image {
    pointer-events: all;
}

.user-avatar-ring {
    fill: none !important;
    stroke: var(--line-strong);
    stroke-width: 1.5;
}

.user-node.is-expert .user-avatar-ring {
    stroke: var(--green);
    stroke-width: 2;
}

.user-node-link:hover .user-node circle,
.user-node-link:focus .user-node circle {
    fill: var(--accent);
    stroke: var(--light);
}

.user-node text {
    fill: var(--light);
    pointer-events: none;
}

.user-node-link:hover text,
.user-node-link:focus text {
    fill: var(--ink);
}

.user-initial {
    font-size: 11px;
    font-weight: 900;
}

.network-card .section-head { align-items: center; flex-wrap: wrap; }
.network-view-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.network-view-tabs button { width: auto; min-height: 40px; padding: 8px 12px; border: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; background: transparent; color: var(--beige); font-size: 20px; font-weight: 800; }
.network-view-tabs button:hover { color: var(--light); }
.network-view-tabs button[aria-selected="true"] { color: var(--light); border-bottom-color: var(--accent); }
.network-view-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.network-totals, .network-toolbar, .network-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.network-totals { flex: 0 0 auto; }
.network-totals span { padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--beige); font-size: 13px; white-space: nowrap; }
.network-toolbar { justify-content: space-between; align-items: center; }
.network-toolbar select { flex: 1 1 240px; width: auto; min-width: 180px; height: 36px; min-height: 36px; padding: 5px 10px; }
.network-mode-controls, .network-mode-controls form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.network-mode-controls [hidden] { display: none !important; }
.network-mode-controls button { min-height: 36px; padding: 8px 12px; }
.network-mode-controls [data-network-mode-status] { margin-left: 6px; font-size: 13px; }
.network-legend { flex: 0 0 auto; margin-left: auto; color: var(--beige); font-size: 13px; }
.network-legend span { display: inline-flex; align-items: center; gap: 7px; }
.network-legend i { width: 12px; height: 12px; border-radius: 50%; }
.network-legend-core { background: var(--accent); }
.network-legend-location { border: 2px solid var(--accent); background: var(--surface-2); }
.network-legend-person { border: 2px solid var(--green); background: var(--surface-2); }
.network-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; min-height: 38px; text-align: center; }
.network-caption [hidden] { display: none; }
.network-caption button { min-height: 34px; padding: 7px 12px; }
.network-caption a { color: var(--accent); }
.network-overview .network-people-links .user-link { stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: none; opacity: .72; }
.network-map-person .user-initial { font-size: 13px; }
.network-map-person .user-avatar-ring { stroke-width: 2; }
.network-map-person .network-person-label { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.network-map-person .network-person-name { fill: var(--light); font-size: 13px; font-weight: 750; }
.network-map-person .network-person-role { fill: var(--beige); font-size: 11px; }
.network-map-person:hover .network-person-label { stroke: var(--accent); }
.network-overview .user-node-link:hover .network-person-name,
.network-overview .user-node-link:focus .network-person-name { fill: var(--light); }
.network-overview .user-node-link:hover .network-person-role,
.network-overview .user-node-link:focus .network-person-role { fill: var(--beige); }
.network-map-person text { pointer-events: none; }
.network-overview .location-link.is-highlighted { stroke: var(--accent); stroke-width: 3; }
.network-overview .location-link.is-dimmed { opacity: .15; }
.overview-location-node rect { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.6; }
.overview-location-node:hover rect,
.overview-location-node:focus-visible rect,
.overview-location-node.is-selected rect { stroke: var(--accent); stroke-width: 3; }
.overview-location-node.is-dimmed { opacity: .35; }
.overview-location-node .network-location-marker { fill: var(--accent); stroke: none; }
.overview-location-node .network-location-name { fill: var(--light); font-size: 13px; font-weight: 750; }
.overview-location-node .network-location-inline-count { fill: var(--beige); }
.overview-location-node:focus-visible { outline: none; }
.network-overview.is-ukraine-map .location-link,
.network-overview.is-ukraine-map .center-node { opacity: 0; pointer-events: none; }
.network-overview.is-ukraine-map:not(.is-map-editing) .overview-location-node { cursor: pointer; touch-action: auto; }
.network-overview.is-map-editing .overview-location-node:not([data-map-coordinate-x]) rect { stroke-dasharray: 6 4; }
@media (prefers-reduced-motion: reduce) {
    .network-ukraine-map { transition: none; }
}

.user-profile-card {
    background: linear-gradient(180deg, var(--surface), var(--mid));
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: clamp(20px, 3vw, 30px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
}

.user-profile-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--soft);
    border: 1px solid var(--line-strong);
}

.user-profile-hero h2 {
    margin-bottom: 6px;
    font-size: clamp(26px, 4vw, 38px);
}

.profile-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.profile-facts div {
    display: grid;
    gap: 6px;
    min-height: 92px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 248, 239, 0.035);
}

:root[data-theme="light"] .profile-facts div {
    background: rgba(45, 45, 45, 0.035);
}

.profile-facts strong {
    overflow-wrap: anywhere;
}

.muted { color: var(--beige); }
.empty { padding: 24px; color: var(--beige); }

:root[data-density="compact"] .grid { row-gap: 8px; }
:root[data-density="compact"] label:not(.check-row):not(.score-field) {
    gap: 4px;
    margin-bottom: 8px;
}
:root[data-density="compact"] .field-label-row label:not(.check-row):not(.score-field) { margin-bottom: 0; }
:root[data-density="compact"] .field-with-tip { gap: 4px; margin-bottom: 0; }
:root[data-density="compact"] .filters label:not(.check-row):not(.score-field),
:root[data-density="compact"] .pagination-controls label:not(.check-row):not(.score-field) {
    margin-bottom: 0;
}
:root[data-density="compact"] .grid > label:not(.check-row) { margin-bottom: 0; }
:root[data-density="compact"] .stack-gap { margin-top: 10px; }
:root[data-density="compact"] .role-grid { margin-bottom: 10px; }
:root[data-density="compact"] .form-panel h2 { margin-bottom: 10px; }
:root[data-density="compact"] .topbar { margin-bottom: 16px; }

@media (max-width: 1040px) {
    .app-shell { grid-template-columns: 236px minmax(0, 1fr); }
    .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .mobile-bar { display: flex; }
    .app-shell { display: block; min-height: auto; }
    .sidebar {
        position: fixed;
        z-index: 70;
        inset: 0 auto 0 0;
        width: min(304px, 86vw);
        height: 100vh;
        transform: translateX(-104%);
        transition: transform 180ms ease;
        box-shadow: var(--shadow);
    }

    body.menu-open .sidebar { transform: translateX(0); }
    body.menu-open .scrim { display: block; }

    .main { padding: 22px 16px 34px; }
    .topbar { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
    .topbar-tools { width: 100%; margin-left: 0; }
    .topbar-tools .user-chip { flex: 1 1 auto; min-width: 0; }
    .topbar .display-settings-toggle { width: 60px; }
    .grid.cols-3,
    .grid.cols-2 { grid-template-columns: 1fr; }
    .bug-facts { grid-template-columns: 1fr; }
    .bug-facts p:last-child { grid-column: auto; }
    .bug-table { min-width: 0; }
    .bug-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--beige); font-size: 11px; text-transform: uppercase; }
    .bug-url-cell { max-width: none; white-space: normal; overflow-wrap: anywhere; }
    .project-member-role-list { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr; }
    .admin-user-filters { grid-template-columns: 1fr; }
    .admin-user-row { flex-wrap: wrap; }

    .table-wrap {
        background: transparent;
        border: 0;
        box-shadow: none;
        overflow: visible;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td { display: block; }

    thead { display: none; }

    tr {
        background: linear-gradient(180deg, var(--surface), var(--mid));
        border: 1px solid var(--line);
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 12px;
    }

    td {
        border-bottom: 0;
        padding: 7px 0;
    }

    td:last-child { padding-bottom: 0; }
    .coe-table { min-width: 0; }
    .coe-table-heading { padding: 0 0 14px; }
    .coe-cell-label { display: inline; font-weight: 700; color: var(--light); }
    .coe-table-action { width: 100%; text-align: center; }
    .project-stage-table-wrap,
    .project-team-table-wrap { overflow: visible; }
    .project-stage-table,
    .project-team-table { min-width: 0; }
    .project-stage-table td::before,
    .project-team-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--beige); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
    .project-stage-menu-content { width: min(285px, 100%); margin-left: 0; }
    .project-team-table th:last-child,
    .project-team-table td:last-child { width: auto; }
    .actions { width: 100%; }
    .actions .button,
    .actions button,
    .actions form { width: 100%; }

    .network-scroll { justify-content: flex-start; }

    .user-profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-facts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 460px) {
    button.info-tip { width: 15px; white-space: nowrap; }
    .mobile-brand .brand-logo { width: min(170px, calc(100vw - 100px)); }
    .page-title h1 { font-size: 28px; }
    .auth-panel { padding: 20px; }
    button,
    .button { width: 100%; white-space: normal; }
    .grid.cols-4 { grid-template-columns: 1fr; }
    .calendar-nav .button { width: auto; }
}
