:root {
    color-scheme: dark;
    --background: #080a0f;
    --surface: #11151d;
    --border: #2b3443;
    --text: #f5f7fb;
    --muted: #9ba7b8;
    --accent: #8876ff;
    --success: #48d5a2;
    --warning: #f0b94c;
    --danger: #ff7777;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(
            circle at 12% 8%,
            rgba(136, 118, 255, 0.14),
            transparent 29%
        ),
        var(--background);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    color: #c4bcff;
}

button,
input {
    font: inherit;
}

.topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    min-height: 72px;
    padding: 12px 28px;
    border-bottom: 1px solid var(--border);
    background: rgba(8, 10, 15, 0.93);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 750;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    color: white;
    background: var(--accent);
    font-weight: 900;
}

.brand-mark.large {
    width: 56px;
    height: 56px;
    border-radius: 17px;
    font-size: 25px;
}

.navigation {
    display: flex;
    gap: 20px;
}

.navigation a {
    color: var(--muted);
    text-decoration: none;
}

.navigation a:hover {
    color: var(--text);
}

.account {
    display: flex;
    align-items: center;
    gap: 15px;
}

.account > div {
    display: grid;
    text-align: right;
    font-size: 13px;
}

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

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 44px 0 70px;
}

.heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 26px;
}

.heading h1,
.login-intro h1 {
    margin: 5px 0 10px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.heading p,
.login-intro p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.eyebrow {
    color: #c3baff !important;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status {
    display: inline-flex;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 800;
}

.status.success {
    color: var(--success);
    border-color: rgba(72, 213, 162, 0.35);
    background: rgba(72, 213, 162, 0.08);
}

.status.warning {
    color: var(--warning);
    border-color: rgba(240, 185, 76, 0.35);
    background: rgba(240, 185, 76, 0.08);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.metric,
.panel {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(17, 21, 29, 0.95);
}

.metric {
    padding: 20px;
}

.metric span {
    color: var(--muted);
}

.metric strong {
    display: block;
    margin-top: 10px;
    font-size: 30px;
}

.panel {
    padding: 24px;
}

.panel h1,
.panel h2 {
    margin-top: 0;
}

.panel p {
    color: var(--muted);
    line-height: 1.65;
}

.panel.narrow {
    max-width: 650px;
    margin: 80px auto;
}

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

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

.check-list {
    display: grid;
    gap: 12px;
    padding: 0;
    list-style: none;
}

.check-list li::before {
    content: "✓";
    margin-right: 10px;
    color: var(--success);
    font-weight: 900;
}

.details {
    margin: 0;
}

.details div {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 15px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.details div:last-child {
    border-bottom: 0;
}

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

.details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.login-layout {
    display: grid;
    grid-template-columns: 1.2fr minmax(320px, 450px);
    align-items: center;
    gap: 70px;
    min-height: calc(100vh - 114px);
}

.login-panel {
    display: grid;
    gap: 18px;
}

.login-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
}

input {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    background: #090c12;
}

input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    padding: 9px 15px;
    border: 0;
    border-radius: 10px;
    color: white;
    background: var(--accent);
    text-decoration: none;
    cursor: pointer;
    font-weight: 800;
}

.button.secondary {
    border: 1px solid var(--border);
    color: var(--text);
    background: transparent;
}

.button.small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 13px;
}

.alert {
    margin-bottom: 16px;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 11px;
}

.alert.error {
    color: #ffc9c9;
    border-color: rgba(255, 119, 119, 0.35);
    background: rgba(255, 119, 119, 0.08);
}

.alert.warning {
    color: #f7dda7;
    border-color: rgba(240, 185, 76, 0.35);
    background: rgba(240, 185, 76, 0.08);
}

.queue-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.queue-row small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.table-panel {
    overflow-x: auto;
}

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

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

th {
    color: var(--muted);
    font-size: 13px;
}

.log-viewer {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #05070a;
}

