/* AKDORAT launch UI — archive, materials, finance, workshop and platform continuity. */

html[data-dorat-theme] :is(#archive-section, #malzeme-section, #finans-section, #atolyem-section, #platform-admin-section).active {
    animation: dorat-workspace-enter .18s ease-out both;
}

@keyframes dorat-workspace-enter {
    from { opacity: .72; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

html[data-dorat-theme] .workspace-header-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

html[data-dorat-theme] .workspace-detail-panel {
    min-width: 0;
    padding: 14px !important;
    border: 1px solid var(--launch-line) !important;
    border-radius: 4px !important;
    color: var(--launch-text) !important;
    background: var(--launch-panel) !important;
    box-shadow: none !important;
}

html[data-dorat-theme] .workspace-detail-header,
html[data-dorat-theme] .platform-panel-heading,
html[data-dorat-theme] .material-analysis-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--launch-line);
}

html[data-dorat-theme] .workspace-detail-header span:first-child {
    display: block;
    margin-bottom: 5px;
    color: var(--launch-muted);
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .08em;
}

html[data-dorat-theme] :is(.workspace-detail-header, .platform-panel-heading, .material-analysis-heading) h2 {
    margin: 0;
    color: var(--launch-heading);
    font-size: 1rem;
    line-height: 1.25;
}

html[data-dorat-theme] .workspace-detail-identity {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--launch-line);
}

html[data-dorat-theme] .workspace-detail-identity > i {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--launch-line-strong);
    border-radius: 50%;
    color: var(--launch-accent);
    background: var(--launch-accent-soft);
}

html[data-dorat-theme] .workspace-detail-identity :is(strong, small) { display: block; }
html[data-dorat-theme] .workspace-detail-identity strong { overflow: hidden; color: var(--launch-heading); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
html[data-dorat-theme] .workspace-detail-identity small { margin-top: 3px; overflow: hidden; color: var(--launch-muted); font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }

html[data-dorat-theme] .workspace-detail-list { display: grid; gap: 0; margin: 4px 0 0; }
html[data-dorat-theme] .workspace-detail-list div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; border-bottom: 1px solid var(--launch-line); }
html[data-dorat-theme] .workspace-detail-list :is(dt, dd) { margin: 0; font-size: .66rem; }
html[data-dorat-theme] .workspace-detail-list dt { color: var(--launch-muted); }
html[data-dorat-theme] .workspace-detail-list dd { max-width: 58%; color: var(--launch-heading); font-weight: 650; text-align: right; }

html[data-dorat-theme] .workspace-detail-totals { display: grid; gap: 8px; padding: 13px 0; border-bottom: 1px solid var(--launch-line); }
html[data-dorat-theme] .workspace-detail-totals div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
html[data-dorat-theme] .workspace-detail-totals span { color: var(--launch-muted); font-size: .65rem; }
html[data-dorat-theme] .workspace-detail-totals strong { color: var(--launch-heading); font-size: .72rem; }
html[data-dorat-theme] .workspace-detail-totals .is-total { padding-top: 9px; border-top: 1px solid var(--launch-line-strong); }
html[data-dorat-theme] .workspace-detail-totals .is-total strong { color: var(--launch-accent); font-size: .85rem; }

html[data-dorat-theme] .workspace-detail-actions { display: grid; gap: 7px; padding-top: 14px; }
html[data-dorat-theme] .workspace-detail-actions .btn { width: 100%; min-height: 34px; justify-content: flex-start; font-size: .66rem; }
html[data-dorat-theme] .workspace-detail-empty { display: grid; min-height: 300px; padding: 28px 14px; place-content: center; justify-items: center; text-align: center; }
html[data-dorat-theme] .workspace-detail-empty i { margin-bottom: 12px; color: var(--launch-accent); font-size: 1.65rem; }
html[data-dorat-theme] .workspace-detail-empty strong { color: var(--launch-heading); font-size: .84rem; }
html[data-dorat-theme] .workspace-detail-empty span { max-width: 220px; margin-top: 6px; color: var(--launch-muted); font-size: .65rem; line-height: 1.55; }

