@font-face {
    font-family: "Edo";
    src: url("/assets/edo.ttf") format("truetype");
    font-display: swap;
}

:root {
    --blue: #344d76;
    --sky: #067eb5;
    --coral: #ff7443;
    --gold: #ffd34e;
    --gold-deep: #e2bb45;
    --rose: #c55a84;
    --ink: #172435;
    --muted: #65758d;
    --line: #d8e1ee;
    --paper: #ffffff;
    --soft: #fff7d7;
    --wash: #f4f8fb;
}

* {
    box-sizing: border-box;
}

html {
    overscroll-behavior-y: none;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--blue);
    background: var(--wash);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
    overscroll-behavior-y: none;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 78px;
    padding: 12px clamp(18px, 4vw, 52px);
    border-bottom: 1px solid rgba(52, 77, 118, 0.14);
    background: var(--gold);
}

.admin-body {
    background: #eef3f8;
    padding-top: 70px;
}

.admin-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 70px;
    padding: 10px clamp(18px, 4vw, 42px);
    border-bottom: 1px solid rgba(52, 77, 118, 0.16);
    background: white;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 800;
}

.brand img {
    width: 154px;
    max-height: 50px;
    object-fit: contain;
}

.brand span,
h1 {
    font-family: "Edo", Inter, sans-serif;
    letter-spacing: 0;
}

.brand span {
    color: var(--coral);
    font-size: 28px;
}

.top-nav {
    display: flex;
    flex: 1;
    justify-content: center;
    gap: clamp(12px, 3vw, 34px);
    font-weight: 750;
}

.top-nav a {
    color: var(--blue);
}

.forum-tab-nav a {
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 6px;
}

.forum-tab-nav a.is-active {
    color: white;
    background: var(--blue);
}

.admin-nav {
    justify-content: flex-end;
    gap: 18px;
    font-size: 0.94rem;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 12px;
    border: 2px solid rgba(52, 77, 118, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    font-weight: 750;
}

.user-pill span,
.avatar {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: white;
    background: var(--rose);
    font-weight: 850;
}

.admin-user-pill {
    flex: 0 0 auto;
    max-width: 260px;
    margin-left: auto;
    color: var(--blue);
    background: #f7fbff;
}

.admin-user-pill strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.94rem;
}

.avatar-menu {
    position: relative;
    margin-left: auto;
}

.avatar-menu summary {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(52, 77, 118, 0.14);
    border-radius: 50%;
    background: white;
    cursor: pointer;
    list-style: none;
}

.avatar-menu summary::-webkit-details-marker {
    display: none;
}

.header-avatar,
.profile-avatar {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    color: white;
    background: var(--rose);
    font-weight: 850;
}

.header-avatar {
    width: 34px;
    height: 34px;
}

.header-avatar img,
.profile-avatar img,
.member-profile-head img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    display: grid;
    min-width: 150px;
    padding: 6px;
    border: 1px solid rgba(52, 77, 118, 0.14);
    border-radius: 8px;
    background: white;
    box-shadow: 0 16px 38px rgba(27, 45, 75, 0.16);
}

.avatar-menu-panel a {
    padding: 10px 11px;
    border-radius: 6px;
    color: var(--blue);
    font-weight: 850;
    text-decoration: none;
}

.avatar-menu-panel a:hover,
.avatar-menu-panel a:focus {
    background: var(--soft);
}

main {
    width: min(1420px, calc(100% - 32px));
    margin: 0 auto;
}

.admin-shell {
    width: min(1500px, calc(100% - 28px));
}

.admin-stats {
    margin-top: 28px;
}

.admin-title {
    display: block;
    padding: 34px 0 18px;
}

.admin-title h1 {
    font-size: clamp(42px, 5vw, 72px);
}

.sync-note {
    margin: -6px 0 14px;
    color: var(--muted);
    font-weight: 700;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 34px;
    align-items: end;
    min-height: 430px;
    padding: 72px 0 42px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 100%;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(244, 248, 251, 0.25), var(--wash) 78%),
        url("/assets/be-real-rainbow-wave.webp") center bottom / cover no-repeat;
    opacity: 0.9;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--coral);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: var(--blue);
    font-size: clamp(54px, 9vw, 116px);
    line-height: 0.92;
}

.intro {
    max-width: 760px;
    margin: 20px 0 0;
    color: var(--ink);
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.45;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

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

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 850;
}

.button.primary,
button {
    color: white;
    background: var(--coral);
}

.button.secondary {
    color: var(--blue);
    background: white;
    box-shadow: inset 0 0 0 2px rgba(52, 77, 118, 0.16);
}