.log-viewer pre {
    margin: 0;
    padding: 20px;
    color: #dce4ef;
    font: 13px/1.6 ui-monospace, Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

code {
    color: #d8d2ff;
    font: 13px/1.5 ui-monospace, Consolas, monospace;
}

@media (max-width: 920px) {
    .topbar {
        grid-template-columns: 1fr auto;
    }

    .navigation {
        grid-column: 1 / -1;
        order: 3;
        overflow-x: auto;
    }

    .metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid.two,
    .login-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .container {
        width: min(100% - 24px, 1180px);
        padding-top: 28px;
    }

    .heading {
        display: block;
    }

    .heading .status {
        margin-top: 18px;
    }

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

    .account > div,
    .brand > span:last-child {
        display: none;
    }
}

/* LOG MANAGEMENT UPDATE START */

.heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.action-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.button.danger {
    border: 1px solid rgba(255, 119, 119, 0.5);
    color: #ffd0d0;
    background: rgba(255, 119, 119, 0.12);
}

.button.danger:hover {
    background: rgba(255, 119, 119, 0.22);
}

.alert.success {
    color: #baf5df;
    border-color: rgba(72, 213, 162, 0.35);
    background: rgba(72, 213, 162, 0.08);
}

.confirm-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

/* LOG MANAGEMENT UPDATE END */

/* PROJECTS MODULE START */

.project-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.project-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 310px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(17, 21, 29, 0.95);
}

.project-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 14px;
}

.project-card-top small {
    color: var(--muted);
    text-transform: capitalize;
}

.project-card h2 {
    margin: 22px 0 8px;
    font-size: 25px;
}

.project-card h2 a {
    color: var(--text);
    text-decoration: none;
}

.project-card h2 a:hover {
    color: #c4bcff;
}

.project-card > p {
    margin: 0 0 18px;
    color: var(--muted);
}

.project-card > .button {
    margin-top: auto;
}

.project-summary {
    width: 100%;
    margin: 0 0 22px;
}

.project-summary div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.project-summary dt {
    color: var(--muted);
}

.project-summary dd {
    margin: 0;
    text-align: right;
}

.project-form {
    max-width: 1000px;
}

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

.form-grid label {
    display: grid;
    gap: 8px;
    color: var(--muted);
}

.field-full {
    grid-column: 1 / -1;
}

textarea,
select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    background: #090c12;
    font: inherit;
}

textarea {
    resize: vertical;
    line-height: 1.6;
}

textarea:focus,
select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 30px;
}

.brief-content {
    color: var(--muted);
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.project-module-grid {
    margin-top: 18px;
}

@media (max-width: 700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-full {
        grid-column: auto;
    }

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

/* PROJECTS MODULE END */

/* PROJECT FORM LAYOUT FIX START */

.project-form {
    width: 100%;
    max-width: 1100px;
}

.project-form .form-grid {
    display: grid !important;
    grid-template-columns:
        repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
    width: 100%;
}

.project-form .form-grid > label {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    min-width: 0;
    width: 100%;
    color: var(--muted);
}

.project-form .form-grid > label.field-full {
    grid-column: 1 / -1 !important;
}

.project-form input,
.project-form select,
.project-form textarea {
    display: block;
    width: 100% !important;
    max-width: none !important;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    background: #090c12;
    font: inherit;
}

.project-form input,
.project-form select {
    min-height: 47px;
}

.project-form select {
    appearance: auto;
}

.project-form textarea {
    min-height: 220px;
    resize: vertical;
    line-height: 1.6;
}

.project-form input:focus,
.project-form select:focus,
.project-form textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.project-form .form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

@media (max-width: 760px) {
    .project-form .form-grid {
        grid-template-columns: 1fr !important;
    }

    .project-form .form-grid > label.field-full {
        grid-column: auto !important;
    }
}

/* PROJECT FORM LAYOUT FIX END */

/* PROJECT MANAGEMENT V3 START */

.field-help {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.danger-zone {
    border-color: rgba(
        255,
        119,
        119,
        0.4
    );
}

.inline-limit-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.inline-limit-form input[type="number"] {
    width: 90px;
    min-height: 36px;
    padding: 7px 10px;
}

.inline-limit-form span {
    color: var(--muted);
    font-size: 13px;
}

.users-note {
    margin-top: 18px;
}

.heading-actions .button.danger,
.button.danger {
    border: 1px solid rgba(
        255,
        119,
        119,
        0.5
    );
    color: #ffd0d0;
    background: rgba(
        255,
        119,
        119,
        0.12
    );
}

.heading-actions .button.danger:hover,
.button.danger:hover {
    background: rgba(
        255,
        119,
        119,
        0.22
    );
}

@media (max-width: 760px) {
    .inline-limit-form {
        min-width: 210px;
    }
}

/* PROJECT MANAGEMENT V3 END */

/* ASSET MODULE PHASE 3 START */

.asset-upload-panel {
    margin-bottom: 18px;
}

.panel-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.asset-upload-form {
    margin-top: 22px;
}

.asset-upload-fields {
    display: grid;
    grid-template-columns:
        minmax(220px, 0.45fr)
        minmax(300px, 1fr);
    gap: 18px;
}

.asset-upload-fields label,
.asset-details-form label,
.asset-toolbar label {
    display: grid;
    gap: 8px;
    min-width: 0;
    color: var(--muted);
}

.asset-file-field input[type="file"] {
    min-height: 47px;
    padding: 10px;
}

.upload-progress {
    display: grid;
    gap: 9px;
    margin-top: 20px;
}

.upload-progress-track {
    overflow: hidden;
    height: 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #090c12;
}

.upload-progress-bar {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: var(--accent);
    transition: width 0.15s linear;
}

#asset-upload-progress-text {
    color: var(--muted);
    font-size: 13px;
}

.asset-toolbar {
    display: flex;
    justify-content: flex-end;
    padding-top: 16px;
    padding-bottom: 16px;
    margin-bottom: 18px;
}

.asset-toolbar form {
    width: min(280px, 100%);
}

.asset-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(340px, 1fr));
    gap: 18px;
}