/* Archive */
#archive-section .archive-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 10px;
    align-items: start;
}

#archive-section .archive-directory { min-width: 0; }
#archive-section .archive-table-wrapper { max-height: calc(100vh - 290px); }
#archive-section #archiveDetailPanel {
    position: sticky;
    top: 66px;
    display: flex;
    max-height: calc(100vh - 78px);
    min-height: 520px;
    flex-direction: column;
    padding: 9px !important;
    overflow: hidden;
}
#archive-section #archiveTable tbody tr[data-archive-quote-id] { cursor: pointer; }
#archive-section #archiveTable tbody tr[data-archive-quote-id]:hover td { background: var(--launch-accent-soft) !important; }
#archive-section .archive-preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 1px 2px 9px; border-bottom: 1px solid var(--launch-line); }
#archive-section .archive-preview-toolbar > div { display: grid; gap: 2px; }
#archive-section .archive-preview-toolbar > div span { color: var(--launch-muted); font-size: .55rem; font-weight: 750; letter-spacing: .08em; }
#archive-section .archive-preview-toolbar > div strong { color: var(--launch-heading); font-size: .75rem; }
#archive-section .archive-preview-scroll { flex: 1; min-height: 0; padding: 9px 5px; overflow: auto; background: var(--launch-panel-soft); scrollbar-width: thin; }
#archive-section .archive-mini-pdf { min-height: 470px; padding: 17px 16px 13px; color: #132a52; background: #fff; box-shadow: 0 5px 18px rgba(2, 18, 44, .14); }
#archive-section .archive-mini-pdf-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 2px solid #173b78; }
#archive-section .archive-mini-pdf-header > div:first-child { display: grid; gap: 2px; }
#archive-section .archive-mini-pdf-header > div:first-child strong { color: #0a2b63; font-size: 1rem; letter-spacing: .015em; }
#archive-section .archive-mini-pdf-header > div:first-child small { color: #60708d; font-size: .48rem; }
#archive-section .archive-mini-pdf-header > div:last-child { display: grid; justify-items: end; gap: 2px; }
#archive-section .archive-mini-pdf-header b { color: #1459ed; font-size: .72rem; letter-spacing: .08em; }
#archive-section .archive-mini-pdf-header span { color: #18345f; font-size: .52rem; font-weight: 700; }
#archive-section .archive-mini-pdf-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 11px 0 8px; border-bottom: 1px solid #d8e0ea; }
#archive-section .archive-mini-pdf-meta > div { display: grid; align-content: start; gap: 2px; min-width: 0; }
#archive-section .archive-mini-pdf-meta span { color: #77849a; font-size: .42rem; font-weight: 800; letter-spacing: .06em; }
#archive-section .archive-mini-pdf-meta strong { overflow: hidden; color: #0e2d61; font-size: .53rem; text-overflow: ellipsis; white-space: nowrap; }
#archive-section .archive-mini-pdf-meta small { overflow: hidden; color: #66758e; font-size: .43rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
#archive-section .archive-mini-pdf-dates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 0; padding: 7px 0; }
#archive-section .archive-mini-pdf-dates div { display: flex; gap: 3px; justify-content: space-between; }
#archive-section .archive-mini-pdf-dates :is(dt, dd) { margin: 0; font-size: .43rem; }
#archive-section .archive-mini-pdf-dates dt { color: #78859a; }
#archive-section .archive-mini-pdf-dates dd { color: #173866; font-weight: 700; }
#archive-section .archive-mini-pdf-table { width: 100%; border-collapse: collapse; font-size: .43rem; }
#archive-section .archive-mini-pdf-table th { padding: 5px 4px; color: #fff; text-align: left; background: #12376f; }
#archive-section .archive-mini-pdf-table th:nth-child(n+3),
#archive-section .archive-mini-pdf-table td:nth-child(n+3) { text-align: right; }
#archive-section .archive-mini-pdf-table td { padding: 5px 4px; border-bottom: 1px solid #e1e6ee; color: #314766; vertical-align: top; }
#archive-section .archive-mini-pdf-table td strong { color: #122f5e; font-size: .45rem; }
#archive-section .archive-mini-pdf-more { margin: 5px 0; color: #60708a; font-size: .43rem; text-align: center; }
#archive-section .archive-mini-pdf-totals { display: grid; gap: 3px; width: 57%; margin: 9px 0 0 auto; }
#archive-section .archive-mini-pdf-totals div { display: flex; justify-content: space-between; gap: 7px; color: #53647e; font-size: .45rem; }
#archive-section .archive-mini-pdf-totals strong { color: #18345f; }
#archive-section .archive-mini-pdf-totals .is-grand { margin-top: 3px; padding: 5px 4px; color: #fff; background: #1459ed; }
#archive-section .archive-mini-pdf-totals .is-grand strong { color: #fff; }
#archive-section .archive-mini-pdf-notes { margin-top: 12px; padding-top: 7px; border-top: 1px solid #d8e0ea; }
#archive-section .archive-mini-pdf-notes strong { color: #173866; font-size: .46rem; }
#archive-section .archive-mini-pdf-notes p { margin: 3px 0 0; color: #5d6b80; font-size: .42rem; line-height: 1.35; }
#archive-section .archive-mini-pdf footer { display: flex; justify-content: space-between; gap: 7px; margin-top: 15px; padding-top: 6px; border-top: 1px solid #d8e0ea; color: #738097; font-size: .4rem; }
#archive-section .archive-mini-pdf footer strong { color: #173866; }
#archive-section .archive-preview-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 9px; }
#archive-section .archive-preview-actions .btn { min-width: 0; padding-inline: 7px; }
#archive-section .archive-row-select,
#platform-admin-section .platform-company-select {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 0;
    border: 0;
    color: inherit;
    text-align: left;
    background: transparent;
    cursor: pointer;
}
#archive-section .archive-row-select:hover .table-primary-text,
#archive-section tr.is-selected .archive-row-select .table-primary-text { color: var(--launch-accent) !important; }
#archive-section .archive-status-stack select { min-width: 112px; min-height: 30px !important; padding-block: 3px !important; font-size: .62rem !important; }
#archive-section .archive-extended-actions { margin-top: 4px; }