.sync-panel,
.stats article,
.group-card,
.composer,
.post-card,
.bridge article,
.ops-panel,
.licensing article {
    border: 1px solid rgba(52, 77, 118, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 40px rgba(52, 77, 118, 0.08);
}

.sync-panel {
    display: grid;
    gap: 10px;
    padding: 24px;
}

.sync-panel strong {
    color: var(--sky);
    font-size: 62px;
    line-height: 1;
}

.sync-panel span:last-child {
    color: var(--muted);
}

.license-mini {
    display: grid;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(52, 77, 118, 0.12);
}

code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--blue);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--gold-deep);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 10px 0 30px;
}

.stats article {
    padding: 18px 20px;
}

.stats strong {
    display: block;
    color: var(--sky);
    font-size: 32px;
}

.stats span,
.group-card small,
.post-topline span {
    color: var(--muted);
}

.forum-tabs {
    display: grid;
    gap: 18px;
    margin: 10px 0 70px;
}

.tab-list {
    position: sticky;
    top: 79px;
    z-index: 8;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
    background: var(--wash);
}

.tab-list button {
    min-height: 42px;
    color: var(--blue);
    background: white;
    box-shadow: inset 0 0 0 2px rgba(52, 77, 118, 0.14);
}

.tab-list button.is-active {
    color: white;
    background: var(--coral);
    box-shadow: none;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: grid;
    gap: 18px;
}

.tab-panel-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0 2px;
}

.tab-panel-head h2 {
    margin: 0;
    color: var(--blue);
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1;
}

.tab-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.groups {
    position: sticky;
    top: 154px;
    display: grid;
    gap: 14px;
}

.section-heading h2 {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: 28px;
}

.group-card {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.group-card em {
    width: fit-content;
    padding: 7px 10px;
    border-radius: 6px;
    color: white;
    background: var(--sky);
    font-style: normal;
    font-size: 0.82rem;
    font-weight: 850;
}

.group-card span,
.tags span {
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--blue);
    background: var(--soft);
    font-size: 0.78rem;
    font-weight: 850;
}

.group-card strong,
.bridge strong {
    color: var(--sky);
    font-size: 18px;
}

.group-card p,
.bridge p,
.post-card p {
    margin: 0;
    line-height: 1.55;
}

.tab-metrics {
    display: grid;
    gap: 12px;
}

.tab-metrics article {
    display: grid;
    gap: 3px;
    padding: 16px;
    border: 1px solid rgba(52, 77, 118, 0.14);
    border-radius: 8px;
    background: white;
}

.tab-metrics strong {
    color: var(--sky);
    font-size: 30px;
    line-height: 1;
}

.tab-metrics span,
.empty-state p {
    color: var(--muted);
}

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

.composer,
.post-card {
    padding: 22px;
}

.composer {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    border-top: 5px solid var(--coral);
}

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

.composer label {
    font-weight: 900;
}

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

textarea {
    resize: vertical;
}

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

.post-topline,
.reply {
    display: flex;
    gap: 12px;
    align-items: center;
}

.post-topline {
    margin-bottom: 16px;
}

.post-group {
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--blue);
    background: var(--soft);
    font-size: 0.8rem;
    font-weight: 850;
}

.post-topline div:last-child {
    display: grid;
}

.post-card h3 {
    margin: 0 0 10px;
    color: var(--blue);
    font-size: 24px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.post-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(52, 77, 118, 0.12);
}

.post-tools span,
.form-note {
    color: var(--muted);
    font-size: 0.92rem;
}

.post-tools button,
.post-tools .button,
.ghost {
    min-height: 38px;
    padding: 0 13px;
    font-size: 0.9rem;
}

.ghost {
    color: var(--blue);
    background: white;
    box-shadow: inset 0 0 0 2px rgba(52, 77, 118, 0.16);
}

.replies {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.reply {
    align-items: flex-start;
    padding: 12px;
    border-radius: 8px;
    background: #f8fbff;
}

.avatar.small {
    width: 30px;
    height: 30px;
    font-size: 0.82rem;
}

.bridge {
    padding: 40px 0 80px;
}

.bridge-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.bridge article {
    padding: 20px;
}

.ops-grid,
.licensing {
    padding-top: 56px;
}

.admin-folder-tabs {
    padding: 8px 0 70px;
}

.folder-tab-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0;
    margin: 0 0 -1px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(52, 77, 118, 0.14);
}

