/* Shared application styles. Editor- and media-specific rules are loaded separately where needed. */

:root {
    --bg: #f6f7fb;
    --panel: #fff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #2563eb;
    --primary2: #1d4ed8;
    --danger: #dc2626;
    --success: #15803d;
    --sidebar: #111827;
    --radius: 12px;
    --shadow: 0 6px 22px rgba(15,23,42,.06)
}

* {
    box-sizing: border-box
}

html {
    font-family: Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    color: var(--text);
    background: var(--bg)
}

body {
    margin: 0
}

a {
    color: var(--primary);
    text-decoration: none
}

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

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    background: var(--sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 22px 14px;
    z-index: 30
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 19px;
    font-weight: 750;
    padding: 0 10px 24px
}

.brand-mark,.auth-logo {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg,#60a5fa,#8b5cf6);
    color: #fff;
    font-weight: 800
}

.sidebar nav {
    display: grid;
    gap: 4px
}

.sidebar nav a {
    color: #cbd5e1;
    padding: 10px 12px;
    border-radius: 8px
}

.sidebar nav a:hover,.sidebar nav a.active {
    background: #1f2937;
    color: #fff
}

.sidebar-user {
    margin-top: auto;
    border-top: 1px solid #334155;
    padding: 16px 10px 0;
    display: grid;
    gap: 3px
}

.sidebar-user span {
    color: #94a3b8;
    font-size: 12px
}

.link-button {
    border: 0;
    background: none;
    color: #cbd5e1;
    padding: 8px 0;
    text-align: left;
    cursor: pointer
}

.main {
    margin-left: 240px;
    min-height: 100vh
}

.topbar {
    height: 68px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    position: relative;
    z-index: 20
}

.topbar h1 {
    font-size: 20px;
    margin: 0
}

.content {
    max-width: 1260px;
    margin: 0 auto;
    padding: 28px
}

.mobile-menu {
    display: none;
    border: 0;
    background: none;
    font-size: 26px;
    margin-right: 12px
}

.panel,.auth-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    width: 100%;
    overflow: auto;
}

.panel {
    margin-bottom: 20px
}

.panel h2,.panel h3,.panel h4 {
    margin-top: 0
}

.panel-head,.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px
}

.panel-head h2,.panel-head h3,.page-head h2 {
    margin: 0 0 5px
}

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

.page-head {
    padding: 4px 0 20px
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    padding: 9px 13px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    min-width: 80px;
}

.btn:hover {
    background: #f8fafc
}

.btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff
}

.btn.primary:hover {
    background: var(--primary2)
}

.btn.danger {
    color: var(--danger);
    border-color: #fecaca
}

.btn.small {
    padding: 6px 9px;
    font-size: 13px
}

.actions,.inline-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap
}

@media ( max-width: 768px ) {
    .actions form {
        width: 100%;
    }
}

.inline {
    display: inline
}

.notice {
    padding: 12px 15px;
    border-radius: 9px;
    margin-bottom: 18px
}

.notice.success {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0
}

.notice.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca
}

.cards {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 14px;
    margin-bottom: 20px
}

.metric {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow)
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: 13px
}

.metric strong {
    font-size: 28px
}

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

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px
}

.form-grid .span-2 {
    grid-column: 1/-1
}

.form-stack {
    display: grid;
    gap: 15px
}

.form-stack label,.form-grid label,.editor-form label {
    display: grid;
    gap: 7px;
    font-weight: 600;
    font-size: 14px
}

input,select,textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 11px;
    background: #fff;
    color: var(--text)
}

textarea {
    resize: vertical
}

.check {
    display: flex!important;
    grid-template-columns: auto 1fr!important;
    align-items: center;
    gap: 8px!important
}

.check input {
    width: auto
}

.form-actions {
    display: flex;
    gap: 8px
}

.table-wrap {
    overflow: auto;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch
}

.table-wrap td {
    height: 51px
}

.table-wrap td:first-child {
    min-width: 200px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px
}