/* Materials */
#malzeme-section .materials-kpi-grid { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
#malzeme-section .material-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(125px, auto)) auto !important; }
#malzeme-section #malzemeTable tbody tr:first-child td { border-top: 1px solid var(--launch-accent); }
#malzeme-section .material-currency-chip,
#malzeme-section .material-stock-badge {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 2px 7px;
    border: 1px solid var(--launch-line);
    border-radius: 2px;
    color: var(--launch-heading);
    background: var(--launch-panel-soft);
    font-size: .62rem;
    font-weight: 700;
}
#malzeme-section .material-stock-badge.is-critical { border-color: var(--launch-danger); color: var(--launch-danger); background: var(--launch-danger-soft); }
#malzeme-section .material-analysis-panel { margin-top: 10px; padding: 12px !important; }
#malzeme-section .material-analysis-heading { align-items: center; }
#malzeme-section .material-analysis-heading small { color: var(--launch-muted); font-size: .62rem; }
#malzeme-section .material-analysis-grid { display: grid; grid-template-columns: repeat(3, minmax(130px, .42fr)) minmax(300px, 1.6fr); gap: 8px; padding-top: 10px; }
#malzeme-section .material-analysis-grid > article { display: grid; align-content: center; min-height: 84px; padding: 10px; border: 1px solid var(--launch-line); background: var(--launch-panel-soft); }
#malzeme-section .material-analysis-grid > article span { color: var(--launch-muted); font-size: .61rem; }
#malzeme-section .material-analysis-grid > article strong { margin: 6px 0 2px; overflow: hidden; color: var(--launch-heading); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
#malzeme-section .material-analysis-grid > article small { color: var(--launch-positive); font-size: .66rem; font-weight: 700; }
#malzeme-section .material-price-ranking { padding: 8px 10px; border-left: 1px solid var(--launch-line-strong); }
#malzeme-section .material-price-ranking h3 { margin: 0 0 6px; color: var(--launch-heading); font-size: .68rem; }
#malzeme-section .material-price-row { display: grid; grid-template-columns: minmax(120px, .9fr) 1.1fr; gap: 8px; align-items: center; min-height: 24px; }
#malzeme-section .material-price-row > span { display: flex; gap: 7px; min-width: 0; align-items: center; }
#malzeme-section .material-price-row b { color: var(--launch-faint); font-size: .55rem; }
#malzeme-section .material-price-row strong { overflow: hidden; color: var(--launch-text); font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }
#malzeme-section .material-price-row > div { display: grid; grid-template-columns: minmax(70px, 1fr) auto; gap: 6px; align-items: center; }
#malzeme-section .material-price-bar { display: block; height: 3px; background: var(--launch-accent); }
#malzeme-section .material-price-row em { min-width: 74px; color: var(--launch-heading); font-size: .58rem; font-style: normal; text-align: right; }

