:root {
    --wp-success: #73a766;
    --wp-danger: #bd6b58;
    --wp-warning: #d4a848;
    --wp-blue: #67a6a1;
}

.work-progress-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(115, 167, 102, 0.12), transparent 34rem),
        radial-gradient(circle at 86% 16%, rgba(103, 166, 161, 0.1), transparent 30rem),
        linear-gradient(180deg, #10130f 0%, #0c0f0b 100%);
    color: var(--text);
}

.wp-shell {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.wp-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(17, 19, 15, 0.9);
    backdrop-filter: blur(16px);
}

.wp-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.wp-brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(212, 168, 72, 0.55);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(212, 168, 72, 0.24), rgba(115, 167, 102, 0.1)),
        #191d16;
    color: #ffe1a0;
    font-size: 12px;
    font-weight: 900;
}

.wp-brand strong,
.wp-brand small {
    display: block;
    line-height: 1.1;
}

.wp-brand strong {
    font-size: 15px;
}

.wp-brand small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.wp-top-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.wp-layout {
    min-height: calc(100vh - 68px);
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
}

.wp-sidebar {
    position: sticky;
    top: 68px;
    height: calc(100vh - 68px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 14px;
    border-right: 1px solid var(--line);
    background: rgba(18, 22, 17, 0.78);
    overflow: hidden;
}

.wp-side-head {
    display: grid;
    gap: 6px;
    padding: 2px 4px 4px;
}

.wp-side-head h2,
.wp-hero h1,
.wp-hero-board h2 {
    margin: 0;
    letter-spacing: 0;
}

.wp-side-head h2 {
    font-size: 20px;
    line-height: 1.15;
}

.wp-side-head .subtle,
.wp-hero .subtle,
.wp-hero-board .subtle {
    margin: 0;
}

.wp-main {
    min-width: 0;
    padding: 26px clamp(18px, 3vw, 42px) 54px;
}

.wp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr) auto;
    gap: 18px;
    align-items: stretch;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(212, 168, 72, 0.13), rgba(103, 166, 161, 0.07)),
        rgba(23, 26, 21, 0.82);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
}

.wp-hero-copy {
    min-width: 0;
}

.wp-hero h1 {
    margin-top: 8px;
    font-size: clamp(34px, 4vw, 58px);
    line-height: 0.96;
}

.wp-hero-board {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 7px;
    padding: 14px 16px;
    border: 1px solid rgba(233, 226, 198, 0.12);
    border-radius: var(--radius);
    background: rgba(15, 18, 14, 0.58);
}

.wp-hero-board span {
    color: var(--soft);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.wp-hero-board h2 {
    font-size: clamp(21px, 2vw, 30px);
    line-height: 1.05;
}

.wp-hero-actions {
    align-content: start;
    justify-content: flex-end;
}

.work-progress-page .toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wp-select,
.wp-textarea,
.work-progress-page .field input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(12, 15, 11, 0.86);
    color: var(--text);
    font: inherit;
    outline: none;
}

.wp-select {
    min-height: 40px;
    padding: 0 12px;
}

.wp-select:focus,
.wp-textarea:focus,
.work-progress-page .field input:focus {
    border-color: rgba(212, 168, 72, 0.62);
    box-shadow: 0 0 0 3px rgba(212, 168, 72, 0.12);
}

.wp-textarea {
    display: block;
    max-width: 100%;
    min-height: 150px;
    padding: 12px;
    resize: vertical;
}

.wp-editor-textarea {
    min-height: 190px;
    height: 230px;
}

.wp-sidebar-card {
    padding: 0;
    border: 0;
    background: transparent;
}

.wp-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.wp-stat-card {
    min-height: 74px;
    display: grid;
    align-content: center;
    gap: 5px;
    padding: 12px;
    border: 1px solid rgba(233, 226, 198, 0.11);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
}

.wp-stat-card span {
    color: var(--soft);
    font-size: 11px;
    font-weight: 800;
}

.wp-stat-card strong {
    color: var(--text);
    font-size: 25px;
    line-height: 1;
}

.wp-history-panel {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.wp-board-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: auto;
    padding: 4px 2px 18px 0;
}

.wp-board-row {
    width: 100%;
    min-height: 86px;
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.028);
    color: var(--muted);
    text-align: left;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.wp-board-row:hover,
.wp-board-row:focus-visible,
.wp-board-row.is-active {
    color: var(--text);
    border-color: rgba(233, 226, 198, 0.18);
    background: rgba(255, 255, 255, 0.05);
    outline: none;
}