th,td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle
}

th {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em
}

.badge {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 700;
}

table .badge {
    white-space: nowrap;
}

.status-in_production {
    background: #dbeafe;
    color: #1d4ed8
}

.status-awaiting_approval {
    background: #fef3c7;
    color: #92400e
}

.status-correction_requested {
    background: #fee2e2;
    color: #991b1b
}

.status-awaiting_publication {
    background: #ede9fe;
    color: #6d28d9
}

.status-published {
    background: #dcfce7;
    color: #166534
}

.status-undefined {
    background: #f1f5f9;
    color: #475569
}

.empty {
    color: var(--muted);
    padding: 12px 0
}

.list {
    display: grid
}

.list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    color: var(--text)
}

.list-row span:first-child {
    display: grid;
    gap: 2px
}

.list-row small,.timeline small {
    color: var(--muted)
}

.timeline {
    display: grid;
    gap: 13px
}

.timeline>div {
    border-left: 2px solid #dbeafe;
    padding-left: 12px;
    display: grid;
    gap: 2px
}

.timeline.large>div {
    padding: 10px 12px
}

.details {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 9px 14px
}

.details dt {
    color: var(--muted)
}

.details dd {
    margin: 0
}

.prose {
    line-height: 1.7
}

.prose img {
    max-width: 100%;
    height: auto
}

.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 16px
}

.choice {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    display: grid;
    gap: 7px;
    color: var(--text)
}

.choice span,.production-card span {
    color: var(--muted);
    font-size: 13px
}

.production-card,.workflow-box {
    margin-top: 14px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc
}

.production-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

.production-card>div:first-child {
    display: grid;
    gap: 4px
}

.discussion {
    display: grid;
    gap: 10px;
    margin-bottom: 14px
}

.discussion>div {
    background: #f8fafc;
    border-radius: 9px;
    padding: 12px
}

.discussion p {
    margin: 5px 0
}

.ref-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px
}

.editor-form {
    display: grid;
    grid-template-columns: minmax(0,1fr) 310px;
    gap: 20px
}

.wysiwyg {
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    overflow: hidden;
    margin-top: 12px
}

.wysiwyg-toolbar {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    padding: 7px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border)
}

.wysiwyg-toolbar button {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    padding: 6px 9px;
    cursor: pointer
}

.wysiwyg-area {
    min-height: 460px;
    padding: 16px;
    outline: none;
    line-height: 1.7
}

.wysiwyg.compact .wysiwyg-area {
    min-height: 110px
}

.counter {
    float: right;
    color: var(--muted);
    font-weight: 400
}





.q-pass {
    border-left: 3px solid #22c55e
}

.q-fail {
    border-left: 3px solid #ef4444
}

.q-na {
    border-left: 3px solid #94a3b8
}

.q-warn {
    border-left: 3px solid #f59e0b
}





.settings-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 20px
}

.settings-save {
    grid-column: 1/-1
}

.auth-shell {
    min-height: 100vh;
    background: linear-gradient(135deg,#eff6ff,#f5f3ff)
}

.auth-main {
    min-height: 100vh;
    display: grid;
    place-items: center
}

.auth-main .content {
    width: 100%;
    max-width: 480px
}

.auth-card {
    width: 100%
}

.auth-card.wide {
    max-width: 760px
}

.auth-card h1 {
    margin: 12px 0
}

.auth-logo {
    margin-bottom: 12px
}

.muted-link {
    display: block;
    margin-top: 15px;
    color: var(--muted)
}

.requirements {
    display: grid;
    gap: 6px;
    margin: 20px 0
}

.requirements>div {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border)
}

.ok {
    color: var(--success)
}

.bad {
    color: var(--danger)
}

small {
    color: var(--muted)
}

@media(max-width: 1000px) {
    .cards {
        grid-template-columns:repeat(2,1fr)
    }

    .grid-2,.choice-grid,.settings-grid {
        grid-template-columns: 1fr
    }

    .editor-form {
        grid-template-columns: 1fr
    }

    .editor-side {
        order: -1
    }
}