body.admin-body .folder-tab-list > button {
    appearance: none;
    position: relative;
    top: 0;
    display: inline-flex;
    align-items: center;
    min-height: 54px;
    margin: 0;
    padding: 0 22px;
    border: 1px solid rgba(52, 77, 118, 0.16);
    border-bottom-color: rgba(52, 77, 118, 0.14);
    border-radius: 8px 8px 0 0;
    color: #5b6d86 !important;
    background: rgba(255, 255, 255, 0.34) !important;
    box-shadow: inset 0 -1px 0 rgba(52, 77, 118, 0.05);
    clip-path: none;
    font-weight: 700;
}

body.admin-body .folder-tab-list > button:hover,
body.admin-body .folder-tab-list > button:focus {
    color: var(--blue) !important;
    border-color: rgba(52, 77, 118, 0.24);
    background: rgba(255, 255, 255, 0.7) !important;
}

body.admin-body .folder-tab-list > button.is-active {
    color: #005fbd !important;
    border-color: rgba(52, 77, 118, 0.14);
    border-bottom-color: white;
    background: white !important;
    box-shadow: 0 -1px 0 white, 0 -8px 18px rgba(52, 77, 118, 0.04);
}

body.admin-body .folder-tab-list > button::before {
    content: "";
    display: none;
}

body.admin-body .folder-tab-list > button.is-active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: white;
}

.folder-tab-stage {
    min-height: 420px;
    padding: 26px 24px 24px;
    border: 1px solid rgba(52, 77, 118, 0.14);
    border-radius: 0 8px 8px;
    border-top-left-radius: 0;
    background: white;
    box-shadow: 0 14px 34px rgba(52, 77, 118, 0.06);
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 18px 0 70px;
}

.admin-panel {
    min-height: 0;
}

.admin-folder-tabs .admin-panel {
    box-shadow: none;
}

.admin-panel:nth-child(4),
.admin-panel:nth-child(6) {
    grid-column: 1 / -1;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(52, 77, 118, 0.12);
}

.panel-head > strong {
    color: var(--blue);
    font-size: 18px;
}

.admin-table {
    display: grid;
    gap: 8px;
}

.admin-row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 82px 100px 100px;
    gap: 10px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid rgba(52, 77, 118, 0.1);
}

.admin-row span {
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-bridge-grid,
.admin-license-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-bridge-grid article,
.admin-license-grid article {
    box-shadow: none;
}

.nested-folder-tabs {
    display: grid;
    gap: 0;
}

.nested-tab-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0;
    margin: 0 0 -1px;
    padding: 0 10px;
    border-bottom: 1px solid rgba(52, 77, 118, 0.14);
}

body.admin-body .nested-tab-list > button {
    appearance: none;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid rgba(52, 77, 118, 0.16);
    border-bottom-color: rgba(52, 77, 118, 0.14);
    border-radius: 8px 8px 0 0;
    color: #5b6d86 !important;
    background: rgba(248, 251, 255, 0.72) !important;
    box-shadow: inset 0 -1px 0 rgba(52, 77, 118, 0.05);
    font-weight: 750;
}

body.admin-body .nested-tab-list > button.is-active {
    color: #005fbd !important;
    border-bottom-color: #f8fbff;
    background: #f8fbff !important;
    box-shadow: 0 -1px 0 #f8fbff;
}

.admin-settings-section {
    display: none;
    gap: 14px;
    padding: 22px;
    border: 1px solid rgba(52, 77, 118, 0.14);
    border-radius: 0 8px 8px;
    background: #f8fbff;
}

.admin-settings-section.is-active {
    display: grid;
}

.ops-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr) minmax(0, 0.9fr);
    gap: 16px;
}

.ops-panel {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 20px;
}

.admin-folder-tabs .tab-panel:not(.is-active),
.admin-folder-tabs .tab-panel[hidden],
.nested-folder-tabs .admin-settings-section:not(.is-active),
.nested-folder-tabs .admin-settings-section[hidden] {
    display: none !important;
}

.admin-folder-tabs .tab-panel.is-active {
    display: grid;
}

.ops-panel > strong {
    color: var(--sky);
    font-size: 18px;
}

.queue-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(52, 77, 118, 0.12);
    border-radius: 8px;
    background: #f8fbff;
}

.queue-row span {
    font-weight: 850;
}

.queue-row p,
.ops-panel p {
    margin: 0;
    line-height: 1.45;
}

.queue-row div {
    display: flex;
    gap: 8px;
}

.member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid rgba(52, 77, 118, 0.1);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}

.member-row:hover,
.member-row:focus,
.member-row.is-active {
    background: var(--soft);
}

