html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
.thread-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #212529;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex-shrink: 0;
}

.thread-icon-lines span {
    width: 14px;
    height: 2px;
    background: white;
    border-radius: 2px;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2f7;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
    flex-shrink: 0;
}

.avatar-sm {
    width: 38px;
    height: 38px;
}

.post-author {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
}

.post-author-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.post-author-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
}

.post-author-name {
    color: #111827;
    font-weight: 800;
    text-decoration: none;
}

.post-author-name:hover {
    color: #1d4ed8;
}

.user-link {
    color: #111827;
    font-weight: 800;
    text-decoration: none;
}

.user-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.reputation-inline {
    display: inline-flex;
    align-items: center;
    gap: .12rem;
    padding: .1rem .45rem;
    border-radius: 999px;
    background: #f3f4f6;
    font-size: .78rem;
    font-weight: 800;
}

.rep-positive {
    color: #15803d;
    font-weight: 800;
}

.rep-neutral {
    color: #4b5563;
    font-weight: 800;
}

.rep-negative {
    color: #dc2626;
    font-weight: 800;
}

.profile-picture-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.profile-picture-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2f7;
    border: 3px solid #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .14);
    flex-shrink: 0;
}

.profile-picture-form {
    flex: 1;
    min-width: 0;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: .25rem .65rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #1e3a8a;
    font-weight: 700;
    font-size: .9rem;
}

.pinned-badge {
    min-height: 1.45rem;
    margin-left: .35rem;
    padding: .12rem .5rem;
    background: #dcfce7;
    color: #166534;
    font-size: .78rem;
    vertical-align: middle;
}

.admin-users-table {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.admin-users-table .table {
    margin-bottom: 0;
}

.role-form {
    display: grid;
    grid-template-columns: 160px minmax(220px, 1fr) auto;
    align-items: start;
    justify-content: flex-end;
    gap: .65rem;
}

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

.role-check-list {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .85rem;
    max-width: 360px;
}

.role-check-list .form-check {
    margin: 0;
}

.user-extra-groups,
.user-primary-group {
    color: #6b7280;
    font-size: .78rem;
    line-height: 1.2;
}

.user-primary-group {
    margin-top: .12rem;
}

.admin-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-heading-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
}

.admin-panel {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.admin-panel h2 {
    margin-bottom: 1rem;
    font-size: 1.15rem;
}

.admin-category-list {
    display: grid;
    gap: 1rem;
}

.category-edit-panel {
    display: grid;
    gap: .75rem;
}

.category-form-grid {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) 120px;
    gap: .85rem;
    align-items: end;
}

.category-form-description {
    grid-column: 1 / -1;
}

.category-form-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.category-form-actions,
.category-delete-form {
    display: flex;
    justify-content: flex-end;
}

.group-create-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: .85rem;
    align-items: end;
}

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

.thread-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.post-actions,
.thread-list-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    text-align: right;
}

.thread-list-actions {
    flex-direction: column;
    align-items: flex-end;
}

.thread-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #111827;
    text-decoration: none;
}

.thread-link:hover {
    color: #1d4ed8;
}

.bbcode-content {
    overflow-wrap: anywhere;
    line-height: 1.6;
    white-space: normal;
}

.bbcode-empty-line {
    display: block;
    min-height: 1.6em;
}

.bbcode-content p:last-child,
.bbcode-content blockquote:last-child,
.bbcode-content pre:last-child,
.bbcode-content ul:last-child {
    margin-bottom: 0;
}

.bbcode-underline {
    text-decoration: underline;
}

.bbcode-center {
    text-align: center;
}

.bbcode-quote {
    margin: .75rem 0;
    padding: .75rem 1rem;
    border-left: 4px solid #c7d2fe;
    background: #f8fafc;
    color: #374151;
}

.bbcode-code {
    margin: .75rem 0;
    padding: .85rem 1rem;
    border-radius: 10px;
    background: #111827;
    color: #f9fafb;
    overflow-x: auto;
    white-space: pre-wrap;
}