@media(max-width: 760px) {
    .sidebar {
        transform:translateX(-100%);
        transition: .2s
    }

    .sidebar.open {
        transform: none
    }

    .main {
        margin-left: 0
    }

    .mobile-menu {
        display: block;
    }

    .content {
        padding: 18px
    }

    .topbar {
        padding: 0 18px
    }

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

    .form-grid .span-2 {
        grid-column: auto
    }

    .cards {
        grid-template-columns: 1fr 1fr
    }

    .page-head,.panel-head,.production-card {
        align-items: stretch;
        flex-direction: column
    }

    .details {
        grid-template-columns: 1fr
    }

    .details dt {
        font-weight: 700
    }

    .actions {
        align-items: stretch
    }

    .actions>.btn,.actions>form>.btn {
        width: 100%
    }
}

@media(max-width: 440px) {
    .cards {
        grid-template-columns:1fr
    }

    .content {
        padding: 12px
    }

    .panel {
        padding: 16px
    }
}

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

/* Password fields and installer */
.password-control {
    display: flex;
    align-items: stretch;
    width: 100%;
    position: relative
}

.password-control>input {
    min-width: 0;
    flex: 1;
    border-radius: 8px 0 0 8px
}

.password-tool-button {
    width: 42px;
    min-width: 42px;
    border: 1px solid #cbd5e1;
    border-left: 0;
    background: #f8fafc;
    color: var(--muted);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    padding: 0
}

.password-tool-button:last-child {
    border-radius: 0 8px 8px 0
}

.password-tool-button:hover,.password-tool-button:focus-visible {
    background: #eef2ff;
    color: var(--primary);
    outline: none
}

.password-tool-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed
}

.btn.primary:disabled:hover {
    background: var(--primary)
}

.install-shell .auth-main .content {
    max-width: 860px
}

.install-card {
    max-width: 860px;
    margin: 0 auto
}

.install-form {
    grid-template-columns: 1fr 1fr
}

.install-form .install-password,.install-form .install-actions {
    grid-column: 1/-1
}

.install-actions {
    display: flex;
    justify-content: flex-end
}

.install-actions .btn {
    min-width: 150px
}

@media(max-width: 700px) {
    .install-shell .auth-main .content {
        max-width:100%
    }

    .install-form {
        grid-template-columns: 1fr
    }

    .install-form .install-password,.install-form .install-actions {
        grid-column: auto
    }

    .install-actions .btn {
        width: 100%
    }
}

/* Unified administrative forms */
.form-header {
    margin-bottom: 18px
}

.form-header h1,.form-header h2,.form-header h3 {
    margin: 0 0 6px
}

.form-header p {
    margin: 0;
    color: var(--muted)
}

.form-table {
    display: block;
    padding: 0
}

.form-table>.form-row,.form-table>.form-section-title {
    padding: 22px 24px
}

.form-row {
    display: grid;
    grid-template-columns: minmax(230px,30%) minmax(0,1fr);
    gap: 34px;
    align-items: start;
    border-top: 1px solid var(--border)
}

.form-table>.form-row:first-of-type {
    border-top: 0
}

.form-meta {
    padding-top: 2px
}

.form-meta label,.form-meta>strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    line-height: 1.35
}

.form-meta p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55
}

.form-meta code {
    font-size: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 1px 4px;
    border-radius: 3px
}

.form-control {
    min-width: 0
}

.form-control>input,.form-control>select,.form-control>textarea {
    margin: 0
}

.form-row-actions {
    align-items: center
}

.form-row-actions .form-meta {
    min-height: 1px
}

.form-section-title {
    border-top: 1px solid var(--border);
    background: #fafbfc
}

.form-section-title:first-child {
    border-top: 0
}

.form-section-title h3 {
    margin: 0 0 5px;
    font-size: 16px
}

.form-section-title p {
    margin: 0;
    color: var(--muted);
    font-size: 13px
}

.settings-form {
    max-width: 1180px
}

