/* AKDORAT workshop command center — reference-aligned production overview */

body[data-launch-workspace="atolyem-section"] .launch-global-bar { display: none; }
body[data-launch-workspace="atolyem-section"][data-launch-ui="ready"] .main-content { padding-top: 0 !important; }

#atolyem-section {
    min-height: 100vh;
    padding: 0 20px 20px !important;
    background: var(--launch-bg) !important;
}

#atolyem-section .erp-shell {
    display: grid;
    max-width: 1680px !important;
    margin: 0 auto;
    gap: 12px;
    padding: 0 !important;
}

#atolyem-section :is(.erp-command-header, .erp-alert-strip, .erp-kpi-grid, .erp-tabs, .erp-section) {
    margin-bottom: 0 !important;
}

#atolyem-section .erp-command-header {
    position: sticky;
    z-index: 25;
    top: 0;
    min-height: 72px !important;
    padding: 0 0 0 10px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--launch-line) !important;
    border-radius: 0 !important;
    background: color-mix(in srgb, var(--launch-bg) 94%, transparent) !important;
    box-shadow: none !important;
    backdrop-filter: blur(18px);
}

#atolyem-section .erp-command-copy { align-items: center; }
#atolyem-section .erp-command-copy h1 {
    color: var(--launch-heading) !important;
    font-size: 1.55rem !important;
    font-weight: 700 !important;
    letter-spacing: -.035em;
}

#atolyem-section .erp-command-actions { gap: 8px; }
#atolyem-section .erp-command-actions .btn {
    min-height: 38px;
    padding: 7px 14px !important;
    border-radius: 3px !important;
    font-size: .7rem;
}

#atolyem-section .workshop-new-order {
    border-color: var(--launch-accent) !important;
    color: var(--launch-accent) !important;
    background: transparent !important;
}

#atolyem-section .workshop-new-order:hover {
    color: #fff !important;
    background: var(--launch-accent) !important;
}

#atolyem-section .workshop-header-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 50%;
    color: var(--launch-muted);
    background: transparent;
}

#atolyem-section .workshop-header-icon:hover,
#atolyem-section .workshop-header-icon:focus-visible {
    border-color: var(--launch-line-strong);
    color: var(--launch-heading);
    background: var(--launch-panel-soft);
}

#atolyem-section .workshop-user-chip {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--launch-line-strong);
    border-radius: 50%;
    color: var(--launch-heading);
    background: var(--launch-panel);
    font-size: .68rem;
    font-weight: 800;
}

#atolyem-section .workshop-user-menu { position: relative; }
#atolyem-section .workshop-user-menu > summary {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--launch-muted);
    list-style: none;
    cursor: pointer;
}
#atolyem-section .workshop-user-menu > summary::-webkit-details-marker { display: none; }
#atolyem-section .workshop-user-menu > div {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    width: 160px;
    padding: 5px;
    border: 1px solid var(--launch-line-strong);
    border-radius: 3px;
    background: var(--launch-panel);
    box-shadow: 0 16px 36px var(--launch-shadow);
}
#atolyem-section .workshop-user-menu > div button {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border: 0;
    color: var(--launch-text);
    background: transparent;
    font-size: .65rem;
    text-align: left;
}
#atolyem-section .workshop-user-menu > div button:hover { color: var(--launch-heading); background: var(--launch-panel-soft); }

#atolyem-section .erp-service-pill {
    max-width: 190px;
    border: 0;
    background: transparent;
    font-size: .58rem;
}

#atolyem-section .erp-alert-strip { display: none !important; }

#atolyem-section .erp-command-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
}

#atolyem-section .workshop-header-tabs {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 4px;
    padding: 4px;
    overflow-x: auto;
    border: 1px solid var(--launch-line);
    border-radius: 9px;
    background: var(--launch-panel);
    scrollbar-width: none;
}
#atolyem-section .workshop-header-tabs::-webkit-scrollbar { display: none; }
#atolyem-section .workshop-header-tabs button {
    display: inline-flex;
    box-sizing: border-box;
    min-height: 40px;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid transparent !important;
    border-radius: 6px;
    color: var(--launch-muted) !important;
    background: transparent !important;
    font-size: .74rem !important;
    font-weight: 750 !important;
    letter-spacing: -.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
#atolyem-section .workshop-header-tabs button:hover,
#atolyem-section .workshop-header-tabs button:focus-visible { color: var(--launch-heading) !important; background: var(--launch-panel-soft) !important; }
#atolyem-section .workshop-header-tabs button.is-active {
    border-color: color-mix(in srgb, var(--launch-accent) 34%, var(--launch-line)) !important;
    color: var(--launch-accent) !important;
    background: var(--launch-accent-soft) !important;
}
#atolyem-section .workshop-header-tabs button i { font-size: .8rem; }
#atolyem-section .workshop-header-tabs .erp-tab-badge { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; font-size: .62rem; }