.bbcode-image {
    display: block;
    max-width: min(100%, 720px);
    max-height: 520px;
    margin: .75rem 0;
    border-radius: 10px;
    object-fit: contain;
}

.bbcode-list {
    margin: .75rem 0;
    padding-left: 1.4rem;
}

.bbcode-editor {
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.bbcode-toolbar,
.bbcode-emoji-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .55rem;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.bbcode-emoji-bar {
    background: #ffffff;
}

.bbcode-toolbar button,
.bbcode-emoji-bar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: .25rem .55rem;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    font-weight: 700;
    line-height: 1;
}

.bbcode-toolbar button:hover,
.bbcode-emoji-bar button:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #1d4ed8;
}

.bbcode-toolbar .bbcode-color-red {
    color: #b91c1c;
}

.bbcode-editor textarea.form-control {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    resize: vertical;
}

.maintenance-banner {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.maintenance-page {
    min-height: 55vh;
    display: grid;
    place-items: center;
}

.maintenance-card {
    width: min(100%, 560px);
    padding: 2rem;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.maintenance-card h1 {
    margin-bottom: .75rem;
}

.maintenance-rules {
    display: grid;
    gap: .5rem;
}

.maintenance-rule {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, auto) minmax(220px, 1.4fr);
    gap: .75rem;
    align-items: center;
    padding: .75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.maintenance-rule-head {
    background: #f8fafc;
    color: #4b5563;
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.maintenance-behavior {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

@media (max-width: 720px) {
    .maintenance-rule,
    .maintenance-rule-head {
        grid-template-columns: 1fr;
    }
}

.post-signature {
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px dashed #d1d5db;
    color: #4b5563;
    font-size: .95rem;
}

.message-unread {
    border-left: 4px solid #2563eb;
    background: #eff6ff;
}

.topic-unread {
    border-left: 4px solid #facc15;
    background: #fffbeb;
}

.topic-unread .thread-link h5 {
    color: #92400e;
    font-weight: 800;
}

.message-unread strong {
    color: #1d4ed8;
}

.new-content-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.3rem;
    margin-left: .35rem;
    padding: .1rem .45rem;
    border-radius: 999px;
    background: #facc15;
    color: #111827;
    font-size: .72rem;
    font-weight: 800;
    vertical-align: middle;
}

.new-dot {
    display: inline-block;
    width: .55rem;
    height: .55rem;
    margin-left: .25rem;
    border-radius: 50%;
    background: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, .22);
}

.forum-nested-link-unread {
    color: #92400e;
    font-weight: 700;
}

.message-list,
.topic-list {
    display: grid;
    gap: .45rem;
}

.message-row,
.topic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .62rem .75rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

.message-main,
.topic-main {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    color: #111827;
    text-decoration: none;
}

.topic-main {
    align-items: center;
    flex: 1;
}

.topic-title-stack {
    display: grid;
    gap: .2rem;
    justify-items: start;
    text-align: left;
}

.topic-title-stack h5 {
    margin-bottom: 0 !important;
    font-size: 1rem;
    line-height: 1.25;
}

.topic-details {
    display: grid;
    gap: .35rem;
    min-width: 0;
    margin-left: auto;
    text-align: right;
}

.topic-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: .35rem .9rem;
    color: #4b5563;
    font-size: .84rem;
}

.topic-meta-grid > div {
    display: grid;
    gap: .1rem;
    justify-items: end;
}

.topic-meta-label {
    color: #6b7280;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.topic-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    justify-content: flex-start;
}

.topic-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(74px, auto));
    gap: .35rem;
    align-items: center;
    justify-items: end;
}

.topic-stat {
    min-width: 66px;
    padding: .28rem .45rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
}

.topic-stat strong,
.topic-stat span {
    display: block;
}

.topic-stat strong {
    color: #111827;
    font-size: .95rem;
}