.asset-card {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(17, 21, 29, 0.95);
}

.asset-card-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border: 1px solid var(--border);
    border-radius: 16px;
    color: #c4bcff;
    background: rgba(136, 118, 255, 0.1);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.asset-card-content {
    min-width: 0;
}

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

.asset-card-top small {
    color: var(--muted);
}

.asset-card h2 {
    margin: 16px 0 5px;
    font-size: 21px;
    overflow-wrap: anywhere;
}

.asset-original-name {
    margin: 0 0 16px !important;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.asset-meta {
    margin: 0 0 17px;
}

.asset-meta div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.asset-meta dt {
    color: var(--muted);
}

.asset-meta dd {
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

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

.asset-details-form {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(120px, 0.45fr)
        auto;
    align-items: end;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.asset-details-form input,
.asset-details-form select {
    min-height: 39px;
    padding: 8px 10px;
}

.asset-preview-shell {
    display: grid;
    place-items: center;
    min-height: 420px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #05070a;
}

.asset-preview-image {
    display: block;
    max-width: 100%;
    max-height: 720px;
    object-fit: contain;
}

.asset-preview-video {
    display: block;
    width: min(100%, 1100px);
    max-height: 720px;
}

.asset-preview-audio {
    width: min(100%, 700px);
}

.asset-preview-pdf {
    width: 100%;
    height: 760px;
    border: 0;
    border-radius: 10px;
    background: white;
}

.asset-preview-unavailable {
    max-width: 620px;
    padding: 50px 28px;
    text-align: center;
    color: var(--muted);
}

.asset-preview-unavailable strong {
    display: block;
    margin-bottom: 12px;
    color: var(--text);
    font-size: 24px;
}

.asset-details-grid {
    margin-top: 18px;
}

.project-asset-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.project-asset-summary > div {
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #0b0e14;
}

.project-asset-summary strong {
    display: block;
    font-size: 22px;
}

.project-asset-summary span {
    color: var(--muted);
    font-size: 12px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 850px) {
    .asset-upload-fields,
    .asset-details-form {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .panel-heading-row {
        display: block;
    }

    .panel-heading-row .status {
        margin-top: 14px;
    }

    .asset-card {
        grid-template-columns: 1fr;
    }

    .asset-card-icon {
        width: 60px;
        height: 60px;
    }

    .asset-preview-shell {
        min-height: 280px;
        padding: 12px;
    }

    .asset-preview-pdf {
        height: 560px;
    }
}

/* ASSET MODULE PHASE 3 END */

/* LOG CODE VIEWER V2 START */

.log-editor {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #070a0f;
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.22);
}

.log-editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    min-height: 54px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: #10141c;
}

.log-editor-file,
.log-editor-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.log-editor-file strong {
    overflow: hidden;
    max-width: 620px;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 13px;
}

.log-editor-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #54d98c;
    box-shadow:
        0 0 12px rgba(84, 217, 140, 0.55);
}

.log-editor-language {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: #0a0d13;
    font-size: 11px;
}

.log-copy-status {
    min-width: 54px;
    color: #70e5a0;
    font-size: 12px;
    text-align: right;
}

.log-code-scroll {
    overflow: auto;
    max-height: 68vh;
    min-height: 440px;
    background: #080b10;
    scrollbar-color:
        #353b49
        #080b10;
    scrollbar-width: thin;
}

.log-code-scroll::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.log-code-scroll::-webkit-scrollbar-track {
    background: #080b10;
}

.log-code-scroll::-webkit-scrollbar-thumb {
    border: 3px solid #080b10;
    border-radius: 999px;
    background: #353b49;
}

.log-code-viewer {
    min-width: max-content;
    min-height: 100%;
    margin: 0;
    padding: 14px 0 28px;
    color: #d9dee9;
    background: transparent;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 13px;
    line-height: 1.65;
    tab-size: 4;
    white-space: pre;
}

.log-code-viewer code {
    display: block;
}

.log-code-line {
    display: block;
    min-height: 1.65em;
    padding-right: 28px;
}

.log-code-line:hover {
    background: rgba(136, 118, 255, 0.07);
}

.log-code-line::before {
    content: attr(data-line);
    position: sticky;
    left: 0;
    display: inline-block;
    width: 62px;
    margin-right: 18px;
    padding-right: 14px;
    border-right: 1px solid #202630;
    color: #596171;
    background: #080b10;
    text-align: right;
    user-select: none;
}

.log-copy-source {
    position: fixed !important;
    top: -9999px !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.log-editor-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    min-height: 38px;
    padding: 7px 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    background: #10141c;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 11px;
}

@media (max-width: 700px) {
    .log-editor-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .log-editor-actions {
        width: 100%;
        justify-content: space-between;
    }

    .log-code-scroll {
        min-height: 350px;
        max-height: 62vh;
    }

    .log-code-line::before {
        width: 48px;
        margin-right: 12px;
    }

    .log-editor-footer {
        justify-content: flex-start;
    }
}

/* LOG CODE VIEWER V2 END */

/* ASSET BULK QUICK EDIT V1 START */

/*
Fix the compressed editor shown inside
narrow asset cards.
*/

.asset-card .asset-details-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    gap: 13px !important;
}