#atolyem-section .workshop-primary-kpis {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

#atolyem-section .workshop-primary-kpis .erp-kpi-card {
    min-height: 112px !important;
    padding: 19px 28px !important;
    border: 1px solid var(--launch-line) !important;
    border-radius: 3px !important;
    background: var(--launch-panel) !important;
    box-shadow: none !important;
}

#atolyem-section .workshop-primary-kpis .erp-kpi-card::before { display: none !important; }
#atolyem-section .workshop-primary-kpis .erp-kpi-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border: 0 !important;
    background: transparent !important;
    font-size: 1.75rem;
}
#atolyem-section .workshop-primary-kpis .erp-kpi-card > div:last-child { gap: 2px; }
#atolyem-section .workshop-primary-kpis .erp-kpi-card span {
    color: var(--launch-text) !important;
    font-size: .8rem !important;
    font-weight: 550;
}
#atolyem-section .workshop-primary-kpis .erp-kpi-card strong {
    display: inline-flex !important;
    align-items: baseline;
    gap: 6px;
    color: currentColor !important;
    font-size: 2rem !important;
    font-weight: 650;
    letter-spacing: -.035em;
}
#atolyem-section .workshop-primary-kpis [hidden] { display: none !important; }
#atolyem-section .workshop-primary-kpis .tone-orange .erp-kpi-icon { color: var(--launch-accent) !important; }
#atolyem-section .workshop-primary-kpis .tone-green .erp-kpi-icon { color: var(--launch-positive) !important; }
#atolyem-section .workshop-primary-kpis .tone-amber .erp-kpi-icon { color: var(--launch-warning) !important; }
#atolyem-section .workshop-primary-kpis .tone-red .erp-kpi-icon { color: var(--launch-danger) !important; }
#atolyem-section .workshop-primary-kpis .tone-orange { color: var(--launch-accent) !important; }
#atolyem-section .workshop-primary-kpis .tone-green { color: var(--launch-positive) !important; }
#atolyem-section .workshop-primary-kpis .tone-amber { color: var(--launch-warning) !important; }
#atolyem-section .workshop-primary-kpis .tone-red { color: var(--launch-danger) !important; }

#atolyem-section .workshop-command-grid {
    display: grid;
    min-width: 0;
    gap: 12px;
}

#atolyem-section .workshop-command-grid-primary,
#atolyem-section .workshop-command-grid-secondary {
    grid-template-columns: minmax(0, 1.8fr) minmax(330px, 1fr);
}

#atolyem-section .erp-section {
    min-width: 0;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid var(--launch-line) !important;
    border-radius: 3px !important;
    background: var(--launch-panel) !important;
    box-shadow: none !important;
}

#atolyem-section .erp-section-heading {
    min-height: 52px;
    margin: 0 !important;
    padding: 0 18px;
    align-items: center;
    border-bottom: 1px solid var(--launch-line);
}

#atolyem-section .erp-section-heading h2 {
    color: var(--launch-heading) !important;
    font-size: .95rem !important;
    font-weight: 700;
}

#atolyem-section .erp-text-button {
    min-height: 32px;
    padding: 4px 2px !important;
    gap: 9px;
    border: 0 !important;
    color: var(--launch-accent) !important;
    background: transparent !important;
    font-size: .66rem;
}

#atolyem-section .workshop-plan-table-wrap { overflow-x: auto; }
#atolyem-section .workshop-plan-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--launch-text);
    font-size: .68rem;
}
#atolyem-section .workshop-plan-table th {
    height: 43px;
    padding: 0 16px;
    border-bottom: 1px solid var(--launch-line);
    color: var(--launch-muted);
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
#atolyem-section .workshop-plan-table td {
    height: 50px;
    padding: 0 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--launch-line) 75%, transparent);
    white-space: nowrap;
}
#atolyem-section .workshop-plan-table tbody tr:last-child td { border-bottom: 0; }
#atolyem-section .workshop-plan-table tbody tr:hover { background: var(--launch-panel-soft); }
#atolyem-section .workshop-order-link {
    padding: 0;
    border: 0;
    color: var(--launch-heading);
    background: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