/* Finance */
#finans-section .finance-insight-grid { grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr) !important; }
#finans-section .finance-forecast-card,
#finans-section .finance-action-card { min-height: 180px; padding: 12px !important; }
#finans-section .finance-forecast-card { position: relative; overflow: hidden; }
#finans-section .finance-forecast-card::after {
    position: absolute;
    right: 16px;
    bottom: 16px;
    left: 16px;
    height: 52px;
    border-bottom: 1px solid var(--launch-line-strong);
    border-left: 1px solid var(--launch-line-strong);
    content: "";
    opacity: .65;
    pointer-events: none;
}
#finans-section .finance-forecast-metrics { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 30px; }
#finans-section .finance-forecast-metrics > div { padding: 8px 12px; border-left: 2px solid var(--launch-positive); background: var(--launch-panel-soft); }
#finans-section .finance-forecast-metrics > div:nth-child(2) { border-color: var(--launch-danger); }
#finans-section .finance-forecast-metrics > div:nth-child(3) { border-color: var(--launch-blue); }
#finans-section #agingTable tbody tr:last-child td { border-bottom: 0 !important; }
#finans-section .finance-action-list { display: grid; gap: 5px; }
#finans-section .finance-action-list > * { min-height: 36px; border: 1px solid var(--launch-line) !important; background: var(--launch-panel-soft) !important; }

/* Platform administration */
#platform-admin-section .platform-header-actions { display: flex; align-items: center; gap: 8px; }
#platform-admin-section .platform-admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 10px; align-items: start; }
#platform-admin-section .platform-admin-directory { min-width: 0; }
#platform-admin-section .platform-tenant-detail { position: sticky; top: 66px; min-height: 410px; }
#platform-admin-section .platform-table-shell { overflow: hidden; }
#platform-admin-section .platform-tenant-table tbody tr.is-selected td { background: var(--launch-accent-soft) !important; }
#platform-admin-section .platform-company-select:hover strong,
#platform-admin-section tr.is-selected .platform-company-select strong { color: var(--launch-accent); }
#platform-admin-section .platform-operations-grid { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr); gap: 10px; margin-top: 10px; }
#platform-admin-section .platform-health-panel { padding: 12px !important; }
#platform-admin-section .platform-panel-heading { align-items: center; }
#platform-admin-section .platform-health-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 10px; border: 1px solid var(--launch-line); }
#platform-admin-section .platform-health-grid > div { display: grid; grid-template-columns: 24px 1fr; grid-template-rows: auto auto; gap: 2px 7px; min-height: 70px; padding: 10px; border-right: 1px solid var(--launch-line); }
#platform-admin-section .platform-health-grid > div:last-child { border-right: 0; }
#platform-admin-section .platform-health-grid i { grid-row: 1 / 3; align-self: center; color: var(--launch-muted); }
#platform-admin-section .platform-health-grid span { color: var(--launch-muted); font-size: .58rem; }
#platform-admin-section .platform-health-grid strong { color: var(--launch-heading); font-size: .66rem; }
#platform-admin-section .platform-health-grid.is-healthy i { color: var(--launch-positive); }
#platform-admin-section .platform-health-grid.is-unhealthy i { color: var(--launch-danger); }
#platform-admin-section .plugin-platform-review { margin: 0 !important; }
#platform-admin-section .plugin-platform-review > summary { min-height: 46px; padding: 11px !important; }