.account-summary {
    margin-bottom: 20px
}

input,select,textarea {
    border: 1px solid #aeb7c4;
    border-radius: 3px;
    padding: 11px 14px;
    min-height: 46px;
    background: #fff;
    color: #172033;
    transition: border-color .15s,box-shadow .15s
}

textarea {
    min-height: auto
}

input:focus,select:focus,textarea:focus {
    border-color: #3f5efb;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(63,94,251,.13)
}

select {
    background-color: #fff
}

.btn {
    border-radius: 5px
}

.switch-control {
    display: inline-flex!important;
    align-items: center!important;
    width: auto!important;
    cursor: pointer;
    position: relative
}

.switch-control input {
    position: absolute!important;
    opacity: 0!important;
    width: 1px!important;
    height: 1px!important;
    pointer-events: none
}

.switch-ui {
    display: block;
    width: 64px;
    height: 38px;
    border-radius: 999px;
    background: #969da7;
    position: relative;
    transition: background .18s ease,box-shadow .18s ease
}

.switch-ui:before {
    content: "";
    position: absolute;
    width: 28px;
    height: 28px;
    left: 5px;
    top: 5px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15,23,42,.2);
    transition: transform .18s ease
}

.switch-control input:checked+.switch-ui {
    background: #287fbe
}

.switch-control input:checked+.switch-ui:before {
    transform: translateX(26px)
}

.switch-control input:focus-visible+.switch-ui {
    box-shadow: 0 0 0 3px rgba(37,99,235,.22)
}

.auth-switch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 8px 0
}

.auth-switch-row>span {
    display: grid;
    gap: 3px
}

.auth-switch-row strong {
    font-size: 14px
}

.auth-switch-row small {
    font-size: 12px;
    line-height: 1.4
}

.auth-switch-row .switch-ui {
    width: 54px;
    height: 32px
}

.auth-switch-row .switch-ui:before {
    width: 24px;
    height: 24px;
    left: 4px;
    top: 4px
}

.auth-switch-row .switch-control input:checked+.switch-ui:before {
    transform: translateX(22px)
}

input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px!important;
    height: 20px!important;
    min-height: 20px!important;
    padding: 0!important;
    border: 1.5px solid #30343b!important;
    border-radius: 50%!important;
    display: inline-grid;
    place-content: center;
    vertical-align: -4px;
    margin: 0 8px 0 0;
    box-shadow: none!important
}

input[type="radio"]:before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: scale(0);
    background: #3b5eea;
    transition: transform .12s
}

input[type="radio"]:checked {
    border-color: #3b5eea!important
}

input[type="radio"]:checked:before {
    transform: scale(1)
}

.editor-form-table {
    max-width: none
}

.form-row-editor {
    grid-template-columns: minmax(230px,24%) minmax(0,1fr)
}

.form-row-editor .wysiwyg {
    margin-top: 0
}

.input-with-counter {
    position: relative
}

.input-with-counter input {
    padding-right: 72px
}

.input-with-counter textarea {
    padding-bottom: 30px
}

.input-with-counter .counter {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    float: none;
    font-size: 12px;
    background: #fff;
    padding-left: 6px
}

.textarea-counter .counter {
    top: auto;
    bottom: 9px;
    transform: none
}

.password-control>input {
    border-radius: 3px 0 0 3px
}

.password-tool-button:last-child {
    border-radius: 0 3px 3px 0
}

.password-tool-button {
    border-color: #aeb7c4
}

.install-shell .auth-main .content {
    max-width: 940px
}

.install-card {
    max-width: 940px;
    margin: 0 auto;
    padding: 26px
}

.install-card .form-table {
    margin: 20px -26px -26px;
    border-top: 1px solid var(--border)
}

.install-card .requirements {
    margin: 20px 0
}