.asset-card .asset-details-form label {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0;
}

.asset-card .asset-details-form input,
.asset-card .asset-details-form select {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 40px;
}

.asset-card .asset-details-form button {
    width: fit-content;
}

.bulk-asset-editor {
    margin-bottom: 18px;
    padding: 0;
}

.bulk-editor-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px 22px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.bulk-editor-summary::-webkit-details-marker {
    display: none;
}

.bulk-editor-summary::before {
    content: "▸";
    margin-right: 10px;
    color: #a89cff;
    font-size: 18px;
}

.bulk-asset-editor[open]
.bulk-editor-summary::before {
    content: "▾";
}

.bulk-editor-summary > span:first-child {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.bulk-editor-summary small {
    color: var(--muted);
}

#bulk-asset-edit-form {
    padding: 0 22px 24px;
    border-top: 1px solid var(--border);
}

.bulk-editor-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px 0;
}

.bulk-selection-tools,
.bulk-category-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.bulk-category-tools select {
    width: 190px;
    min-height: 39px;
    padding: 8px 10px;
}

.bulk-selection-status {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.bulk-selection-status strong {
    color: var(--text);
}

.bulk-assets-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 13px;
}

.bulk-assets-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

.bulk-assets-table th,
.bulk-assets-table td {
    padding: 13px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.bulk-assets-table th {
    color: var(--muted);
    background: #0b0e14;
    font-size: 12px;
}

.bulk-assets-table tbody tr:last-child td {
    border-bottom: 0;
}

.bulk-assets-table tbody tr.is-selected {
    background: rgba(136, 118, 255, 0.08);
}

.bulk-assets-table td:nth-child(2) strong {
    display: block;
    overflow-wrap: anywhere;
}

.bulk-assets-table td:nth-child(2) small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.bulk-assets-table input[type="text"],
.bulk-assets-table select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
}

.bulk-check-column {
    width: 70px;
    text-align: center !important;
}

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

@media (max-width: 760px) {
    .bulk-editor-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .bulk-editor-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .bulk-selection-tools,
    .bulk-category-tools {
        width: 100%;
    }

    .bulk-category-tools select {
        width: 100%;
    }
}

/* ASSET BULK QUICK EDIT V1 END */

/* PRODUCTION MODULE PHASE 4 START */

.production-empty {
    max-width: 900px;
    padding: 42px;
}

.production-empty h2 {
    margin-top: 0;
    font-size: 34px;
}

.production-empty > p:not(.eyebrow) {
    max-width: 700px;
    margin-bottom: 26px;
    color: var(--muted);
    line-height: 1.7;
}