.wp-board-row.is-active {
    border-color: rgba(212, 168, 72, 0.5);
    background:
        linear-gradient(90deg, rgba(212, 168, 72, 0.16), rgba(115, 167, 102, 0.06)),
        rgba(255, 255, 255, 0.035);
}

.wp-board-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wp-board-row-top strong {
    color: var(--text);
    font-size: 17px;
}

.wp-board-row-title,
.wp-board-row-meta {
    display: block;
}

.wp-board-row-title {
    font-weight: 750;
}

.wp-board-row-meta {
    color: var(--soft);
    font-size: 12px;
}

.wp-status-badge,
.wp-topic-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}

.wp-status-badge.is-open {
    border-color: rgba(115, 167, 102, 0.42);
    color: #c8e7bd;
}

.wp-status-badge.is-closed {
    border-color: rgba(189, 107, 88, 0.42);
    color: #f0b3a5;
}

.wp-topic-state.is-pending {
    border-color: rgba(212, 168, 72, 0.42);
    color: #f1d08b;
}

.wp-topic-state.is-done {
    border-color: rgba(115, 167, 102, 0.46);
    color: #bee2ae;
}

.wp-topic-state.is-rejected {
    border-color: rgba(189, 107, 88, 0.46);
    color: #f0b3a5;
}

.wp-topic-state.is-carried {
    border-color: rgba(103, 166, 161, 0.46);
    color: #bae3df;
}

.work-progress-page .content-card {
    display: block;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(23, 26, 21, 0.68);
    box-shadow: none;
    overflow: visible;
}

#tableMissingNotice {
    background: rgba(182, 122, 25, 0.08);
}

#boardDescriptionCard {
    padding: 0;
    border-color: rgba(233, 226, 198, 0.09);
    background: rgba(17, 19, 15, 0.42);
}

#boardDescriptionHost {
    padding: 18px;
}

.work-progress-page .content-meta {
    width: 100%;
    margin: 0 0 14px;
    padding: 11px 13px;
    border: 1px solid rgba(233, 226, 198, 0.1);
    border-radius: var(--radius);
    background: rgba(15, 18, 14, 0.64);
    color: var(--soft);
    font-size: 12px;
    font-weight: 750;
}

.work-progress-page .content-meta.has-error {
    border-color: rgba(189, 107, 88, 0.42);
    color: #f0b3a5;
}

#itemsHost {
    padding: 0;
}

.wp-forum-index-view,
.wp-forum-topic-view {
    display: grid;
    gap: 16px;
}

.wp-forum-index-head,
.wp-forum-topic-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.wp-forum-index-head strong,
.wp-forum-topic-head strong {
    display: block;
    color: var(--text);
    font-size: 19px;
}

.wp-forum-index-head span,
.wp-forum-topic-head span {
    color: var(--soft);
    font-size: 12px;
}

.wp-forum-breadcrumb {
    display: block;
    margin-bottom: 5px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.wp-forum-section-list,
.wp-forum-topic-list {
    display: grid;
    gap: 9px;
}

.wp-forum-section-card,
.wp-topic-card {
    border: 1px solid rgba(233, 226, 198, 0.1);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    transition: border-color 140ms ease, background 140ms ease;
}

.wp-forum-section-card:hover,
.wp-topic-card:hover {
    border-color: rgba(233, 226, 198, 0.22);
    background: rgba(255, 255, 255, 0.045);
}

.wp-forum-section-card.is-open,
.wp-topic-card.is-pending {
    border-color: rgba(212, 168, 72, 0.24);
}

.wp-forum-section-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 0.34fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.wp-forum-section-row:focus-visible,
.wp-topic-row:focus-visible {
    outline: 2px solid rgba(212, 168, 72, 0.46);
    outline-offset: -2px;
}

.wp-forum-section-main {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.wp-forum-section-main h3 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
    line-height: 1.16;
}

.wp-forum-section-main p,
.wp-topic-preview {
    margin: 0;
    color: var(--soft);
    font-size: 12px;
    line-height: 1.5;
}

.wp-forum-section-stats {
    display: grid;
    gap: 5px;
    padding: 10px 12px;
    border: 1px solid rgba(233, 226, 198, 0.09);
    border-radius: var(--radius);
    background: rgba(15, 18, 14, 0.46);
    color: var(--soft);
    font-size: 12px;
}

.wp-forum-section-stats strong {
    color: var(--text);
}

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

.wp-public-list-view {
    display: grid;
    gap: 16px;
}

.wp-public-list-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.wp-public-list-head strong {
    color: var(--text);
    font-size: 18px;
}

.wp-public-list-head span {
    color: var(--soft);
    font-size: 12px;
}

.wp-status-lanes {
    display: grid;
    gap: 14px;
}

.wp-status-lane {
    display: grid;
    gap: 8px;
}

.wp-status-lane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px;
}