@media(max-width: 800px) {
    .form-row,.form-row-editor {
        grid-template-columns:1fr;
        gap: 12px
    }

    .form-table>.form-row,.form-table>.form-section-title {
        padding: 18px
    }

    .form-row-actions .form-meta {
        display: none
    }

    .form-row-actions .actions {
        width: 100%
    }

    .form-row-actions .actions .btn {
        flex: 1
    }

    .install-card {
        padding: 20px
    }

    .install-card .form-table {
        margin: 18px -20px -20px
    }

    .switch-ui {
        width: 58px;
        height: 34px
    }

    .switch-ui:before {
        width: 26px;
        height: 26px;
        left: 4px;
        top: 4px
    }

    .switch-control input:checked+.switch-ui:before {
        transform: translateX(24px)
    }
}

/* Shared visualization cards */
































.view-section {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #eef0f3
}

.view-section h4 {
    margin: 0 0 10px
}





/* Delivery workflow, shared card/radio pattern */




























.external-delivery-form>input,.finalized-form>label>input {
    width: 100%;
    max-width: none
}













.compact-action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 0 20px;
    margin: 0 0 20px;
    border-bottom: 1px solid #eef0f3
}

.compact-action-row select {
    max-width: 360px
}





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





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

/* Remember-me is intentionally a native checkbox, not a switch */
.remember-check {
    display: flex!important;
    align-items: flex-start!important;
    gap: 10px!important;
    cursor: pointer;
    margin: 2px 0 4px
}

.remember-check input[type="checkbox"] {
    appearance: auto!important;
    -webkit-appearance: checkbox!important;
    position: static!important;
    opacity: 1!important;
    width: 16px!important;
    height: 16px!important;
    min-height: 16px!important;
    margin: 3px 0 0!important;
    accent-color: var(--primary)
}

.remember-check>span {
    display: grid;
    gap: 2px
}

.remember-check strong {
    font-size: 14px
}

.remember-check small {
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted)
}

@media(max-width: 900px) {
    

    

    

    

    

    

    

    .compact-action-row {
        align-items: stretch;
        flex-direction: column
    }

    .compact-action-row select {
        max-width: none
    }
}

/* Shared application icons and compactible sidebar */
.app-icon {
    width: 20px;
    height: 20px;
    display: block;
    flex: 0 0 auto
}

.sidebar {
    transition: width .2s ease,transform .2s ease
}

.sidebar-brand-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px
}

.brand {
    min-width: 0;
    flex: 1
}

.brand-copy {
    display: grid;
    line-height: 1.1
}

.brand-copy strong {
    font-size: 19px
}

.brand-copy small {
    margin-top: 4px;
    color: #7f8a9d;
    font-size: 10px;
    font-weight: 500
}

.sidebar-toggle {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: #1f2937;
    color: #cbd5e1;
    cursor: pointer;
    flex: 0 0 auto
}

.sidebar-toggle:hover {
    background: #293548;
    color: #fff
}

.sidebar-toggle .app-icon {
    width: 17px;
    height: 17px
}

.sidebar-toggle-expand {
    display: none
}

.sidebar-nav {
    margin-top: 2px
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    white-space: nowrap
}

.sidebar-nav a .app-icon {
    width: 19px;
    height: 19px
}

.sidebar-user-copy {
    display: grid;
    gap: 3px;
    margin-bottom: 8px
}

.sidebar-user-action {
    display: flex!important;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    padding: 8px 0;
    border: 0;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer
}

.sidebar-user-action .app-icon {
    width: 18px;
    height: 18px
}

.sidebar-user-action:hover {
    color: #fff
}

.sidebar.is-collapsed {
    width: 76px;
    padding-left: 10px;
    padding-right: 10px
}

.sidebar.is-collapsed .sidebar-brand-row {
    display: grid;
    justify-items: center
}

.sidebar.is-collapsed .brand {
    padding: 0 0 12px;
    justify-content: center
}

.sidebar.is-collapsed .brand-copy,.sidebar.is-collapsed .sidebar-nav a span,.sidebar.is-collapsed .sidebar-user-copy,.sidebar.is-collapsed .sidebar-user-action span {
    display: none
}