html[data-dorat-theme] .platform-account-form { color: var(--launch-text); text-align: left; }
html[data-dorat-theme] .platform-form-intro {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin: 0 0 18px;
    padding: 12px;
    border: 1px solid var(--launch-line-strong);
    border-left: 3px solid var(--launch-accent);
    background: var(--launch-panel-soft);
    color: var(--launch-muted);
    font-size: .76rem;
    line-height: 1.55;
}
html[data-dorat-theme] .platform-form-intro > i {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: var(--launch-accent);
    background: var(--launch-accent-soft);
}
html[data-dorat-theme] .platform-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
html[data-dorat-theme] .platform-form-grid > label { display: grid; align-content: start; gap: 7px; color: var(--launch-heading); font-size: .72rem; font-weight: 700; }
html[data-dorat-theme] .platform-form-grid > label > b { display: inline; color: var(--launch-accent); }
html[data-dorat-theme] .platform-form-grid > label > small { color: var(--launch-muted); font-size: .62rem; font-weight: 500; line-height: 1.45; }
html[data-dorat-theme] .platform-form-package,
html[data-dorat-theme] .platform-membership-package {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 70px;
    padding: 11px 12px;
    border: 1px solid var(--launch-line-strong);
    border-left: 3px solid var(--launch-accent);
    background: var(--launch-panel-soft);
    text-align: left;
}
html[data-dorat-theme] .platform-form-package span,
html[data-dorat-theme] .platform-membership-package span { color: var(--launch-accent); font-size: .61rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
html[data-dorat-theme] .platform-form-package strong,
html[data-dorat-theme] .platform-membership-package strong { color: var(--launch-heading); font-size: .78rem; }
html[data-dorat-theme] .platform-form-package small,
html[data-dorat-theme] .platform-membership-package small { color: var(--launch-muted); font-size: .62rem; line-height: 1.45; }
html[data-dorat-theme] .platform-form-wide { grid-column: 1 / -1; }
html[data-dorat-theme] .platform-account-form .swal2-input,
html[data-dorat-theme] .platform-account-form .swal2-select,
html[data-dorat-theme] .platform-account-form .swal2-textarea {
    width: 100%;
    min-height: 44px;
    margin: 0;
    border: 1px solid var(--launch-line-strong);
    border-radius: 3px;
    color: var(--launch-heading);
    background: var(--launch-panel);
    box-shadow: none;
    font-size: .78rem;
}
html[data-dorat-theme] .platform-account-form .swal2-textarea { min-height: 78px; resize: vertical; }
html[data-dorat-theme] .platform-account-form .swal2-input:focus,
html[data-dorat-theme] .platform-account-form .swal2-select:focus,
html[data-dorat-theme] .platform-account-form .swal2-textarea:focus { border-color: var(--launch-accent); outline: 2px solid var(--launch-accent-soft); outline-offset: 1px; }
html[data-dorat-theme] .platform-password-input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .025em; }
html[data-dorat-theme] .platform-credential-result {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 8px 12px;
    margin: 16px 0 10px;
    padding: 14px;
    border: 1px solid var(--launch-positive);
    background: color-mix(in srgb, var(--launch-positive) 8%, transparent);
    text-align: left;
}
html[data-dorat-theme] .platform-credential-result span { color: var(--launch-muted); font-size: .68rem; }
html[data-dorat-theme] .platform-credential-result strong,
html[data-dorat-theme] .platform-credential-result code { overflow-wrap: anywhere; color: var(--launch-heading); font-size: .78rem; }
html[data-dorat-theme] .platform-user-manager { color: var(--launch-text); text-align: left; }
html[data-dorat-theme] .platform-user-manager-summary { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--launch-line); }
html[data-dorat-theme] .platform-user-manager-summary span { color: var(--launch-heading); font-size: .78rem; }
html[data-dorat-theme] .platform-user-manager-summary small { color: var(--launch-muted); font-size: .64rem; text-align: right; }
html[data-dorat-theme] .platform-user-list { display: grid; gap: 7px; max-height: 410px; overflow: auto; padding-right: 3px; }
html[data-dorat-theme] .platform-user-card {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 64px;
    padding: 10px;
    border: 1px solid var(--launch-line);
    background: var(--launch-panel-soft);
}
html[data-dorat-theme] .platform-user-avatar { display: grid; width: 34px; height: 34px; place-items: center; color: var(--launch-accent); background: var(--launch-accent-soft); }
html[data-dorat-theme] .platform-user-card > div { display: grid; min-width: 0; gap: 2px; }
html[data-dorat-theme] .platform-user-card strong { overflow: hidden; color: var(--launch-heading); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
html[data-dorat-theme] .platform-user-card small { overflow: hidden; color: var(--launch-muted); font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
html[data-dorat-theme] .platform-user-card div > span { color: var(--launch-accent); font-size: .59rem; font-weight: 700; }
html[data-dorat-theme] .platform-user-empty { display: grid; justify-items: center; gap: 8px; padding: 28px; color: var(--launch-muted); border: 1px dashed var(--launch-line-strong); }

/* Workshop */
#atolyem-section .erp-capacity-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 9px; align-items: stretch; }
#atolyem-section .erp-capacity-layout > .erp-section { margin: 0 !important; }
#atolyem-section .erp-machine-grid { grid-template-columns: repeat(auto-fit, minmax(142px, 1fr)) !important; }
#atolyem-section .erp-machine-card { display: grid; align-content: start; min-height: 172px !important; border-color: var(--launch-line) !important; }
#atolyem-section .erp-machine-card:hover { border-color: var(--launch-accent) !important; background: var(--launch-accent-soft) !important; }
#atolyem-section .erp-machine-gauge { display: grid; justify-items: center; margin: 10px 0 6px; }
#atolyem-section .erp-machine-gauge strong { display: grid; width: 58px; height: 58px; place-items: center; border: 5px solid var(--launch-positive); border-radius: 50%; color: var(--launch-heading); font-size: 1rem; }
#atolyem-section .erp-machine-card.is-overload .erp-machine-gauge strong { border-color: var(--launch-danger); }
#atolyem-section .erp-machine-gauge span { margin-top: 4px; color: var(--launch-muted); font-size: .56rem; }
#atolyem-section .erp-machine-capacity,
#atolyem-section .erp-machine-next { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 6px; color: var(--launch-muted); font-size: .56rem; }
#atolyem-section .erp-machine-next { padding-top: 6px; border-top: 1px solid var(--launch-line); }
#atolyem-section .erp-machine-next span { color: var(--launch-heading); font-weight: 700; }
#atolyem-section .erp-machine-next strong { color: var(--launch-muted); font-size: .55rem; font-weight: 600; }
#atolyem-section .erp-queue-preview { min-width: 0; }
#atolyem-section .erp-queue-preview-list { display: grid; gap: 4px; }
#atolyem-section .erp-queue-preview-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 7px; align-items: center; min-height: 48px; padding: 6px 7px; border: 1px solid var(--launch-line); border-radius: 3px; color: var(--launch-text); text-align: left; background: var(--launch-panel-soft); cursor: pointer; }
#atolyem-section .erp-queue-preview-item:hover { border-color: var(--launch-accent); }
#atolyem-section .erp-queue-preview-item > b { grid-row: 1 / 3; display: grid; width: 20px; height: 20px; place-items: center; color: var(--launch-heading); background: var(--launch-line); font-size: .58rem; }
#atolyem-section .erp-queue-preview-item > span { display: grid; min-width: 0; }
#atolyem-section .erp-queue-preview-item > span strong { color: var(--launch-heading); font-size: .65rem; }
#atolyem-section .erp-queue-preview-item > span small { overflow: hidden; color: var(--launch-muted); font-size: .55rem; text-overflow: ellipsis; white-space: nowrap; }
#atolyem-section .erp-queue-preview-item > em { padding: 2px 5px; border: 1px solid var(--launch-positive); color: var(--launch-positive); font-size: .52rem; font-style: normal; }
#atolyem-section .erp-queue-preview-item > em.is-blocked { border-color: var(--launch-warning); color: var(--launch-warning); }
#atolyem-section .erp-queue-preview-item > small { grid-column: 3; color: var(--launch-muted); font-size: .52rem; text-align: right; }

@media (max-width: 1180px) {
    #archive-section .archive-workspace-grid { grid-template-columns: minmax(0, 1fr) 310px; }
    #platform-admin-section .platform-admin-layout,
    #atolyem-section .erp-capacity-layout { grid-template-columns: minmax(0, 1fr) 235px; }
    #malzeme-section .material-analysis-grid { grid-template-columns: repeat(3, 1fr); }
    #malzeme-section .material-price-ranking { grid-column: 1 / -1; border-top: 1px solid var(--launch-line-strong); border-left: 0; }
}

@media (max-width: 920px) {
    #archive-section .archive-workspace-grid,
    #platform-admin-section .platform-admin-layout,
    #platform-admin-section .platform-operations-grid,
    #atolyem-section .erp-capacity-layout,
    #finans-section .finance-insight-grid { grid-template-columns: 1fr !important; }
    #archive-section #archiveDetailPanel,
    #platform-admin-section .platform-tenant-detail { position: static; min-height: 0; }
    #archive-section .workspace-detail-empty,
    #platform-admin-section .workspace-detail-empty { min-height: 150px; }
    #malzeme-section .material-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(120px, auto)) !important; }
    #malzeme-section .workspace-result-count { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    html[data-dorat-theme] .workspace-header-actions { width: 100%; }
    html[data-dorat-theme] .workspace-header-actions .btn { flex: 1; }
    #malzeme-section .materials-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    #malzeme-section .material-toolbar,
    #malzeme-section .material-analysis-grid { grid-template-columns: 1fr !important; }
    #malzeme-section .material-price-ranking { grid-column: auto; }
    #platform-admin-section .platform-health-grid { grid-template-columns: 1fr; }
    #platform-admin-section .platform-health-grid > div { border-right: 0; border-bottom: 1px solid var(--launch-line); }
    #platform-admin-section .platform-health-grid > div:last-child { border-bottom: 0; }
    #platform-admin-section .platform-admin-header { align-items: stretch; }
    #platform-admin-section .platform-header-actions { width: 100%; }
    #platform-admin-section .platform-header-actions .btn { flex: 1; }
    html[data-dorat-theme] .platform-form-grid { grid-template-columns: 1fr; }
    html[data-dorat-theme] .platform-form-wide { grid-column: auto; }
    html[data-dorat-theme] .platform-user-card { grid-template-columns: 34px minmax(0, 1fr); }
    html[data-dorat-theme] .platform-user-card > .btn { grid-column: 1 / -1; width: 100%; }
    #atolyem-section .erp-machine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 430px) {
    #atolyem-section .erp-machine-grid { grid-template-columns: 1fr !important; }
    #finans-section .finance-forecast-metrics { grid-template-columns: 1fr; gap: 5px; margin-top: 12px; }
    #finans-section .finance-forecast-card::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html[data-dorat-theme] :is(#archive-section, #malzeme-section, #finans-section, #atolyem-section, #platform-admin-section).active { animation: none; }
}