#atolyem-section .workshop-order-link:hover { color: var(--launch-accent); }
#atolyem-section .workshop-progress-value {
    display: inline-block;
    width: 32px;
    color: var(--launch-positive);
    font-weight: 750;
}
#atolyem-section .workshop-linear-progress {
    display: inline-block;
    width: 68px;
    height: 4px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--launch-line);
    vertical-align: middle;
}
#atolyem-section .workshop-linear-progress i { display: block; height: 100%; background: var(--launch-positive); }
#atolyem-section .workshop-empty-row { height: 250px !important; color: var(--launch-muted); text-align: center; }
#atolyem-section .workshop-empty-row i { margin-right: 7px; color: var(--launch-positive); }

#atolyem-section .workshop-attention-list,
#atolyem-section .workshop-deadline-list { display: grid; }
#atolyem-section .workshop-attention-item,
#atolyem-section .workshop-deadline-item {
    display: grid;
    min-height: 84px;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border: 0;
    border-bottom: 1px solid var(--launch-line);
    color: var(--launch-text);
    background: transparent;
    text-align: left;
}
#atolyem-section :is(.workshop-attention-item, .workshop-deadline-item):last-child { border-bottom: 0; }
#atolyem-section :is(.workshop-attention-item, .workshop-deadline-item):hover { background: var(--launch-panel-soft); }
#atolyem-section .workshop-attention-item { grid-template-columns: 44px minmax(0, 1fr) auto; }
#atolyem-section .workshop-attention-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 2px solid currentColor;
    border-radius: 50%;
    font-size: 1rem;
}
#atolyem-section .workshop-attention-item > span:nth-child(2),
#atolyem-section .workshop-deadline-item > span { display: grid; gap: 5px; }
#atolyem-section .workshop-attention-item strong,
#atolyem-section .workshop-deadline-item strong { color: currentColor; font-size: .7rem; }
#atolyem-section .workshop-attention-item small,
#atolyem-section .workshop-deadline-item small { color: var(--launch-muted); font-size: .6rem; }
#atolyem-section .workshop-attention-item em {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--launch-accent);
    font-size: .64rem;
    font-style: normal;
}
#atolyem-section .workshop-attention-item.tone-danger { color: var(--launch-danger); }
#atolyem-section .workshop-attention-item.tone-warning { color: var(--launch-warning); }
#atolyem-section .workshop-attention-item.tone-success { color: var(--launch-positive); }

#atolyem-section .workshop-machines-panel .erp-section-heading { border-bottom: 0; }
#atolyem-section .erp-machine-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(128px, 1fr));
    gap: 10px !important;
    overflow-x: auto;
    padding: 0 16px 16px;
}
#atolyem-section .erp-machine-card {
    display: grid;
    min-width: 128px;
    min-height: 186px !important;
    align-content: start;
    gap: 12px;
    padding: 14px !important;
    border: 1px solid var(--launch-line) !important;
    border-radius: 3px !important;
    color: var(--launch-text);
    background: var(--launch-panel-soft) !important;
    box-shadow: none !important;
}
#atolyem-section .erp-machine-card:hover { border-color: var(--launch-accent) !important; background: var(--launch-accent-soft) !important; }
#atolyem-section .erp-machine-identity { display: block !important; }
#atolyem-section .erp-machine-indicator { display: none !important; }
#atolyem-section .erp-machine-identity > div { display: grid; gap: 5px; }
#atolyem-section .erp-machine-name { color: var(--launch-heading); font-size: .7rem; font-weight: 700; }
#atolyem-section .erp-machine-status { width: fit-content; padding: 0 !important; color: var(--launch-positive) !important; background: none !important; font-size: .55rem; }
#atolyem-section .erp-machine-status.is-paused,
#atolyem-section .erp-machine-status.is-overload { color: var(--launch-warning) !important; }
#atolyem-section .erp-machine-status.is-unavailable { color: var(--launch-danger) !important; }
#atolyem-section .erp-machine-load { display: grid; gap: 3px; }
#atolyem-section .erp-machine-load strong { color: var(--launch-positive); font-size: 1.75rem; font-weight: 600; }
#atolyem-section .erp-machine-card.is-paused .erp-machine-load strong,
#atolyem-section .erp-machine-card.is-overload .erp-machine-load strong { color: var(--launch-warning); }
#atolyem-section .erp-machine-card.is-unavailable .erp-machine-load strong { color: var(--launch-danger); }
#atolyem-section .erp-machine-load span { overflow: hidden; color: var(--launch-muted); font-size: .55rem; text-overflow: ellipsis; white-space: nowrap; }
#atolyem-section .erp-progress { height: 4px; background: var(--launch-line) !important; }
#atolyem-section .erp-machine-next { display: grid; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--launch-line); }
#atolyem-section .erp-machine-next::before { content: "Güncel İş"; color: var(--launch-muted); font-size: .52rem; }
#atolyem-section .erp-machine-next span { color: var(--launch-heading); font-size: .63rem; font-weight: 700; }
#atolyem-section .erp-machine-next strong { display: none; }