.production-preview-panel {
    margin-bottom: 18px;
}

.production-player-shell {
    overflow: hidden;
    margin-top: 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #020305;
    aspect-ratio: 16 / 9;
}

.production-preview-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #020305;
}

.production-control-grid {
    margin-bottom: 18px;
}

.production-control-grid .panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.production-control-grid form {
    margin-top: auto;
}

.production-state {
    display: flex;
    width: 100%;
    margin: 22px 0;
    padding: 14px 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.render-control-form {
    display: grid;
    width: 100%;
    gap: 16px;
    margin-top: 20px;
}

.render-control-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
}

.render-control-form button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.production-jobs-panel {
    margin-top: 18px;
}

.table-scroll {
    overflow-x: auto;
}

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

.table-actions form {
    margin: 0;
}

.output-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}

.output-card {
    display: flex;
    min-width: 0;
    padding: 17px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #0b0e14;
}

.output-card strong,
.output-card small {
    display: block;
    overflow-wrap: anywhere;
}

.output-card small {
    margin-top: 5px;
    color: var(--muted);
}

.production-source-form {
    padding: 0;
    overflow: hidden;
}

.source-editor-toolbar {
    display: flex;
    min-height: 52px;
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    background: #10141c;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
    font-size: 12px;
}

.source-editor-toolbar span {
    color: var(--muted);
}

.production-source-editor {
    display: block;
    width: 100%;
    min-height: 68vh;
    max-height: 78vh;
    padding: 22px;
    border: 0;
    border-radius: 0;
    outline: 0;
    resize: vertical;
    color: #d9dee9;
    background: #080b10;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 13px;
    line-height: 1.65;
    tab-size: 4;
    white-space: pre;
}

.production-source-form .form-actions {
    margin: 0;
    padding: 16px;
    border-top: 1px solid var(--border);
    background: #10141c;
}

.queue-progress {
    overflow: hidden;
    width: 150px;
    height: 9px;
    margin-bottom: 5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #080b10;
}

.queue-progress div {
    height: 100%;
    border-radius: 999px;
    background: var(--accent);
}

@media (max-width: 800px) {
    .production-player-shell {
        aspect-ratio: 4 / 3;
    }

    .output-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .source-editor-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* PRODUCTION MODULE PHASE 4 END */

/* UNIFIED LOG MANAGER V4 START */

.unified-logs-heading
.heading-actions form {
    margin: 0;
}

.unified-log-filter-panel {
    margin-bottom: 18px;
    padding: 18px 20px;
}

.unified-log-filter-form {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.unified-log-filter-form label {
    display: grid;
    min-width: 240px;
    gap: 8px;
    color: var(--muted);
}

.unified-log-filter-form select {
    min-height: 42px;
}

.unified-log-filter-summary {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.unified-log-filter-summary strong {
    font-size: 24px;
}

.unified-log-filter-summary span {
    color: var(--muted);
}

.unified-log-name {
    display: block;
    max-width: 420px;
    overflow-wrap: anywhere;
}

.unified-log-name + small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.log-category-badge,
.log-state-badge {
    display: inline-flex;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    align-items: center;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 800;
}

.log-category-dashboard {
    background:
        rgba(124, 92, 252, 0.10);
}

.log-category-worker {
    background:
        rgba(255, 181, 71, 0.10);
}

.log-category-validation {
    background:
        rgba(0, 196, 112, 0.10);
}

.log-category-render {
    background:
        rgba(255, 94, 58, 0.10);
}

.log-category-update {
    background:
        rgba(89, 169, 255, 0.10);
}

.log-state-active {
    border-color:
        rgba(0, 196, 112, 0.42);

    background:
        rgba(0, 196, 112, 0.08);
}

.log-state-archived {
    opacity: 0.8;

    background:
        rgba(255, 255, 255, 0.04);
}

.unified-log-table td,
.unified-production-history td {
    vertical-align: middle;
}

.unified-production-history {
    margin-top: 18px;
}

.unified-log-clear-help {
    margin-top: 12px;
}

@media (max-width: 760px) {
    .unified-log-filter-form {
        align-items: stretch;
        flex-direction: column;
    }

    .unified-log-filter-form label {
        width: 100%;
        min-width: 0;
    }
}

/* UNIFIED LOG MANAGER V4 END */



/* PRODUCTION LOG CATEGORY V3 */

.log-category-production {
    border-color:
        rgba(0, 196, 112, 0.38);

    background:
        rgba(0, 196, 112, 0.10);
}