.topic-stat span {
    color: #6b7280;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.list-toolbar,
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .55rem;
    color: #4b5563;
    font-size: .9rem;
}

.pagination-bar {
    justify-content: center;
    margin-top: .75rem;
}

.list-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 0;
    font-weight: 700;
}

.list-toolbar .form-select {
    width: 82px;
}

.message-main:hover,
.thread-link:hover {
    color: #1d4ed8;
}

.message-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2f7;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
    flex-shrink: 0;
}

.message-meta,
.topic-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.private-message-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    overflow: hidden;
}

.private-message-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.private-message-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2f7;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .14);
}

.private-message-meta-main {
    display: grid;
    gap: .25rem;
}

.private-message-meta-main > div {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: baseline;
}

.private-message-label {
    color: #6b7280;
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.private-message-time {
    color: #6b7280;
    font-size: .9rem;
    white-space: nowrap;
}

.private-message-body {
    padding: 1.25rem;
}

.icon-button {
    min-width: 2rem;
}

.post-social-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    padding-top: .9rem;
    margin-top: .9rem;
    border-top: 1px solid #eef2f7;
}

.post-thanks,
.star-actions,
.request-submission-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}

.star-button {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    font-size: 1.25rem;
    line-height: 1;
    padding: .1rem;
    cursor: pointer;
}

.star-button:hover,
.star-button.star-active,
.star-display {
    color: #eab308;
}

.star-display {
    font-weight: 800;
    letter-spacing: .08rem;
}

.profile-public-header {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.profile-public-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: .75rem;
}

.profile-public-stats a,
.profile-public-stats div {
    min-width: 92px;
    padding: .55rem .7rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    color: #111827;
    text-align: center;
    text-decoration: none;
}

.profile-reputation-score {
    background: #fff7ed !important;
    border-color: #fed7aa !important;
}

.profile-star-actions {
    padding: .35rem .55rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.profile-public-stats > a > strong,
.profile-public-stats > a > span,
.profile-public-stats > div > strong,
.profile-public-stats > div > span {
    display: block;
}

.profile-public-stats > a > span,
.profile-public-stats > div > span {
    color: #6b7280;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.reputation-form-grid {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: .5rem;
    align-items: start;
    margin-bottom: 1rem;
}

.reputation-list {
    display: grid;
    gap: .75rem;
}

.reputation-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .75rem;
    padding: .85rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
}

.reputation-row p {
    margin-bottom: 0;
}

.reputation-chip {
    display: inline-flex;
    align-items: center;
    align-self: start;
    padding: .25rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
}

.reputation-positive {
    background: #dcfce7;
    color: #166534;
}

.reputation-neutral {
    background: #f3f4f6;
    color: #374151;
}

.reputation-negative {
    background: #fee2e2;
    color: #991b1b;
}

.profile-list-link {
    color: #111827;
    text-decoration: none;
}

.poll-option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .75rem;
    align-items: center;
    margin-bottom: .75rem;
}

.poll-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.poll-bar span {
    display: block;
    height: 100%;
    background: #2563eb;
}

.post-attachments,
.request-submissions {
    display: grid;
    gap: .5rem;
    margin-top: .75rem;
}