.member-row span {
    display: grid;
    place-items: center;
    overflow: hidden;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: white;
    background: var(--rose);
    font-weight: 850;
}

.member-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-row div {
    display: grid;
}

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

.member-tools {
    display: grid;
    grid-template-columns: auto minmax(240px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.member-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.member-filter-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(52, 77, 118, 0.14);
    border-radius: 8px;
    color: var(--blue);
    background: white;
    font-weight: 850;
    text-decoration: none;
}

.member-filter-tabs a.is-active {
    color: white;
    border-color: var(--blue);
    background: var(--blue);
}

.member-tools label {
    display: grid;
    gap: 6px;
    color: var(--blue);
    font-weight: 850;
}

.member-tools label span {
    font-size: 0.82rem;
}

.member-profile-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.85fr) minmax(320px, 1.4fr);
    gap: 18px;
    align-items: start;
}

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

.member-profile-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(52, 77, 118, 0.12);
    border-radius: 8px;
    background: #f8fbff;
}

.member-profile-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-profile-head > span {
    display: grid;
    place-items: center;
    overflow: hidden;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: white;
    background: var(--rose);
    font-weight: 850;
}

.member-profile-head div {
    display: grid;
}

.member-profile-head small,
.member-role-note {
    color: var(--muted);
}

.member-profile-card button {
    justify-self: start;
}

.empty-members {
    padding: 14px;
    border: 1px solid rgba(52, 77, 118, 0.12);
    border-radius: 8px;
    color: var(--muted);
    background: #f8fbff;
}

.profile-shell {
    width: min(100% - 36px, 860px);
    margin: 32px auto 80px;
}

.profile-card {
    display: grid;
    gap: 20px;
    padding: 24px;
    border: 1px solid rgba(52, 77, 118, 0.12);
    border-radius: 8px;
    background: white;
    box-shadow: 0 14px 34px rgba(52, 77, 118, 0.06);
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(52, 77, 118, 0.12);
}

.profile-avatar {
    width: 76px;
    height: 76px;
    font-size: 1.25rem;
}

.profile-head h1,
.profile-head p {
    margin: 0;
}

.profile-head h1 {
    color: var(--blue);
}

.profile-head p {
    color: var(--muted);
    font-weight: 850;
}

.profile-readonly-grid,
.profile-upload-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-readonly-grid label,
.profile-upload-form label {
    display: grid;
    gap: 7px;
    color: var(--blue);
    font-weight: 850;
}

.profile-readonly-grid label:last-child,
.profile-upload-form label {
    grid-column: 1 / -1;
}

.profile-upload-form button {
    justify-self: start;
}

.security-status-grid,
.deliverability-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.security-status-grid article,
.deliverability-grid article,
.security-feature-list,
.security-config-table {
    border: 1px solid rgba(52, 77, 118, 0.12);
    border-radius: 8px;
    background: #f8fbff;
}

.security-status-grid article,
.deliverability-grid article {
    display: grid;
    gap: 6px;
    padding: 16px;
}

.security-status-grid small,
.deliverability-grid small,
.security-config-table span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 850;
    text-transform: uppercase;
}

.security-status-grid strong,
.deliverability-grid strong {
    color: var(--sky);
    font-size: 20px;
}

.security-status-grid span,
.security-feature-list span {
    color: var(--muted);
    line-height: 1.45;
}

.deliverability-grid article.is-warning {
    border-color: rgba(255, 116, 67, 0.38);
    background: #fff8f4;
}

.deliverability-grid article.is-warning strong {
    color: var(--coral);
}

.security-settings-form,
.security-fieldset {
    display: grid;
    gap: 16px;
}

.security-fieldset {
    padding: 18px;
    border: 1px solid rgba(52, 77, 118, 0.12);
    border-radius: 8px;
    background: white;
}

.security-fieldset h3 {
    margin: 0;
    color: var(--blue);
}

.security-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

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

.role-permission-grid article {
    display: grid;
    gap: 7px;
    padding: 15px;
    border: 1px solid rgba(52, 77, 118, 0.12);
    border-radius: 8px;
    background: var(--soft);
}

.role-permission-grid strong {
    color: var(--blue);
}

.role-permission-grid span {
    color: var(--muted);
    line-height: 1.4;
}

.security-form-grid label {
    display: grid;
    gap: 7px;
    color: var(--blue);
    font-weight: 850;
}

.security-check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--blue);
    font-weight: 850;
}

.security-check input {
    width: auto;
}