.sidebar.is-collapsed .sidebar-toggle-collapse {
    display: none
}

.sidebar.is-collapsed .sidebar-toggle-expand {
    display: block
}

.sidebar.is-collapsed .sidebar-nav a {
    justify-content: center;
    padding: 11px
}

.sidebar.is-collapsed .sidebar-nav a .app-icon {
    width: 21px;
    height: 21px
}

.sidebar.is-collapsed .sidebar-user {
    padding-left: 0;
    padding-right: 0;
    align-items: center
}

.sidebar.is-collapsed .sidebar-user-action {
    justify-content: center;
    padding: 9px
}

.sidebar-collapsed .main {
    margin-left: 76px
}

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

/* Topic visualization layout */




















/* Delivery cards use the whole option as the visible selector. */






















@media(max-width: 760px) {
    .sidebar.is-collapsed {
        width:240px;
        padding: 22px 14px
    }

    .sidebar.is-collapsed .sidebar-brand-row {
        display: flex;
        justify-items: initial
    }

    .sidebar.is-collapsed .brand {
        padding: 0 10px 24px;
        justify-content: flex-start
    }

    .sidebar.is-collapsed .brand-copy,.sidebar.is-collapsed .sidebar-nav a span,.sidebar.is-collapsed .sidebar-user-copy,.sidebar.is-collapsed .sidebar-user-action span {
        display: grid
    }

    .sidebar.is-collapsed .sidebar-nav a span,.sidebar.is-collapsed .sidebar-user-action span {
        display: inline
    }

    .sidebar.is-collapsed .sidebar-toggle-collapse {
        display: block
    }

    .sidebar.is-collapsed .sidebar-toggle-expand {
        display: none
    }

    .sidebar.is-collapsed .sidebar-nav a {
        justify-content: flex-start;
        padding: 10px 12px
    }

    .sidebar-collapsed .main {
        margin-left: 0
    }

    .sidebar-toggle {
        display: none
    }

    
}

/* Topic/version refinements. */
.field-help {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5
}

.field-help code {
    font-size: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 1px 4px;
    border-radius: 3px
}











/* Dashboard metrics retained in the shared stylesheet after editor styles were separated. */
.dashboard-metrics .metric {
    display: grid;
    gap: 12px
}

.metric-head {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0
}

.metric-head>span:last-child {
    display: block;
    color: var(--muted);
    font-size: 13px
}

.metric-icon,.panel-title-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 9px;
    background: #eff6ff;
    color: #2563eb
}

.metric-icon .app-icon,.panel-title-icon .app-icon {
    width: 18px;
    height: 18px
}

.panel-title-with-icon {
    display: flex;
    align-items: center;
    gap: 10px
}

.panel-title-with-icon h2,.panel-title-with-icon h3 {
    margin: 0
}

.dashboard-sections .panel-head {
    align-items: center
}


.metric .metric-icon {
    display: grid;
    color: #2563eb;
    font-size: inherit
}

/* 1.0.16 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â standardized return navigation for edit/detail screens. */
.page-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 16px;
    color: #64748b;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3
}

.page-back-link:hover,.page-back-link:focus-visible {
    color: var(--primary);
    outline: none
}

.page-back-link .app-icon {
    width: 17px;
    height: 17px
}

/* Topic cards and single, state-aware writer assignment control. */




























/* Keep the three delivery choices side by side on desktop, even in the half-width card. */








/* 1.0.21 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â reusable topbar, paginated list controls, dashboard limits and access errors. */
.topbar {
    position: static;
    height: auto;
    min-height: 78px;
    padding: 13px 28px;
    align-items: center;
    gap: 14px
}

.topbar__content {
    display: grid;
    gap: 3px;
    min-width: 0
}

.topbar__content h1 {
    font-size: 20px;
    line-height: 1.25;
    margin: 0
}

.topbar__content p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex: 0 0 auto
}

.topbar__actions .app-icon {
    width: 17px;
    height: 17px
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    background: #f8fafc
}