.attachment-link,
.request-submission {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem .75rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.edit-history {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px dashed #d1d5db;
    color: #6b7280;
    font-size: .9rem;
}

.subcategory-strip {
    padding: .75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.subcategory-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.subcategory-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .65rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    color: #111827;
    text-decoration: none;
    font-size: .92rem;
}

.subcategory-link span {
    color: #6b7280;
}

.subcategory-link:hover {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.forum-nested-links {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .25rem;
}

.forum-nested-link {
    display: inline-flex;
    padding: .15rem .45rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: .82rem;
}

.subcategory-panel {
    padding: 1rem;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.subcategory-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

.subcategory-panel-header h2 {
    margin-bottom: .15rem;
    font-size: 1.25rem;
}

.subcategory-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .75rem;
}

.subcategory-card {
    display: grid;
    gap: .25rem;
    padding: .85rem 1rem;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #f8fafc;
    color: #111827;
    text-decoration: none;
}

.subcategory-card span {
    color: #64748b;
    font-size: .92rem;
}

.subcategory-card:hover {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
}

/* Topbar Navigation - global override */
.layout-shell .topbar a,
.layout-shell .topbar a:visited,
.layout-shell .topbar a:hover,
.layout-shell .topbar a:focus,
.layout-shell .topbar a:active {
    text-decoration: none !important;
}

    .layout-shell .topbar .topnav-link,
    .layout-shell .topbar a.topnav-link,
    .layout-shell .topbar button.topnav-link {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        padding: .65rem 1rem !important;
        border-radius: 999px !important;
        border: 1px solid transparent !important;
        background: transparent !important;
        color: #4b5563 !important;
        font-weight: 600 !important;
        line-height: 1 !important;
        text-decoration: none !important;
        cursor: pointer;
    }

        .layout-shell .topbar a.topnav-link:hover,
        .layout-shell .topbar button.topnav-link:hover {
            background: #eef2ff !important;
            color: #1d4ed8 !important;
            border-color: #dbeafe !important;
            box-shadow: 0 6px 18px rgba(37, 99, 235, 0.10);
        }

        .layout-shell .topbar a.topnav-link.active {
            background: #111827 !important;
            color: #ffffff !important;
            border-color: #111827 !important;
        }

        .layout-shell .topbar a.topnav-link.topnav-link-accent,
        .layout-shell .topbar .topnav-link-accent {
            background: #2563eb !important;
            color: #ffffff !important;
            border-color: #2563eb !important;
        }

            .layout-shell .topbar a.topnav-link.topnav-link-accent:hover,
            .layout-shell .topbar .topnav-link-accent:hover {
                background: #1d4ed8 !important;
                color: #ffffff !important;
                border-color: #1d4ed8 !important;
            }

.layout-shell .topbar .topnav-message-link {
    gap: .4rem;
}

.topnav-message-envelope {
    color: #eab308;
    font-size: 1.05rem;
    line-height: 1;
}

.topnav-message-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: #facc15;
    color: #111827;
    font-size: .75rem;
    font-weight: 800;
    line-height: 1;
}

.logout-form {
    margin: 0;
    padding: 0;
}
.hero-card {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 2rem;
    align-items: center;
    padding: 3rem;
    border-radius: 28px;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, .20), transparent 35%), linear-gradient(135deg, #111827, #1f2937);
    color: white;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    width: fit-content;
    padding: .45rem .8rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #dbeafe;
    font-weight: 700;
    font-size: .9rem;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
    margin-bottom: 1rem;
    color: white;
}