.security-feature-list {
    display: grid;
    gap: 0;
}

.security-feature-list div,
.security-config-table div {
    display: grid;
    gap: 5px;
    padding: 13px 15px;
    border-bottom: 1px solid rgba(52, 77, 118, 0.1);
}

.security-feature-list div:last-child,
.security-config-table div:last-child {
    border-bottom: 0;
}

.security-feature-list b {
    color: var(--blue);
}

.security-config-table {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.security-config-table div {
    border-right: 1px solid rgba(52, 77, 118, 0.1);
}

.security-config-table div:nth-child(3n) {
    border-right: 0;
}

.setting-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.setting-list code {
    padding: 7px 9px;
    border-radius: 999px;
    background: var(--soft);
}

.license-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.licensing article {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.licensing small {
    color: var(--muted);
    font-weight: 850;
    text-transform: uppercase;
}

.flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.flow span {
    min-height: 46px;
    display: grid;
    place-items: center;
    padding: 10px;
    border-radius: 8px;
    color: var(--blue);
    background: var(--gold);
    font-weight: 850;
    text-align: center;
}

@media (max-width: 980px) {
    .site-header,
    .admin-header,
    .top-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .hero,
    .tab-layout {
        grid-template-columns: 1fr;
    }

    .tab-list,
    .groups {
        position: static;
    }

    .bridge-grid,
    .stats,
    .admin-grid,
    .ops-panels,
    .member-tools,
    .member-profile-layout,
    .profile-readonly-grid,
    .profile-upload-form,
    .security-status-grid,
    .deliverability-grid,
    .role-permission-grid,
    .security-config-table,
    .license-grid,
    .flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-panel:nth-child(4),
    .admin-panel:nth-child(6),
    .admin-title {
        grid-column: auto;
    }

    .admin-title {
        display: grid;
    }

    .queue-row {
        grid-template-columns: 1fr;
    }

    .folder-tab-stage {
        padding: 18px;
    }
}

@media (max-width: 640px) {
    main {
        width: min(100% - 24px, 1420px);
    }

    .brand img {
        width: 126px;
    }

    .top-nav {
        width: 100%;
        gap: 12px;
        font-size: 0.94rem;
    }

    .stats,
    .bridge-grid,
    .admin-grid,
    .ops-panels,
    .member-tools,
    .member-profile-layout,
    .profile-readonly-grid,
    .profile-upload-form,
    .security-status-grid,
    .deliverability-grid,
    .role-permission-grid,
    .security-config-table,
    .security-form-grid,
    .license-grid,
    .flow,
    .composer-actions {
        grid-template-columns: 1fr;
    }

    .admin-row {
        grid-template-columns: 1fr;
    }

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

    .folder-tab-list {
        align-items: stretch;
        padding: 0;
    }

    .folder-tab-list button,
    .folder-tab-list button.is-active {
        flex: 1 1 140px;
        min-height: 44px;
        padding: 0 12px;
        border-radius: 6px 6px 0 0;
    }
}

.security-body {
    display: grid;
    min-height: 100vh;
    padding: 28px;
    background: var(--wash);
}

.security-shell {
    display: grid;
    place-items: center;
    width: 100%;
}

.security-card {
    display: grid;
    gap: 14px;
    width: min(100%, 430px);
    padding: 28px;
    border: 1px solid rgba(52, 77, 118, 0.14);
    border-radius: 8px;
    background: white;
    box-shadow: 0 18px 50px rgba(52, 77, 118, 0.12);
}

.security-card img {
    width: 170px;
    height: auto;
}

.security-card h1 {
    color: var(--blue);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 28px;
    line-height: 1.1;
}

.security-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.security-card label {
    color: var(--blue);
    font-weight: 850;
}

.security-card button {
    width: 100%;
}

.security-turnstile {
    min-height: 65px;
}

.security-notice {
    padding: 11px 12px;
    border-radius: 6px;
    color: var(--blue);
    background: #eef6ff;
    font-weight: 700;
}

.security-notice.success {
    color: #22543d;
    background: #ebf8f0;
}

.security-notice.error {
    color: #8c1d18;
    background: #fdecea;
}

.toast-region {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1000;
    display: grid;
    justify-items: end;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(52, 77, 118, 0.14);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(27, 45, 75, 0.18);
    background: white;
    color: var(--blue);
    font-weight: 850;
    line-height: 1.35;
    animation: toast-in 180ms ease-out;
}

.toast-success {
    border-color: rgba(34, 84, 61, 0.18);
    background: #ebf8f0;
    color: #22543d;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