.install-form .btn:disabled,.install-form .btn.primary:disabled:hover {
    opacity: 1;
    color: #64748b;
    background: #f1f5f9;
    border-color: #cbd5e1
}

.dashboard-scroll {
    max-height: 310px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px
}

.dashboard-sections .panel {
    display: flex;
    flex-direction: column
}

.dashboard-sections .panel .dashboard-scroll {
    flex: 1 1 auto
}

.dashboard-sections .badge {
    white-space: nowrap;
}

.panel-footer {
    display: flex;
    justify-content: flex-end;
    margin: 16px -22px -22px;
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    background: #fbfcfe;
    border-radius: 0 0 var(--radius) var(--radius)
}

.error-page {
    max-width: 760px;
    margin: 22px auto;
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    gap: 18px;
    align-items: start;
    padding: 30px
}

.error-page__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: #fef2f2;
    color: #dc2626
}

.error-page__icon .app-icon {
    width: 28px;
    height: 28px
}

.error-page__code {
    display: block;
    color: #dc2626;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 4px
}

.error-page h2 {
    margin: 0 0 7px;
    font-size: 23px
}

.error-page p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.6
}

.editor-outline-head {
    margin: 0px -14px 16px
}

@media(max-width: 760px) {
    .topbar {
        padding:12px 18px;
        align-items: flex-start
    }

    .mobile-menu {
        margin-top: 3px
    }

    .topbar__content {
        padding-top: 1px
    }

    .topbar__actions {
        margin-left: auto
    }

    .topbar__actions .btn {
        padding: 8px 10px
    }

    .topbar__actions .btn .app-icon {
        display: none
    }

    .error-page {
        grid-template-columns: 1fr;
        padding: 22px
    }

    .panel-footer {
        margin-left: -16px;
        margin-right: -16px;
        margin-bottom: -16px;
        padding-left: 16px;
        padding-right: 16px
    }
}

@media(max-width: 520px) {
    .topbar {
        flex-wrap:wrap
    }

    .topbar__content {
        flex: 1 1 calc(100% - 48px)
    }

    .topbar__actions {
        width: 100%;
    }

    .topbar__actions .btn {
        width: 100%
    }

}

/* 1.0.25 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â current application styles. */
.sr-only {
    position: absolute!important;
    width: 1px!important;
    height: 1px!important;
    padding: 0!important;
    margin: -1px!important;
    overflow: hidden!important;
    clip: rect(0,0,0,0)!important;
    white-space: nowrap!important;
    border: 0!important
}

/* Discussion anchors and activity comment links. */




.activity-comment-link {
    font-size: 12px;
    font-weight: 650;
    width: max-content
}

/* 1.0.25 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â read-only post preview and ownership handoff. */








.delivery-preview-note {
    margin-top: 10px
}

/* 1.0.26 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â collapsed sidebar alignment, interactive dashboard metrics and expandable fullscreen sidebar. */
@media(min-width: 761px) {
    .sidebar.is-collapsed .sidebar-brand-row {
        display:grid;
        width: 100%;
        grid-template-columns: 1fr;
        justify-items: stretch
    }

    .sidebar.is-collapsed .brand {
        display: grid;
        width: 100%;
        place-items: center;
        padding: 0 0 12px
    }

    .sidebar.is-collapsed .sidebar-toggle {
        margin-inline:auto}
}

.dashboard-metric-link {
    justify-items: center;
    text-align: center;
    color: var(--text);
    transition: transform .16s ease,border-color .16s ease,box-shadow .16s ease
}

.dashboard-metric-link .metric-head {
    display: grid;
    justify-items: center;
    gap: 9px
}

.dashboard-metric-link .metric-head>span:last-child {
    font-size: 13px
}

.dashboard-metric-link .metric-icon {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 14px
}

.dashboard-metric-link .metric-icon .app-icon {
    width: 32px;
    height: 32px
}

.dashboard-metric-link strong {
    line-height: 1
}