#atolyem-section .workshop-deadline-item {
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 72px;
}
#atolyem-section .workshop-deadline-item time { display: flex; align-items: center; gap: 7px; color: var(--launch-text); font-size: .62rem; white-space: nowrap; }
#atolyem-section .workshop-deadline-item em { color: var(--launch-warning); font-size: .63rem; font-style: normal; white-space: nowrap; }
#atolyem-section .workshop-deadline-item em.is-late { color: var(--launch-danger); }
#atolyem-section .workshop-empty-state { display: flex; min-height: 214px; align-items: center; justify-content: center; gap: 9px; color: var(--launch-muted); font-size: .68rem; }

#atolyem-section .workshop-all-jobs-panel { scroll-margin-top: 84px; }
#atolyem-section .workshop-all-jobs-panel > summary {
    min-height: 46px;
    padding: 14px 18px;
    color: var(--launch-heading);
    font-size: .78rem;
    font-weight: 750;
    cursor: pointer;
}
#atolyem-section .workshop-all-jobs-content { display: grid; gap: 12px; padding: 0 14px 14px; }
#atolyem-section .erp-board-controls { display: flex; flex-wrap: wrap; gap: 8px; }
#atolyem-section .erp-search { min-width: min(330px, 100%); }
#atolyem-section .erp-kanban-board { grid-template-columns: repeat(3, minmax(270px, 1fr)); }

@media (max-width: 1280px) {
    #atolyem-section .workshop-command-grid-primary,
    #atolyem-section .workshop-command-grid-secondary { grid-template-columns: minmax(0, 1.55fr) minmax(290px, .85fr); }
    #atolyem-section .erp-machine-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 980px) {
    #atolyem-section { padding: 0 12px 16px !important; }
    #atolyem-section .workshop-command-grid-primary,
    #atolyem-section .workshop-command-grid-secondary { grid-template-columns: 1fr; }
    #atolyem-section .workshop-primary-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    #atolyem-section .erp-kanban-board { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    #atolyem-section { padding: 0 8px 12px !important; }
    #atolyem-section .erp-command-header { min-height: 58px !important; grid-template-columns: auto minmax(0, 1fr); gap: 6px; padding-left: 0 !important; }
    #atolyem-section .workshop-header-tabs { grid-column: 1 / -1; grid-row: 2; width: 100%; padding: 4px; }
    #atolyem-section .workshop-header-tabs button { min-height: 38px; padding: 0 10px; font-size: .7rem !important; }
    html[data-dorat-theme] #atolyem-section .erp-command-header .mobile-menu-trigger { display: grid !important; }
    #atolyem-section .erp-command-actions { gap: 4px; }
    #atolyem-section .erp-service-pill,
    #atolyem-section .workshop-header-icon:first-of-type,
    #atolyem-section .workshop-user-menu { display: none !important; }
    #atolyem-section .erp-command-actions .btn { min-width: 38px; padding-inline: 10px !important; font-size: 0; }
    #atolyem-section .erp-command-actions .btn i { margin: 0; font-size: .78rem; }
    #atolyem-section .workshop-primary-kpis { gap: 6px !important; }
    #atolyem-section .workshop-primary-kpis .erp-kpi-card { min-height: 82px !important; padding: 11px !important; }
    #atolyem-section .workshop-primary-kpis .erp-kpi-icon { width: 34px; height: 34px; flex-basis: 34px; font-size: 1.15rem; }
    #atolyem-section .workshop-primary-kpis .erp-kpi-card strong { font-size: 1.4rem !important; }
    #atolyem-section .workshop-plan-table { min-width: 790px; }
    #atolyem-section .erp-machine-grid { display: flex !important; padding-inline: 10px; scroll-snap-type: x mandatory; }
    #atolyem-section .erp-machine-card { flex: 0 0 165px; scroll-snap-align: start; }
    #atolyem-section .workshop-deadline-item { grid-template-columns: minmax(0, 1fr) auto; }
    #atolyem-section .workshop-deadline-item time { grid-column: 1; }
    #atolyem-section .workshop-deadline-item em { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 430px) {
    #atolyem-section .workshop-primary-kpis .erp-kpi-card span { font-size: .66rem !important; }
    #atolyem-section .workshop-attention-item { grid-template-columns: 36px minmax(0, 1fr); padding-inline: 12px; }
    #atolyem-section .workshop-attention-icon { width: 32px; height: 32px; }
    #atolyem-section .workshop-attention-item em { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
    #atolyem-section * { scroll-behavior: auto !important; }
}