.wp-status-lane-head strong {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.wp-status-count {
    min-width: 26px;
    min-height: 24px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    font-size: 12px;
    font-weight: 900;
}

.wp-public-list {
    display: grid;
    gap: 8px;
}

.wp-public-card {
    border: 1px solid rgba(233, 226, 198, 0.1);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.wp-public-card:hover {
    border-color: rgba(233, 226, 198, 0.2);
    background: rgba(255, 255, 255, 0.045);
}

.wp-public-card.is-pending {
    border-color: rgba(212, 168, 72, 0.24);
}

.wp-public-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.wp-public-row.wp-topic-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.wp-public-row:focus-visible {
    outline: 2px solid rgba(212, 168, 72, 0.46);
    outline-offset: -2px;
}

.wp-public-col-title {
    display: grid;
    gap: 7px;
}

.wp-topic-title {
    min-width: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.35;
}

.wp-topic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--soft);
    font-size: 12px;
}

.wp-topic-author {
    color: var(--muted);
    font-weight: 700;
}

.wp-topic-open {
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
}

.wp-public-detail-view {
    display: grid;
    gap: 14px;
}

.wp-public-detail-toolbar {
    display: flex;
    justify-content: flex-start;
}

.wp-public-post {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 19, 15, 0.58);
    overflow: hidden;
}

.wp-public-post-head {
    padding: 18px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(212, 168, 72, 0.08), rgba(103, 166, 161, 0.05)),
        rgba(255, 255, 255, 0.025);
}

.wp-public-post-title-line {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.wp-public-post-title-line h3 {
    margin: 0;
    color: var(--text);
    font-size: 26px;
    line-height: 1.18;
}

.wp-public-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 12px;
    color: var(--soft);
    font-size: 12px;
}

.wp-public-post-body {
    padding: 20px;
}

.wp-public-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px 20px;
}

.wp-carry-box {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wp-alert {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.wp-alert-warning {
    background: rgba(182, 122, 25, 0.12);
    border-color: rgba(212, 168, 72, 0.3);
}

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

.wp-span-2 {
    grid-column: span 2;
}

.wp-editor-shell {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 18, 14, 0.64);
}

.wp-editor-caption {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wp-editor-caption strong {
    color: var(--text);
    font-size: 14px;
}

.wp-editor-caption span {
    color: var(--soft);
    font-size: 12px;
}

.wp-editor-toolbar {
    position: static;
    overflow: hidden;
    top: auto;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: none;
}

.work-progress-page .editor-tool-group {
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 18, 14, 0.62);
}

.work-progress-page .editor-tool-group-title {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(212, 168, 72, 0.12);
    color: #f0cf86;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.work-progress-page .editor-tool {
    min-width: 38px;
}

.work-progress-page .editor-preview {
    min-height: 140px;
    height: auto;
    max-height: 320px;
    overflow: auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 18, 14, 0.76);
}

.work-progress-page .field {
    min-width: 0;
}

.compact {
    min-height: auto;
}

.work-progress-page .empty-state {
    min-height: 140px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
}

.work-progress-page .btn:disabled {
    opacity: 0.56;
    cursor: not-allowed;
}

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

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

    .wp-hero-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    .wp-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .wp-top-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        margin-left: 0;
    }

    .wp-layout {
        display: block;
    }

    .wp-sidebar {
        position: static;
        height: auto;
        max-height: none;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .wp-board-list {
        max-height: 280px;
    }

    .wp-main {
        padding: 18px;
    }

    .wp-form-grid,
    .wp-stat-grid {
        grid-template-columns: 1fr;
    }

    .wp-span-2 {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .wp-hero {
        padding: 18px;
    }

    .wp-hero h1 {
        font-size: 34px;
    }

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

    .wp-topic-open {
        justify-self: start;
    }

    .wp-public-list-head {
        grid-template-columns: 1fr;
    }

    .wp-forum-index-head,
    .wp-forum-topic-head,
    .wp-forum-section-row,
    .wp-topic-row {
        grid-template-columns: 1fr;
    }

    .work-progress-page .btn {
        flex: 1 1 auto;
    }
}