.dashboard-metric-link:hover {
    color: var(--text);
    border-color: #bfdbfe;
    box-shadow: 0 10px 28px rgba(15,23,42,.10);
    transform: translateY(-2px)
}

.dashboard-metric-link:focus-visible {
    outline: 3px solid rgba(37,99,235,.18);
    outline-offset: 2px;
    border-color: #93c5fd
}

/* Os cards do dashboard mantêm o alinhamento central no desktop, mas no
   mobile o ícone e o rótulo compartilham a mesma linha. */
@media(max-width:760px) {
    .dashboard-metrics .dashboard-metric-link {
        gap: 8px;
        padding: 14px 12px;
        justify-items: stretch;
        text-align: left
    }

    .dashboard-metric-link .metric-head {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 9px;
        min-width: 0
    }

    .dashboard-metric-link .metric-icon {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
        border-radius: 9px
    }

    .dashboard-metric-link .metric-icon .app-icon {
        width: 20px;
        height: 20px
    }

    .dashboard-metric-link .metric-head>span:last-child {
        font-size: 12px;
        line-height: 1.3
    }

    .dashboard-metric-link strong {
        font-size: 25px
    }
}

@media(prefers-reduced-motion:reduce) {
    .dashboard-metric-link {
        transition: none
    }

    .dashboard-metric-link:hover {
        transform: none
    }
}



/* 1.0.37 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â dashboard alignment and discussion refinements. */
.dashboard-sections .panel .dashboard-scroll {
    flex: 0 1 auto;
    align-content: start
}

.dashboard-sections .panel-footer {
    margin-top: auto
}

.dashboard-sections .list.dashboard-scroll,.dashboard-sections .timeline.dashboard-scroll {
    align-content: start
}

/* 1.0.39 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â validated media selection/deletion and visible disabled installer action. */
/* 1.0.40 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â outdated filters and topic detail refinements. */




/* 1.0.41 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â topic type/access columns and full-width two-column references. */












/* 1.0.42 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â reusable dates, sortable tables, delivery forecast and mobile refinements. */
.date-field {
    max-width: 220px
}






















@media(max-width: 760px) {
    .sidebar .sidebar-toggle {
        display:grid
    }

    

    

    

    

    

    
}

/* 1.0.44 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â outdated type filter and mobile topic references. */


/* 1.0.45 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â delivery summary, quality score and reusable association setting. */


























/* 1.0.49 — manual editorial na visualização de pauta. */








/* 1.0.50 — painel expansível reutilizável dentro do topbar. */
.topbar--expandable {
    flex-wrap: wrap
}

.topbar__panel {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    margin-top: 0;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    box-sizing: border-box
}

.topbar__panel[hidden] {
    display: none!important
}

@media(max-width:520px) {
    .topbar--expandable .topbar__actions {
        justify-content: flex-end
    }
}

/* 1.0.52 — topbar móvel: menu, título e ações permanecem na mesma linha. */
@media(max-width:760px) {
    .topbar {
        display: grid;
        grid-template-columns: auto minmax(0,1fr) auto;
        align-items: start;
        gap: 10px 12px;
        padding: 12px 18px
    }

    .mobile-menu {
        grid-column: 1;
        grid-row: 1;
        margin: 2px 0 0
    }

    .topbar__content {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        padding-top: 1px
    }

    .topbar__actions {
        grid-column: 3;
        grid-row: 1;
        width: auto;
        margin-left: 0;
        align-self: start
    }

    .topbar__panel {
        grid-column: 1/-1;
        grid-row: 2;
        width: 100%
    }
}

@media(max-width:520px) {
    .topbar__actions {
        width: auto
    }

    .topbar__actions .btn {
        width: auto
    }
}


/* Conteúdo editorial: tabelas não herdam o mínimo usado pelas listagens administrativas. */
.prose table {
    min-width: 0;
    margin: 18px 0
}

.prose th,
.prose td {
    vertical-align: top;
    text-transform: none;
    letter-spacing: normal;
    font-size: inherit;
    overflow-wrap: anywhere
}