.hero-content p {
    max-width: 680px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #d1d5db;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

    .hero-actions .btn {
        padding: .8rem 1.15rem;
        border-radius: 14px;
    }

.hero-panel {
    border-radius: 22px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.hero-panel-header {
    height: 48px;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: 0 1rem;
    background: rgba(255, 255, 255, .08);
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

    .hero-panel-header span {
        width: 11px;
        height: 11px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .55);
    }

.hero-panel-body {
    padding: 1rem;
}

.fake-topic {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, .10);
    margin-bottom: .75rem;
}

    .fake-topic:last-child {
        margin-bottom: 0;
    }

    .fake-topic strong {
        display: block;
        color: white;
        margin-bottom: .25rem;
    }

    .fake-topic span {
        color: #d1d5db;
        font-size: .95rem;
    }

.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.home-card {
    display: block;
    padding: 1.5rem;
    border-radius: 22px;
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
    color: #111827;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

    .home-card:hover {
        color: #111827;
        transform: translateY(-3px);
        border-color: #bfdbfe;
        box-shadow: 0 18px 44px rgba(37, 99, 235, .12);
    }

.home-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.home-card h3 {
    margin-bottom: .5rem;
}

.home-card p {
    color: #6b7280;
    margin-bottom: 0;
    line-height: 1.6;
}

.latest-posts-panel {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}

.latest-posts-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.latest-posts-heading h2 {
    margin-bottom: .2rem;
    font-size: 1.35rem;
}

.latest-posts-heading p {
    margin-bottom: 0;
    color: #6b7280;
}

.latest-post-list {
    display: grid;
    gap: .5rem;
}

.latest-post-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem .85rem;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    color: #111827;
    background: #f8fafc;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.latest-post-row:hover {
    color: #111827;
    background: #eef2ff;
    border-color: #c7d2fe;
    transform: translateY(-1px);
}

.latest-post-main {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.latest-post-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-post-main span,
.latest-post-meta {
    color: #6b7280;
    font-size: .88rem;
}

.latest-post-meta {
    display: grid;
    gap: .15rem;
    justify-items: end;
    flex-shrink: 0;
    text-align: right;
}

.info-card {
    margin-top: 1.5rem;
    padding: 1.75rem;
    border-radius: 24px;
    background: white;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .05);
}

    .info-card h2 {
        margin-bottom: .35rem;
    }

    .info-card p {
        color: #6b7280;
        margin-bottom: 0;
    }

/* Account / Auth / Manage layout tweaks to match Home/Forum styling */
.auth-page {
    min-height: calc(100vh - 230px);
    display: grid;
    place-items: start center;
    padding: 1rem 0 2rem;
}

.auth-card {
    width: min(100%, 480px);
    padding: 1.35rem;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.auth-card-wide {
    width: min(100%, 560px);
}

.auth-card-header {
    margin-bottom: 1rem;
    text-align: center;
}

.auth-card-header h1 {
    margin-bottom: .25rem;
    font-size: 1.75rem;
}

.auth-card-header p {
    margin-bottom: 0;
    color: #6b7280;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1rem 0;
    color: #6b7280;
    font-size: .85rem;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e5e7eb;
}

.auth-links {
    display: grid;
    gap: .35rem;
    margin-top: 1rem;
    text-align: center;
}

.auth-links a {
    font-weight: 700;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-passkey {
    display: grid;
}

.auth-card .form-check {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .75rem .85rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.auth-card .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    margin: .15rem 0 0;
    flex-shrink: 0;
}

.auth-card .form-check-label {
    flex: 1;
    margin: 0;
}

.auth-compact-check {
    align-items: center !important;
}

.auth-compact-check .form-check-input {
    margin-top: 0;
}

/* Form container styling for Login / Register pages (renders as a form inside .row .col-lg-6) */
.row .col-lg-6 form,
.row .col-lg-6 section {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    color: #111827;
    border: 1px solid #e5e7eb;
}

/* Secondary column (external logins / helpers) - subtle panel matching hero-panel style */
.row .col-lg-4 section {
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(15, 23, 42, .03);
    padding: 1rem;
}

/* Center content in the secondary auth column so provider "cards" / buttons appear centered */
.row .col-lg-4 section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.row .col-lg-4 section form p {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0 0 0;
}

.row .col-lg-4 section .btn {
    min-width: 200px;
    max-width: 100%;
    width: auto;
}

/* Form control appearance */
.form-floating .form-control {
    border-radius: 12px;
    padding: 0.9rem 0.75rem;
    background: #fff;
    border: 1px solid #e6eefc;
}

.form-floating label {
    padding-left: 0.5rem;
}

/* Primary auth buttons */
.w-100.btn.btn-lg.btn-primary,
.hero-actions .btn.btn-primary {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.08);
}

/* Alerts used by StatusMessage */
.alert {
    border-radius: 12px;
    box-shadow: none;
}

/* Manage (account) navigation styles */
.col-lg-3 .nav .nav-link {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.col-lg-3 .nav .nav-link.active,
.col-lg-3 .nav .nav-link.active:focus,
.col-lg-3 .nav .nav-link.active:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

@media (max-width: 900px) {
    .hero-card {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .home-grid {
        grid-template-columns: 1fr;
    }

    .info-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .row .col-lg-6 form,
    .row .col-lg-4 section,
    .col-lg-3 .nav .nav-link {
        box-shadow: none;
    }
    .form-floating .form-control {
        border: 1px solid rgba(0,0,0,0.06);
    }

    .profile-picture-panel {
        align-items: flex-start;
        flex-direction: column;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .role-form {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

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

    .admin-heading,
    .thread-title-row {
        flex-direction: column;
    }

    .admin-heading-actions,
    .category-form-actions,
    .category-delete-form,
    .post-actions,
    .thread-list-actions,
    .topic-stats {
        justify-content: flex-start;
        align-items: flex-start;
    }

    .category-form-grid,
    .group-create-form {
        grid-template-columns: 1fr;
    }

    .topic-row,
    .topic-main {
        flex-direction: column;
        align-items: stretch;
    }

    .topic-meta-grid,
    .topic-stats {
        grid-template-columns: 1fr;
    }

    .topic-stats {
        justify-items: stretch;
        width: 100%;
    }

    .topic-details,
    .topic-meta-grid > div {
        margin-left: 0;
        text-align: left;
        justify-items: start;
    }

    .profile-public-header,
    .post-social-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .reputation-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    .auth-page {
        min-height: auto;
        padding: .25rem 0 1rem;
    }

    .auth-card {
        padding: 1rem;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    }

    .auth-card-header h1 {
        font-size: 1.45rem;
    }

    .btn,
    .form-control,
    .form-select {
        min-height: 44px;
    }

    .topnav-link {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
    }

    .card-header {
        align-items: flex-start !important;
        flex-direction: column;
        gap: .75rem;
    }

    .post-actions {
        width: 100%;
    }

    .post-actions form,
    .post-actions .btn,
    .post-actions a.btn {
        width: 100%;
    }

    .post-actions form button {
        width: 100%;
    }

    .admin-users-table {
        border-radius: 10px;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

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

    .list-toolbar label,
    .list-toolbar .form-select {
        width: 100%;
    }

    .bbcode-toolbar,
    .bbcode-emoji-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: .2rem;
    }

    .bbcode-toolbar button,
    .bbcode-emoji-bar button {
        flex: 0 0 auto;
        min-width: 42px;
        min-height: 40px;
    }

    .profile-public-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .profile-public-stats a,
    .profile-public-stats div {
        min-width: 0;
    }
}

.category-permission-title {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.permission-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.permission-table {
    margin-bottom: 0;
    min-width: 760px;
}

.permission-table th {
    white-space: nowrap;
}

.permission-table thead th {
    background: #f8fafc;
    color: #374151;
    font-size: .85rem;
    text-transform: uppercase;
}

.permission-table td,
.permission-table th {
    vertical-align: middle;
}

.permission-table td {
    text-align: center;
}

.attachment-disabled {
    color: #6b7280;
    cursor: not-allowed;
    text-decoration: none;
}

.message-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.message-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.message-nav-envelope {
    color: #facc15;
    font-size: 1.05rem;
    line-height: 1;
}

.message-nav-count {
    display: inline-flex;
    min-width: 1.35rem;
    height: 1.35rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #facc15;
    color: #111827;
    font-size: .75rem;
    font-weight: 700;
    padding: 0 .35rem;
}

.imprint-page {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.imprint-page h1 {
    margin-bottom: .35rem;
}

.imprint-page h2 {
    margin-top: 1.35rem;
    margin-bottom: .45rem;
    font-size: 1.08rem;
}

.imprint-page p {
    margin-bottom: .75rem;
}

.legal-page {
    text-align: left;
}

.legal-page h1,
.legal-page > .text-muted {
    text-align: center;
}

.single-post-page {
    max-width: 920px;
    margin: 0 auto;
}

.single-post-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
}

.single-post-header h1 {
    margin-bottom: .25rem;
}

@media (max-width: 640px) {
    .single-post-header {
        flex-direction: column;
    }
}
