/* NexaCAM interface system: editorial scale, industrial restraint. */
:root {
    --bg-0: #090909;
    --bg-1: #10110f;
    --bg-2: #171815;
    --surface: #151613;
    --surface-raised: #1c1d19;
    --glass-fill: rgba(16, 17, 15, .94);
    --glass-fill-strong: rgba(22, 23, 20, .97);
    --glass-border: rgba(244, 244, 235, .14);
    --glass-border-hover: rgba(207, 255, 55, .62);
    --glass-blur: blur(18px);
    --accent-teal: #ceff38;
    --accent-teal-matte: #a9d527;
    --accent-violet: #ff725e;
    --accent-violet-matte: #d95746;
    --accent-amber: #ffc857;
    --accent-rose: #ff6659;
    --text-hi: #f2f2e9;
    --text-mid: #b7b8ae;
    --text-low: #777970;
    --radius-lg: 6px;
    --radius-md: 4px;
    --radius-sm: 3px;
    --line: 1px solid var(--glass-border);
    --shadow-glass: 0 24px 80px rgba(0, 0, 0, .3);
    --shadow-float: 0 30px 100px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg-0); }
.nx-prompt-builder{margin:18px 0 22px;padding:22px;border:1px solid var(--glass-border);border-left:3px solid var(--accent-teal);background:var(--surface)}.nx-prompt-builder h2{margin:6px 0 8px;color:var(--text-hi);font-size:21px}.nx-prompt-builder p{margin:0 0 14px;color:var(--text-mid);line-height:1.7;font-size:13px}.nx-prompt-row{display:flex;gap:12px;align-items:stretch}.nx-prompt-row textarea{flex:1;min-height:55px;padding:12px;border:1px solid var(--glass-border);background:var(--bg-1);color:var(--text-hi);border-radius:5px;font:inherit;resize:vertical}.nx-prompt-result{margin-top:12px}.nx-prompt-ok,.nx-prompt-warn{padding:12px 15px;border-left:3px solid #9edea7;background:#18301f;color:#cceacf;font-size:13px;line-height:1.6}.nx-prompt-ok strong{color:var(--text-hi)}.nx-prompt-ok p{margin:4px 0 0}.nx-prompt-ok .nx-prompt-warn,.nx-prompt-warn{border-color:#ffc857;background:#332a15;color:#ffe0a0}@media(max-width:600px){.nx-prompt-row{display:grid}.nx-prompt-row .nx-btn{width:100%}}
body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg-0);
    color: var(--text-hi);
    font-family: "Manrope", Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .27;
    background-image: radial-gradient(rgba(255,255,255,.12) .55px, transparent .55px);
    background-size: 5px 5px;
}
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 120;
    background: var(--accent-teal);
    transform-origin: left;
    animation: nx-load 900ms cubic-bezier(.2,.8,.2,1) both;
}
@keyframes nx-load { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes nx-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes nx-marquee { to { transform: translateX(-50%); } }
@keyframes nx-pulse { 50% { box-shadow: 0 0 0 8px rgba(206,255,56,.08), 0 18px 40px rgba(0,0,0,.42); } }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: #090909; background: var(--accent-teal); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: #42443e; border: 2px solid var(--bg-0); }

.glass,
.glass-panel {
    background: var(--glass-fill);
    border: var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}
.glass-panel { background: var(--glass-fill-strong); padding: 24px; }
.glass-panel--tight { padding: 14px; }

.nx-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    min-height: 82px;
    padding: 0 clamp(20px, 3.2vw, 54px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: stretch;
    gap: clamp(20px, 3vw, 48px);
    background: rgba(9,9,9,.92);
    border-bottom: var(--line);
    backdrop-filter: blur(18px);
}
.nx-brand { display: flex; align-items: center; gap: 12px; min-width: max-content; }
.nx-brand-mark {
    position: relative;
    width: 34px;
    height: 34px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: end;
    gap: 3px;
    padding: 6px;
    background: var(--accent-teal);
    border-radius: 2px;
    transform: rotate(-4deg);
}
.nx-brand-mark i { display: block; height: 58%; background: #090909; }
.nx-brand-mark i:nth-child(2) { height: 100%; }
.nx-brand-mark i:nth-child(3) { height: 76%; }
.nx-brand-copy {
    color: var(--text-hi);
    font: 700 19px/1 "Chakra Petch", sans-serif;
}
.nx-brand-copy > span { color: var(--accent-teal); }
.nx-brand-copy small {
    display: block;
    margin-top: 5px;
    color: var(--text-low);
    font: 700 8px/1 "Manrope", sans-serif;
    letter-spacing: 1.6px;
}
.nx-nav { min-width: 0; display: flex; align-items: stretch; justify-content: center; }

/* ---- Gruplanmis acilir menu ----
   13 baslik tek satira sigmiyordu; ilgili ekranlar gruplandi. */
.nx-nav-group { position: relative; display: flex; align-items: stretch; }
.nx-nav-trigger {
    display: flex; align-items: center; gap: 6px;
    padding: 0 clamp(9px, 1.25vw, 18px);
    border: 0; border-left: 1px solid transparent; border-right: 1px solid transparent;
    background: transparent; color: var(--text-mid);
    font-family: inherit; font-size: 12px; font-weight: 700;
    white-space: nowrap; cursor: pointer;
    transition: color .2s ease, background .2s ease;
}
.nx-nav-trigger i {
    width: 0; height: 0; flex: 0 0 auto;
    border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
    border-top: 4px solid currentColor; opacity: .55;
    transition: transform .2s ease;
}
.nx-nav-group:hover .nx-nav-trigger,
.nx-nav-group:focus-within .nx-nav-trigger { color: var(--text-hi); background: rgba(255,255,255,.025); }
.nx-nav-group:hover .nx-nav-trigger i,
.nx-nav-group:focus-within .nx-nav-trigger i { transform: rotate(180deg); }
.nx-nav-group.active .nx-nav-trigger { color: var(--text-hi); background: rgba(206,255,56,.04); }
.nx-nav-group.active::after {
    content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px;
    height: 3px; background: var(--accent-teal);
}

.nx-nav-menu {
    position: absolute; top: 100%; left: 50%; transform: translate(-50%, -6px);
    min-width: 268px; padding: 8px;
    display: flex; flex-direction: column; gap: 2px;
    background: var(--glass-fill-strong);
    backdrop-filter: var(--glass-blur);
    border: var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-float);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
    z-index: 60;
}
.nx-nav-group:hover .nx-nav-menu,
.nx-nav-group:focus-within .nx-nav-menu,
.nx-nav-group.is-open .nx-nav-menu {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0);
}
.nx-nav-menu a {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    padding: 9px 12px; border: 0; border-radius: var(--radius-md);
    color: var(--text-hi); font-size: 12.5px; font-weight: 600; white-space: nowrap;
    text-align: left; line-height: 1.35;
}
.nx-nav-menu a::after { display: none; }
.nx-nav-menu a small {
    font-size: 10.5px; font-weight: 500; color: var(--text-low); letter-spacing: 0;
}
.nx-nav-menu a:hover { background: var(--surface-raised); color: var(--accent-teal); }
.nx-nav-menu a:hover small { color: var(--text-mid); }
.nx-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 clamp(9px, 1.25vw, 18px);
    color: var(--text-mid);
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: color .2s ease, background .2s ease;
}
.nx-nav a span { color: var(--text-low); font: 500 8px/1 "Chakra Petch", sans-serif; }
.nx-nav a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: -1px;
    height: 3px;
    background: var(--accent-teal);
    transform: scaleX(0);
    transition: transform .25s ease;
}
.nx-nav a:hover { color: var(--text-hi); background: rgba(255,255,255,.025); }
.nx-nav a.active { color: var(--text-hi); background: rgba(206,255,56,.04); }
.nx-nav a.active::after { transform: scaleX(1); }
.nx-nav a.active span { color: var(--accent-teal); }
.nx-user { display: flex; align-items: center; gap: 15px; white-space: nowrap; }
.nx-user-status { display: flex; align-items: center; gap: 7px; color: var(--text-mid); font-size: 11px; font-weight: 700; }
.nx-user-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-teal); box-shadow: 0 0 10px rgba(206,255,56,.6); }
.nx-user .logout { padding: 9px 0; border-bottom: 1px solid var(--text-low); color: var(--text-hi); font-size: 11px; font-weight: 700; }
.nx-user .logout:hover { color: var(--accent-teal); border-color: var(--accent-teal); }
.nx-menu-toggle { display: none; }

.nx-app {
    position: relative;
    z-index: 1;
    width: min(1500px, 100%);
    min-height: calc(100vh - 82px);
    margin: 0 auto;
    padding: clamp(34px, 5vw, 74px) clamp(20px, 3.2vw, 54px) 110px;
    animation: nx-enter .65s .08s cubic-bezier(.2,.8,.2,1) both;
}
.is-guest .nx-app { width: 100%; padding: 0; }
.nx-flash-stack { position: relative; z-index: 5; margin-bottom: 18px; }
.nx-flash { padding: 13px 15px; color: var(--text-hi); border: var(--line); border-left: 3px solid var(--accent-teal); background: var(--surface); font-size: 12px; font-weight: 700; }
.nx-flash.error { border-left-color: var(--accent-rose); }

.nx-page-head {
    position: relative;
    margin: 0 0 38px;
    padding: 0 0 26px;
    border-bottom: var(--line);
}
.nx-page-head::before {
    content: "NEXACAM / OPERASYON";
    display: block;
    margin-bottom: 12px;
    color: var(--accent-teal);
    font: 700 9px/1 "Manrope", sans-serif;
    letter-spacing: 1.8px;
}
.nx-page-head h1 {
    max-width: 1050px;
    margin: 0 0 9px;
    color: var(--text-hi);
    font: 600 72px/.94 "Chakra Petch", sans-serif;
    letter-spacing: 0;
}
.nx-page-head p { max-width: 700px; margin: 0; color: var(--text-low); font-size: 13px; line-height: 1.6; }

.nx-dashboard-hero {
    position: relative;
    min-height: min(470px, 48vw);
    margin: calc(-1 * clamp(34px, 5vw, 74px)) calc(-1 * clamp(20px, 3.2vw, 54px)) 0;
    padding: clamp(120px, 15vw, 220px) clamp(20px, 3.2vw, 54px) 45px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-bottom: var(--line);
    background: #0a0a0a url("../images/nexacam-cnc-hero.jpg") center/cover no-repeat;
}
.nx-dashboard-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7,7,7,.9) 0%, rgba(7,7,7,.57) 42%, rgba(7,7,7,.07) 75%), linear-gradient(0deg, #090909 0%, transparent 35%);
}
.nx-dashboard-hero-content { position: relative; z-index: 1; width: min(720px, 70%); }
.nx-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: var(--accent-teal); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.nx-eyebrow i { width: 22px; height: 2px; background: currentColor; }
.nx-dashboard-hero h1 { margin: 0; font: 600 92px/.9 "Chakra Petch", sans-serif; }
.nx-dashboard-hero p { max-width: 540px; margin: 18px 0 0; color: #c6c7be; font-size: 14px; line-height: 1.65; }
.nx-live-tag { position: absolute; z-index: 2; right: 54px; bottom: 45px; padding: 10px 14px; color: #090909; background: var(--accent-teal); font-size: 10px; font-weight: 800; }

.nx-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: 0 0 34px;
    border-left: var(--line);
}
.nx-kpi {
    position: relative;
    min-height: 150px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    background: transparent;
    border: 0;
    border-right: var(--line);
    border-bottom: var(--line);
    border-radius: 0;
    box-shadow: none;
    transition: background .2s ease;
}
.nx-kpi:hover { background: var(--surface); }
.nx-kpi::before { content: "↗"; position: absolute; top: 18px; right: 18px; color: var(--text-low); }
.nx-kpi .label { max-width: 120px; color: var(--text-low); font-size: 9px; line-height: 1.35; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.nx-kpi .value { color: var(--text-hi); font: 600 56px/1 "Chakra Petch", sans-serif; }
.nx-kpi .value.accent-teal { color: var(--accent-teal); }
.nx-kpi .value.accent-violet { color: #9ed2ff; }
.nx-kpi .value.accent-amber { color: var(--accent-amber); }
.nx-kpi .value.accent-rose { color: var(--accent-rose); }

.nx-grid-2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 18px; }
.nx-grid-2 > * { min-width: 0; }
.nx-section { margin-bottom: 18px; }
.nx-section h2,
.glass-panel > h2 {
    margin: 0 0 18px;
    color: var(--text-hi);
    font: 600 15px/1.25 "Chakra Petch", sans-serif;
}
.nx-section h2 .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-teal); box-shadow: none; }

.nx-table-wrap { width: 100%; overflow-x: auto; }
table.nx-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.nx-table th {
    padding: 12px 14px;
    color: var(--text-low);
    border-top: var(--line);
    border-bottom: var(--line);
    text-align: left;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}
table.nx-table td { padding: 15px 14px; color: var(--text-mid); border-bottom: 1px solid rgba(244,244,235,.08); vertical-align: middle; }
table.nx-table tbody tr { transition: background .2s ease; }
table.nx-table tbody tr:hover { background: rgba(206,255,56,.035); }
table.nx-table tbody tr:hover td { color: var(--text-hi); }
table.nx-table td:first-child a { color: var(--text-hi); font-weight: 700; border-bottom: 1px solid rgba(206,255,56,.35); }

.nx-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 4px 9px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 2px;
    color: var(--text-mid);
    background: rgba(255,255,255,.04);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .65px;
    text-transform: uppercase;
    white-space: nowrap;
}
.nx-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.nx-badge.uretimde { color: #9ed2ff; border-color: rgba(158,210,255,.3); }
.nx-badge.kalite_kontrol { color: var(--accent-amber); border-color: rgba(255,200,87,.32); }
.nx-badge.sevkiyata_hazir, .nx-badge.sevk_edildi, .nx-badge.uygun { color: var(--accent-teal); border-color: rgba(206,255,56,.3); }
.nx-badge.gecikmis, .nx-badge.red { color: var(--accent-rose); border-color: rgba(255,102,89,.32); }

.nx-btn {
    min-height: 40px;
    padding: 10px 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-hi);
    background: none;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.nx-btn:hover { transform: translateY(-2px); }
.nx-btn--primary { color: #090909; background: var(--accent-teal); border-color: var(--accent-teal); box-shadow: none; }
.nx-btn--primary:hover { background: #e1ff81; border-color: #e1ff81; }
.nx-btn--ghost { color: var(--text-hi); background: transparent; border-color: var(--glass-border); }
.nx-btn--ghost:hover { color: var(--accent-teal); border-color: var(--accent-teal); }
.nx-btn--danger { color: var(--accent-rose); border-color: rgba(255,102,89,.45); background: rgba(255,102,89,.06); }
.nx-btn--sm { min-height: 32px; padding: 7px 11px; font-size: 10px; }

.nx-field { margin-bottom: 20px; }
.nx-field label { display: block; margin-bottom: 8px; color: var(--text-low); font-size: 9px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.nx-field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]),
.nx-field select,
.nx-field textarea,
.glass-panel input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]),
.glass-panel select,
.glass-panel textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: var(--line);
    border-radius: 2px;
    outline: none;
    color: var(--text-hi);
    background: #0d0e0c;
    caret-color: var(--accent-teal);
    transition: border-color .18s ease, background .18s ease;
}
.nx-field textarea, .glass-panel textarea { resize: vertical; }

/* Onay kutusu / secenek dugmesi: metin girisi degil, kendi dogal boyutunda
   kalmali. `.glass-panel input` kurali bunlari da yakalayip 44px yuksekligi
   ve tam genislik dayattigi icin devasa, ustune binen kutular gorunuyordu. */
.glass-panel input[type="checkbox"],
.glass-panel input[type="radio"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    flex: 0 0 auto;
    padding: 0;
    accent-color: var(--accent-teal);
}
.nx-field input:focus,
.nx-field select:focus,
.nx-field textarea:focus,
.glass-panel input:focus,
.glass-panel select:focus,
.glass-panel textarea:focus { border-color: var(--accent-teal) !important; background: #12130f !important; box-shadow: none; }
input::placeholder, textarea::placeholder { color: #65675f; }
.nx-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

.nx-mini-input {
    min-height: 38px;
    padding: 8px 11px;
    border: var(--line);
    border-radius: 2px;
    outline: none;
    color: var(--text-hi);
    background: #0d0e0c;
    font-size: 12px;
    caret-color: var(--accent-teal);
    transition: border-color .18s ease, background .18s ease;
}
.nx-mini-input:focus { border-color: var(--accent-teal) !important; background: #12130f !important; }
.nx-mini-input::placeholder { color: #65675f; }

.nx-progress { height: 5px; overflow: hidden; background: #2b2d28; border-radius: 0; }
.nx-progress > div { height: 100%; background: var(--accent-teal); border-radius: 0; }
.nx-empty { padding: 52px 20px; color: var(--text-low); border: 1px dashed rgba(244,244,235,.16); text-align: center; font-size: 12px; }

.nx-login {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(420px, .6fr);
    overflow: hidden;
    background: #090909;
}
.nx-login-visual { position: relative; min-height: 100vh; background: url("../images/nexacam-cnc-hero.jpg") center/cover no-repeat; }
.nx-login-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,8,8,.08), rgba(8,8,8,.22)), linear-gradient(0deg, rgba(8,8,8,.9), transparent 60%); }
.nx-login-intro { position: absolute; z-index: 1; left: clamp(28px, 5vw, 72px); right: 28px; bottom: clamp(36px, 7vw, 88px); }
.nx-login-intro small { color: var(--accent-teal); font-size: 10px; font-weight: 800; letter-spacing: 1.8px; }
.nx-login-intro h1 { max-width: 780px; margin: 15px 0 0; font: 600 96px/.88 "Chakra Petch", sans-serif; }
.nx-login-panel { min-height: 100vh; padding: clamp(30px, 5vw, 76px); display: flex; flex-direction: column; justify-content: space-between; border-left: var(--line); background: rgba(10,10,10,.97); }
.nx-login-brand { display: flex; align-items: center; gap: 12px; }
.nx-login-form { width: 100%; max-width: 420px; margin: 70px auto; }
.nx-login-form h2 { margin: 0 0 10px; font: 600 48px/1 "Chakra Petch", sans-serif; }
.nx-login-form > p { margin: 0 0 38px; color: var(--text-low); line-height: 1.6; }
.nx-login-foot { color: var(--text-low); font-size: 10px; line-height: 1.6; }

.nx-ai-launcher {
    position: fixed;
    right: 26px;
    bottom: 24px;
    z-index: 90;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #090909;
    background: var(--accent-teal);
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(0,0,0,.42);
    animation: nx-pulse 3s ease-in-out infinite;
}
.nx-ai-launcher span { font-size: 23px; line-height: 1; }
.nx-ai-launcher b { position: absolute; bottom: 8px; font-size: 8px; }
.nx-ai-panel {
    position: fixed;
    right: 26px;
    bottom: 98px;
    z-index: 91;
    width: min(410px, calc(100vw - 32px));
    max-height: min(640px, 75vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-hi);
    background: rgba(15,16,14,.98);
    border: var(--line);
    border-radius: 5px;
    box-shadow: var(--shadow-float);
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .2s ease, transform .2s ease;
}
.nx-ai-panel.open { opacity: 1; pointer-events: auto; transform: none; }
.nx-ai-otonomi-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: var(--line);
    cursor: pointer;
}
.nx-ai-otonomi-row > span:first-child { display: flex; flex-direction: column; gap: 2px; font-size: 11px; font-weight: 700; color: var(--text-mid); }
.nx-ai-otonomi-row small { font-size: 9.5px; font-weight: 500; color: var(--text-low); }
.nx-switch { position: relative; width: 38px; height: 21px; flex-shrink: 0; }
.nx-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.nx-switch i { position: absolute; inset: 0; background: #2b2d28; border: var(--line); border-radius: 999px; transition: background .18s ease; }
.nx-switch i::before { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--text-mid); transition: transform .18s ease, background .18s ease; }
.nx-switch input:checked + i { background: rgba(206,255,56,.18); border-color: var(--accent-teal); }
.nx-switch input:checked + i::before { transform: translateX(17px); background: var(--accent-teal); }

.nx-ai-head { padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: var(--line); }
.nx-ai-head > div { display: flex; flex-direction: column; gap: 4px; }
.nx-ai-head small { color: var(--accent-teal); font-size: 8px; font-weight: 800; letter-spacing: 1.2px; }
.nx-ai-head strong { font: 600 18px/1.2 "Chakra Petch", sans-serif; }
.nx-ai-head span { color: var(--text-low); font-size: 10px; }
.nx-ai-body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.nx-ai-summary, .nx-ai-reply { padding: 13px; color: var(--text-mid); background: #0d0e0c; border-left: 2px solid var(--accent-teal); font-size: 12px; line-height: 1.65; }
.nx-ai-alert { display: block; margin-top: 8px; padding: 13px; background: rgba(255,255,255,.025); border: var(--line); }
.nx-ai-alert.kritik { border-color: rgba(255,102,89,.45); }
.nx-ai-alert .t { margin-bottom: 3px; color: var(--text-hi); font-size: 11px; font-weight: 800; }
.nx-ai-alert .d { color: var(--text-low); font-size: 10px; line-height: 1.5; }
.nx-ai-foot { padding: 13px; display: flex; gap: 8px; border-top: var(--line); }
.nx-ai-foot input { min-width: 0; flex: 1; padding: 11px; border: var(--line); outline: none; color: var(--text-hi); background: #0a0a0a; }
.nx-ai-foot input:focus { border-color: var(--accent-teal); }
.nx-ai-foot button { width: 44px; border: 0; color: #090909; background: var(--accent-teal); font-size: 20px; cursor: pointer; }

@media (max-width: 1180px) {
    .nx-topbar { grid-template-columns: auto auto; min-height: 72px; justify-content: space-between; }
    .nx-menu-toggle {
        display: flex;
        align-items: center;
        align-self: center;
        gap: 4px;
        padding: 9px;
        border: var(--line);
        color: var(--text-hi);
        background: transparent;
        cursor: pointer;
    }
    .nx-menu-toggle > span { width: 4px; height: 4px; background: var(--accent-teal); }
    .nx-menu-toggle b { margin-left: 5px; font-size: 9px; text-transform: uppercase; }
    .nx-nav {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        padding: 10px 20px 20px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        background: rgba(9,9,9,.98);
        border-bottom: var(--line);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: .2s ease;
    }
    .nx-topbar.menu-open .nx-nav { opacity: 1; visibility: visible; transform: none; }
    .nx-nav a { min-height: 52px; border-bottom: var(--line); }
    .nx-nav a::after { left: 0; right: auto; width: 3px; height: 100%; top: 0; bottom: auto; }
    .nx-user { display: none; }
    .nx-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 800px) {
    .nx-app { padding: 32px 18px 92px; }
    .nx-page-head { margin-bottom: 25px; }
    .nx-page-head h1 { font-size: 52px; }
    .nx-dashboard-hero { min-height: 500px; margin: -32px -18px 0; padding: 130px 20px 34px; background-position: 62% center; }
    .nx-dashboard-hero::after { background: linear-gradient(0deg, #090909 0%, rgba(7,7,7,.62) 55%, rgba(7,7,7,.15)); }
    .nx-dashboard-hero-content { width: 100%; }
    .nx-dashboard-hero h1 { font-size: 68px; }
    .nx-live-tag { right: 20px; top: 24px; bottom: auto; }
    .nx-grid-2, .nx-form-grid { grid-template-columns: minmax(0, 1fr); }
    .nx-login { grid-template-columns: 1fr; }
    .nx-login-visual { min-height: 46vh; }
    .nx-login-intro { bottom: 28px; }
    .nx-login-intro h1 { font-size: 64px; }
    .nx-login-panel { min-height: 54vh; padding: 30px 22px; border-left: 0; border-top: var(--line); }
    .nx-login-form { margin: 60px auto; }
}

@media (max-width: 560px) {
    .nx-topbar { padding: 0 15px; }
    .nx-brand-copy small { display: none; }
    .nx-nav { grid-template-columns: 1fr; max-height: calc(100vh - 72px); overflow-y: auto; }
    .nx-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .nx-kpi { min-height: 130px; padding: 17px 14px; }
    .nx-kpi .value { font-size: 38px; }
    .glass-panel { padding: 18px 14px; }
    .nx-ai-launcher { right: 16px; bottom: 16px; width: 54px; height: 54px; }
    .nx-ai-panel { right: 16px; bottom: 80px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Editorial dashboard / interaction layer ---------- */

.nx-page-wipe {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    background: var(--accent-teal);
    transform: scaleY(0);
    transform-origin: bottom;
}
body.is-leaving .nx-page-wipe {
    transform: scaleY(1);
    transition: transform .38s cubic-bezier(.76, 0, .24, 1);
}

.nx-scroll-progress {
    --scroll-progress: 0deg;
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 88;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--text-hi);
    background: conic-gradient(var(--accent-teal) var(--scroll-progress), rgba(255,255,255,.14) 0);
    box-shadow: 0 12px 32px rgba(0,0,0,.18);
    transition: color .3s ease, background .3s ease;
}
.nx-scroll-progress::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: var(--bg-0);
}
.nx-scroll-progress span {
    position: relative;
    font: 700 8px/1 "Chakra Petch", sans-serif;
    letter-spacing: .8px;
}

.nx-reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.nx-reveal.is-visible { opacity: 1; transform: none; }
.nx-kpi.nx-reveal:nth-child(2),
.nx-machine-card.nx-reveal:nth-child(2) { transition-delay: .06s; }
.nx-kpi.nx-reveal:nth-child(3),
.nx-machine-card.nx-reveal:nth-child(3) { transition-delay: .12s; }
.nx-kpi.nx-reveal:nth-child(4),
.nx-machine-card.nx-reveal:nth-child(4) { transition-delay: .18s; }
.nx-kpi.nx-reveal:nth-child(5) { transition-delay: .24s; }
.nx-kpi.nx-reveal:nth-child(6) { transition-delay: .30s; }

.is-dashboard {
    background: #f3f3ef;
}
.is-dashboard::before { display: none; }
.is-dashboard .nx-topbar {
    color: #11120f;
    background: rgba(243,243,239,.9);
    border-color: rgba(17,18,15,.16);
    transition: color .35s ease, background .35s ease, border-color .35s ease;
}
.is-dashboard .nx-brand-copy,
.is-dashboard .nx-nav a,
.is-dashboard .nx-user-status,
.is-dashboard .nx-user .logout { color: #11120f; }
.is-dashboard .nx-brand-copy small,
.is-dashboard .nx-nav a span { color: #72736c; }
.is-dashboard .nx-nav a:hover,
.is-dashboard .nx-nav a.active { color: #11120f; background: rgba(17,18,15,.04); }
.is-dashboard.dashboard-data-active .nx-topbar {
    color: var(--text-hi);
    background: rgba(9,9,9,.94);
    border-color: var(--glass-border);
}
.is-dashboard.dashboard-data-active .nx-brand-copy,
.is-dashboard.dashboard-data-active .nx-nav a,
.is-dashboard.dashboard-data-active .nx-user-status,
.is-dashboard.dashboard-data-active .nx-user .logout { color: var(--text-hi); }
.is-dashboard.dashboard-data-active .nx-brand-copy small,
.is-dashboard.dashboard-data-active .nx-nav a span { color: var(--text-low); }
.is-dashboard.dashboard-data-active .nx-nav a:hover,
.is-dashboard.dashboard-data-active .nx-nav a.active { color: var(--text-hi); background: rgba(255,255,255,.025); }
.is-dashboard .nx-app {
    width: 100%;
    max-width: none;
    padding: 0;
    background: #f3f3ef;
}

.is-dashboard .nx-dashboard-hero {
    --hero-shift: 0px;
    --hero-scale: 1;
    --hero-tilt-x: 0deg;
    --hero-tilt-y: 0deg;
    position: relative;
    min-height: calc(100svh - 82px);
    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #10110e;
    background: #f3f3ef;
    border: 0;
    perspective: 1200px;
}
.is-dashboard .nx-dashboard-hero::after { display: none; }
.nx-hero-media {
    position: relative;
    z-index: 1;
    width: 390px;
    height: min(72vh, 680px);
    margin: 0;
    overflow: hidden;
    background: #a6a194;
    transform: translate3d(0, var(--hero-shift), 0) rotateX(var(--hero-tilt-x)) rotateY(var(--hero-tilt-y));
    transition: transform .18s linear;
    will-change: transform;
}
.nx-hero-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 68% center;
    filter: saturate(.72) contrast(.92) brightness(1.06);
    transform: scale(var(--hero-scale));
    transition: transform .18s linear;
    will-change: transform;
}
.nx-hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(174,166,148,.2);
    mix-blend-mode: color;
}
.nx-hero-media figcaption {
    position: absolute;
    z-index: 2;
    left: 14px;
    bottom: 13px;
    color: rgba(255,255,255,.68);
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 1.3px;
}
.nx-hero-title {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: max-content;
    margin: 0;
    display: flex;
    gap: 38px;
    color: #fff;
    font: 700 138px/.82 "Chakra Petch", sans-serif;
    letter-spacing: -2px;
    white-space: nowrap;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.nx-hero-title span:first-child { transform: translateY(-38px); }
.nx-hero-title span:last-child { transform: translateY(38px); }
.nx-hero-meta {
    position: absolute;
    z-index: 4;
    top: 42px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #10110e;
}
.nx-hero-meta > span { color: #777870; font-size: 8px; font-weight: 800; letter-spacing: 1.3px; }
.nx-hero-meta strong { font-size: 11px; font-weight: 700; }
.nx-hero-meta--left { left: clamp(24px, 4vw, 64px); }
.nx-hero-meta--right { right: clamp(24px, 4vw, 64px); text-align: right; }
.nx-hero-meta--right strong { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.nx-hero-meta--right i { width: 6px; height: 6px; border-radius: 50%; background: #6ea100; box-shadow: 0 0 0 4px rgba(110,161,0,.12); }
.nx-hero-index {
    position: absolute;
    z-index: 4;
    left: clamp(24px, 4vw, 64px);
    bottom: 38px;
    color: #86877f;
    font: 600 9px/1 "Chakra Petch", sans-serif;
    letter-spacing: 1px;
}
.nx-hero-scroll {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 27px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #11120f;
    transform: translateX(-50%);
}
.nx-hero-scroll span { font-size: 8px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.nx-hero-scroll i { font: normal 20px/1 sans-serif; animation: nx-scroll-bounce 1.8s ease-in-out infinite; }
@keyframes nx-scroll-bounce { 50% { transform: translateY(5px); } }

.nx-dashboard-intro {
    min-height: 76vh;
    padding: 120px clamp(28px, 7vw, 110px);
    display: grid;
    grid-template-columns: minmax(180px, .6fr) minmax(0, 2fr);
    align-items: start;
    gap: 70px;
    color: #11120f;
    background: #f3f3ef;
    border-top: 1px solid rgba(17,18,15,.12);
}
.nx-intro-label { display: flex; align-items: center; gap: 16px; padding-top: 13px; }
.nx-intro-label span { font-size: 9px; font-weight: 800; letter-spacing: 1.2px; white-space: nowrap; }
.nx-intro-label i { width: 54px; height: 1px; background: rgba(17,18,15,.4); }
.nx-intro-copy p {
    max-width: 1000px;
    margin: 0;
    font: 500 52px/1.08 "Chakra Petch", sans-serif;
}
.nx-intro-copy p em { font-style: normal; color: #6a6c64; }
.nx-intro-foot {
    margin-top: 80px;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    border-top: 1px solid rgba(17,18,15,.2);
    color: #777870;
    font-size: 9px;
    letter-spacing: .9px;
    text-transform: uppercase;
}
.nx-intro-foot strong { color: #11120f; }

/* Dashboard readability: keep editorial layout, raise contrast and type size. */
.is-dashboard .nx-nav a,
.is-dashboard .nx-user-status,
.is-dashboard .nx-user .logout,
.is-dashboard .nx-brand-copy { color: #090a08; font-weight: 700; }
.is-dashboard .nx-brand-copy small,
.is-dashboard .nx-nav a span { color: #4d5048; font-weight: 700; }
.is-dashboard .nx-dashboard-hero .nx-hero-title {
    color: #0b0d0a;
    mix-blend-mode: normal;
    text-shadow: 0 2px 0 rgba(255,255,255,.72), 0 0 18px rgba(255,255,255,.45);
}
.is-dashboard .nx-hero-meta > span,
.is-dashboard .nx-hero-index,
.is-dashboard .nx-hero-scroll span { color: #454840; font-size: 10px; font-weight: 800; }
.is-dashboard .nx-hero-meta strong { color: #0b0d0a; font-size: 13px; }
.is-dashboard .nx-hero-scroll { color: #090a08; }
.is-dashboard .nx-dashboard-intro,
.is-dashboard .nx-dashboard-intro p,
.is-dashboard .nx-intro-foot { color: #11120f; }
.is-dashboard .nx-intro-copy p { font-weight: 600; }

.nx-dashboard-data {
    padding: 110px clamp(22px, 4vw, 64px) 130px;
    color: var(--text-hi);
    background: var(--bg-0);
}
.nx-data-head {
    margin-bottom: 70px;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    align-items: end;
    gap: 60px;
}
.nx-data-head > div > span,
.nx-panel-head > div > span { color: var(--accent-teal); font-size: 8px; font-weight: 800; letter-spacing: 1.3px; }
.nx-data-head h2 {
    margin: 14px 0 0;
    font: 600 82px/.9 "Chakra Petch", sans-serif;
}
.nx-data-head > p { max-width: 440px; margin: 0 0 5px; color: var(--text-low); font-size: 13px; line-height: 1.7; }
.is-dashboard .nx-kpi-grid { margin-bottom: 0; }
.is-dashboard .nx-kpi { min-height: 190px; padding: 25px 22px; }
.is-dashboard .nx-kpi .value { font-size: 58px; }
.is-dashboard .nx-kpi small { color: #54564e; font-size: 7px; font-weight: 800; letter-spacing: 1.1px; }

.nx-flow-marquee {
    margin: 80px calc(-1 * clamp(22px, 4vw, 64px));
    padding: 20px 0;
    overflow: hidden;
    border-top: var(--line);
    border-bottom: var(--line);
}
.nx-flow-marquee > div {
    width: max-content;
    display: flex;
    align-items: center;
    gap: 30px;
    animation: nx-marquee 28s linear infinite;
}
.nx-flow-marquee span { color: var(--text-hi); font: 600 28px/1 "Chakra Petch", sans-serif; }
.nx-flow-marquee i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-teal); }

.nx-dashboard-grid { grid-template-columns: minmax(0, 1.4fr) minmax(330px, .6fr); gap: 20px; }
.nx-dashboard-grid .glass-panel { border-color: rgba(244,244,235,.17); background: #11120f; }
.nx-panel-head {
    margin-bottom: 26px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}
.nx-panel-head h2 { margin: 5px 0 0; font: 600 24px/1 "Chakra Petch", sans-serif; }
.nx-panel-head > a { padding-bottom: 4px; color: var(--text-mid); border-bottom: 1px solid var(--text-low); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.nx-panel-head > a:hover { color: var(--accent-teal); border-color: var(--accent-teal); }
.nx-panel-head > strong { color: var(--accent-rose); font: 600 44px/1 "Chakra Petch", sans-serif; }
.nx-row-link { width: 30px; height: 30px; display: grid; place-items: center; border: var(--line); color: var(--text-mid); }
.nx-row-link:hover { color: #090909; background: var(--accent-teal); border-color: var(--accent-teal); }
.nx-signal-stack { min-width: 0; }
.nx-signal-panel { margin-bottom: 20px; }
.nx-signal-panel--alert { border-top: 2px solid var(--accent-rose) !important; }
.nx-signal-row {
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(244,244,235,.08);
}
.nx-signal-row > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nx-signal-row strong { color: var(--text-hi); font-size: 11px; }
.nx-signal-row small { overflow: hidden; color: var(--text-low); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.nx-signal-row > i { color: var(--text-low); font-style: normal; transition: transform .2s ease, color .2s ease; }
.nx-signal-row:hover > i { color: var(--accent-teal); transform: translate(3px,-3px); }

.glass-panel,
.nx-machine-card {
    position: relative;
    overflow: hidden;
    transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.glass-panel::after,
.nx-machine-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-teal);
    transition: width .4s cubic-bezier(.2,.7,.2,1);
}
.glass-panel:hover,
.nx-machine-card:hover { border-color: rgba(206,255,56,.32); transform: translateY(-2px); }
.glass-panel:hover::after,
.nx-machine-card:hover::after { width: 100%; }

@media (max-width: 1180px) {
    .is-dashboard .nx-nav { background: rgba(243,243,239,.98); }
    .is-dashboard.dashboard-data-active .nx-nav { background: rgba(9,9,9,.98); }
    .nx-hero-title { gap: 24px; font-size: 100px; }
    .nx-intro-copy p { font-size: 44px; }
    .nx-data-head h2 { font-size: 68px; }
    .is-dashboard .nx-kpi-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 800px) {
    .nx-scroll-progress { left: 16px; bottom: 16px; width: 42px; height: 42px; }
    .is-dashboard .nx-dashboard-hero { min-height: calc(100svh - 72px); }
    .nx-hero-media { width: min(68vw, 330px); height: 62vh; }
    .nx-hero-title { gap: 0; flex-direction: column; align-items: center; font-size: 72px; line-height: .76; }
    .nx-hero-title span:first-child { transform: translate(-25px,-16px); }
    .nx-hero-title span:last-child { transform: translate(25px,16px); }
    .nx-hero-meta { top: 24px; }
    .nx-hero-meta--right { top: auto; bottom: 28px; }
    .nx-hero-scroll, .nx-hero-index { display: none; }
    .nx-dashboard-intro { min-height: auto; padding: 80px 20px; grid-template-columns: 1fr; gap: 45px; }
    .nx-intro-copy p { font-size: 35px; }
    .nx-intro-foot { margin-top: 55px; flex-direction: column; gap: 7px; }
    .nx-dashboard-data { padding: 80px 18px 100px; }
    .nx-data-head { margin-bottom: 48px; grid-template-columns: 1fr; gap: 26px; }
    .nx-data-head h2 { font-size: 54px; }
    .nx-dashboard-grid { grid-template-columns: minmax(0,1fr); }
    .nx-flow-marquee { margin: 60px -18px; }
}

@media (max-width: 560px) {
    .nx-hero-media { width: 72vw; height: 58vh; }
    .nx-hero-title { font-size: 58px; }
    .nx-hero-meta--left { left: 18px; }
    .nx-hero-meta--right { right: 18px; }
    .nx-intro-copy p { font-size: 30px; }
    .nx-data-head h2 { font-size: 46px; }
    .is-dashboard .nx-kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .is-dashboard .nx-kpi { min-height: 145px; }
    .is-dashboard .nx-kpi .value { font-size: 42px; }
    .nx-flow-marquee span { font-size: 22px; }
}

/* ---------- Machine / CNC tracking ---------- */

.nx-machine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 4px;
}

.nx-risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.nx-risk-card {
    padding: 14px 16px;
    border: var(--line);
    border-left: 3px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--surface);
}
.nx-risk-card.dusuk { border-left-color: var(--accent-teal); }
.nx-risk-card.orta { border-left-color: var(--accent-amber); }
.nx-risk-card.yuksek { border-left-color: var(--accent-rose); }
.nx-risk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.nx-risk-kod { font: 600 12.5px "Chakra Petch", sans-serif; color: var(--text-hi); }
.nx-risk-puan { font: 800 15px "IBM Plex Mono", monospace; color: var(--text-mid); }
.nx-risk-card.yuksek .nx-risk-puan { color: var(--accent-rose); }
.nx-risk-card.orta .nx-risk-puan { color: var(--accent-amber); }
.nx-risk-card.dusuk .nx-risk-puan { color: var(--accent-teal); }
.nx-risk-nedenler { margin: 0; padding-left: 16px; font-size: 11.5px; color: var(--text-mid); line-height: 1.6; }
.nx-risk-nedenler.nx-risk-temiz { padding-left: 0; color: var(--text-low); }

/* ---- Uretilen G-code paneli ---- */
.nx-gcode-panel {
    margin-top: 20px;
    border: var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
}
.nx-gcode-panel[hidden] { display: none; }
.nx-gcode-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
    padding: 14px 18px; border-bottom: var(--line);
}
.nx-gcode-head span {
    font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase;
    color: var(--accent-teal); font-weight: 800;
}
.nx-gcode-head h2 { margin: 4px 0 0; font: 600 17px "Chakra Petch", sans-serif; color: var(--text-hi); }
.nx-gcode-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nx-gcode-stat {
    font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--text-low);
    letter-spacing: .2px;
}
.nx-gcode-body {
    margin: 0; padding: 16px 18px; max-height: 460px; overflow: auto;
    font-family: "IBM Plex Mono", monospace; font-size: 11.5px; line-height: 1.65;
    color: var(--text-mid); background: var(--bg-1); white-space: pre;
    tab-size: 4;
}
.nx-gcode-note {
    margin: 0; padding: 11px 18px; border-top: var(--line);
    font-size: 11px; color: var(--text-low); line-height: 1.55;
}

/* ---- En az fire arama sonucu ---- */
.nx-sim-fire { width: 100%; margin-top: 10px; }
.nx-fire-result:empty { display: none; }
.nx-fire-card {
    margin-top: 12px; padding: 14px 16px;
    border: var(--line); border-left: 3px solid var(--accent-teal);
    border-radius: var(--radius-md); background: var(--surface-raised);
}
.nx-fire-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.nx-fire-top span { font-size: 9px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--text-low); font-weight: 800; }
.nx-fire-top b { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--text-mid); }
.nx-fire-delta { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.nx-fire-delta span {
    font: 700 11.5px "IBM Plex Mono", monospace; padding: 4px 9px;
    border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
}
.nx-fire-delta .is-good { color: var(--accent-teal); border-color: rgba(206,255,56,.4); }
.nx-fire-delta .is-cost { color: var(--accent-amber); border-color: rgba(255,200,87,.4); }
.nx-fire-recipe { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.nx-fire-recipe small { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-low); margin-bottom: 2px; }
.nx-fire-recipe strong { font: 600 12.5px "IBM Plex Mono", monospace; color: var(--text-hi); }
.nx-fire-rounds { list-style: none; margin: 0 0 10px; padding: 0; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--text-low); line-height: 1.75; }
.nx-fire-rounds b { color: var(--text-mid); font-weight: 600; }
.nx-fire-note { margin: 0; font-size: 10.5px; color: var(--text-low); line-height: 1.55; }
.nx-fire-error { margin: 10px 0 0; font-size: 12px; color: var(--accent-rose); }

/* ---- Tezgah baglanti paneli ---- */
.nx-conn-form { margin-top: 4px; }
.nx-conn-dot { width: 13px; height: 13px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; background: var(--text-low); }
.nx-conn-dot.canli { background: var(--accent-teal); box-shadow: 0 0 0 4px rgba(206,255,56,.16); }
.nx-conn-dot.port_acik { background: var(--accent-amber); box-shadow: 0 0 0 4px rgba(255,200,87,.16); }
.nx-conn-dot.erisilemiyor { background: var(--accent-rose); box-shadow: 0 0 0 4px rgba(255,102,89,.16); }
.nx-conn-dot.tanimsiz, .nx-conn-dot.bilinmiyor { background: var(--text-low); }

.nx-conn-result { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--glass-border); }
.nx-conn-state {
    align-self: flex-start; font: 800 9px "IBM Plex Mono", monospace;
    letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px;
    border-radius: var(--radius-sm); border: 1px solid var(--glass-border); color: var(--text-mid);
}
.nx-conn-state.canli { color: var(--accent-teal); border-color: rgba(206,255,56,.45); }
.nx-conn-state.port_acik { color: var(--accent-amber); border-color: rgba(255,200,87,.45); }
.nx-conn-state.erisilemiyor { color: var(--accent-rose); border-color: rgba(255,102,89,.45); }
.nx-conn-msg { font-size: 11.5px; color: var(--text-mid); line-height: 1.5; }
.nx-conn-data { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--accent-teal); }
.nx-conn-time { font-size: 10px; color: var(--text-low); }

/* ---- Is kaydi / panel ---- */
.nx-worklog-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; }
.nx-worklog-item { padding: 11px 13px; border: var(--line); border-radius: var(--radius-md); background: var(--surface); }
.nx-worklog-item.is-archived { opacity: .5; }
.nx-worklog-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.nx-worklog-time { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--text-low); }
.nx-worklog-item p { margin: 0 0 7px; font-size: 12.5px; color: var(--text-mid); line-height: 1.55; }
.nx-worklog-meta { display: flex; gap: 8px; flex-wrap: wrap; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--text-low); }

.nx-onem {
    display: inline-block; font: 800 9px "IBM Plex Mono", monospace;
    letter-spacing: .9px; text-transform: uppercase; padding: 3px 8px;
    border-radius: var(--radius-sm); border: 1px solid var(--glass-border); color: var(--text-low);
    white-space: nowrap;
}
.nx-onem.o5 { color: var(--accent-rose); border-color: rgba(255,102,89,.5); }
.nx-onem.o4 { color: var(--accent-amber); border-color: rgba(255,200,87,.5); }
.nx-onem.o3 { color: var(--text-mid); }
.nx-onem.o2 { color: var(--text-low); }
.nx-onem.o1 { color: var(--text-low); opacity: .7; }
.nx-row-archived { opacity: .45; }

/* ---- Isci merkezi: buyuk arac kartlari ---- */
.nx-worker-tools {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}
.nx-tool-card {
    display: flex; flex-direction: column; gap: 4px;
    padding: 18px 16px; text-decoration: none;
    border: var(--line); border-radius: var(--radius-lg);
    background: var(--surface);
    transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.nx-tool-card:hover {
    border-color: var(--accent-teal);
    background: var(--surface-raised);
    transform: translateY(-2px);
}
.nx-tool-icon {
    font-size: 22px; line-height: 1; color: var(--accent-teal); margin-bottom: 8px;
}
.nx-tool-card strong { font: 600 14px "Chakra Petch", sans-serif; color: var(--text-hi); }
.nx-tool-card small { font-size: 11px; color: var(--text-low); line-height: 1.45; }

/* ---- Kesme hesabi ana sonuc ---- */
.nx-cut-headline {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px;
}
.nx-cut-headline > div {
    padding: 14px 16px; border: var(--line); border-radius: var(--radius-md);
    background: var(--surface); min-width: 0;
}
.nx-cut-headline small {
    display: block; font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase;
    color: var(--text-low); font-weight: 800; margin-bottom: 6px;
}
.nx-cut-headline strong {
    display: block;
    font: 700 clamp(22px, 4vw, 34px)/1 "Chakra Petch", sans-serif;
    color: var(--text-hi); font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.nx-cut-headline strong.is-accent { color: var(--accent-teal); }
.nx-cut-headline span { display: block; margin-top: 5px; font-size: 10.5px; color: var(--text-low); }

/* ---- Operatör istasyon ekranı: buyuk dokunmatik kontroller ---- */
.nx-station { max-width: 760px; margin: 0 auto; }
.nx-station-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.nx-station-head h1 { margin: 4px 0 0; font: 700 30px "Chakra Petch", sans-serif; color: var(--text-hi); }
.nx-station-picker { min-width: 220px; }

.nx-station-status {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px; border-radius: var(--radius-lg);
    border: var(--line); background: var(--surface);
    margin-bottom: 10px;
}
.nx-station-status .nx-machine-dot { width: 18px; height: 18px; margin-top: 0; }
.nx-station-status-label { font: 700 22px "Chakra Petch", sans-serif; color: var(--text-hi); }
.nx-station-since { margin-left: auto; font-size: 12px; color: var(--text-low); }
.nx-station-reason-note { font-size: 12px; color: var(--text-mid); margin: 0 0 16px 2px; }

.nx-station-order { margin-bottom: 20px; }
.nx-station-order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; }
.nx-station-order-grid small { display: block; font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: var(--text-low); margin-bottom: 4px; }
.nx-station-order-grid strong { font: 600 15px "Chakra Petch", sans-serif; color: var(--text-hi); }

.nx-station-form { margin-top: 4px; }
.nx-station-reason { width: 100%; margin-bottom: 14px; }
.nx-station-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.nx-station-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    padding: 26px 12px; border-radius: var(--radius-lg); border: 1px solid var(--glass-border);
    background: var(--surface-raised); color: var(--text-hi);
    font-size: 30px; cursor: pointer; transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.nx-station-btn span { font: 700 13px "Chakra Petch", sans-serif; letter-spacing: .3px; }
.nx-station-btn:hover { transform: translateY(-2px); }
.nx-station-btn:active { transform: translateY(0); }
.nx-station-btn.calisiyor:hover, .nx-station-btn.calisiyor:focus-visible { border-color: var(--accent-teal); box-shadow: 0 0 0 3px rgba(206,255,56,.18); }
.nx-station-btn.durdu:hover, .nx-station-btn.durdu:focus-visible { border-color: var(--accent-rose); box-shadow: 0 0 0 3px rgba(255,102,89,.18); }
.nx-station-btn.bakimda:hover, .nx-station-btn.bakimda:focus-visible { border-color: var(--accent-amber); box-shadow: 0 0 0 3px rgba(255,200,87,.18); }
.nx-station-btn.ariza:hover, .nx-station-btn.ariza:focus-visible { border-color: var(--accent-rose); box-shadow: 0 0 0 3px rgba(255,102,89,.18); }

.nx-station-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nx-station-history li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-mid); padding-bottom: 10px; border-bottom: 1px solid var(--glass-border); }
.nx-station-history li:last-child { border-bottom: none; padding-bottom: 0; }
.nx-station-history-meta { margin-left: auto; color: var(--text-low); font-size: 11px; }

@media (max-width: 560px) {
    .nx-station-buttons { grid-template-columns: 1fr 1fr; }
    .nx-station-btn { padding: 22px 8px; font-size: 26px; }
}

.nx-machine-card {
    padding: 20px;
    border-left: 3px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.nx-machine-card.calisiyor { border-left-color: var(--accent-teal); }
.nx-machine-card.durdu, .nx-machine-card.ariza { border-left-color: var(--accent-rose); }
.nx-machine-card.bakimda { border-left-color: var(--accent-amber); }

.nx-machine-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.nx-machine-kod { display: block; font: 700 9px/1 "Chakra Petch", monospace; letter-spacing: 1.2px; color: var(--text-low); margin-bottom: 4px; }
.nx-machine-top h3 { margin: 0; font: 600 17px/1.2 "Chakra Petch", sans-serif; color: var(--text-hi); }
.nx-machine-tip { display: inline-block; margin-top: 4px; font-size: 10px; font-weight: 700; color: var(--text-low); text-transform: uppercase; letter-spacing: .5px; }

.nx-machine-dot { width: 13px; height: 13px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.nx-machine-dot.calisiyor { background: var(--accent-teal); box-shadow: 0 0 0 4px rgba(206,255,56,.16); animation: nx-pulse-dot 1.6s ease-in-out infinite; }
.nx-machine-dot.durdu, .nx-machine-dot.ariza { background: var(--accent-rose); box-shadow: 0 0 0 4px rgba(255,102,89,.16); }
.nx-machine-dot.bakimda { background: var(--accent-amber); box-shadow: 0 0 0 4px rgba(255,200,87,.16); animation: nx-pulse-dot 2.2s ease-in-out infinite; }
@keyframes nx-pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.nx-machine-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.nx-machine-since { font-size: 10.5px; color: var(--text-low); }
.nx-machine-meta { font-size: 11.5px; color: var(--text-mid); }
.nx-machine-reason { color: var(--accent-rose); }

.nx-machine-stats { display: flex; gap: 18px; padding: 10px 0; border-top: var(--line); border-bottom: var(--line); }
.nx-machine-stats div { display: flex; flex-direction: column; }
.nx-machine-stats span { font: 700 18px/1.1 "Chakra Petch", sans-serif; color: var(--text-hi); }
.nx-machine-stats small { font-size: 9.5px; color: var(--text-low); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

.nx-machine-form { display: flex; flex-direction: column; gap: 8px; }
.nx-machine-form .nx-mini-input { width: 100%; }

/* ---------- AI mic / voice input ---------- */
#nx-ai-mic {
    width: 40px;
    flex-shrink: 0;
    border: var(--line);
    background: transparent;
    color: var(--text-mid);
    font-size: 15px;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
#nx-ai-mic:hover { color: var(--accent-teal); border-color: var(--accent-teal); }
#nx-ai-mic.listening { color: #090909; background: var(--accent-rose); border-color: var(--accent-rose); animation: nx-pulse-dot 0.9s ease-in-out infinite; }

/* ---------- Capacity planning calendar ---------- */
.nx-capacity-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.nx-capacity-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border: var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.02);
}
.nx-capacity-day .d { font-size: 10px; font-weight: 700; color: var(--text-low); }
.nx-capacity-day .bar { width: 14px; height: 60px; background: #2b2d28; border-radius: 3px; display: flex; align-items: flex-end; overflow: hidden; }
.nx-capacity-day .bar > div { width: 100%; background: var(--accent-teal); }
.nx-capacity-day.warn .bar > div { background: var(--accent-amber); }
.nx-capacity-day.over .bar > div { background: var(--accent-rose); }
.nx-capacity-day .pct { font-size: 10px; font-weight: 700; color: var(--text-hi); }
.nx-capacity-day .teslim { font-size: 8.5px; color: var(--accent-teal); text-align: center; }

/* ---------- Dashboard widget settings ---------- */
.nx-widget-toggle { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(244,244,235,.08); }
.nx-widget-toggle:last-child { border-bottom: none; }

/* ---------- AI chat thread ---------- */
.nx-ai-thread { display: flex; flex-direction: column; gap: 10px; }
.nx-ai-msg { max-width: 88%; padding: 10px 13px; font-size: 12.5px; line-height: 1.55; border-radius: 3px; white-space: pre-wrap; }
.nx-ai-msg.user { align-self: flex-end; background: rgba(206,255,56,.1); border: 1px solid rgba(206,255,56,.25); color: var(--text-hi); }
.nx-ai-msg.assistant { align-self: flex-start; background: #0d0e0c; border: var(--line); color: var(--text-mid); }
.nx-ai-msg .eylem-row { display: flex; gap: 8px; margin-top: 10px; }
.nx-ai-thread-tools { padding: 0 20px 10px; display: flex; justify-content: flex-end; }

.nx-ai-msg p, .nx-ai-summary p { margin: 0 0 8px; }
.nx-ai-msg p:last-child, .nx-ai-summary p:last-child { margin-bottom: 0; }
.nx-ai-msg ul, .nx-ai-summary ul { margin: 0 0 8px; padding-left: 16px; }
.nx-ai-msg ul:last-child, .nx-ai-summary ul:last-child { margin-bottom: 0; }
.nx-ai-msg li, .nx-ai-summary li { margin-bottom: 4px; }
.nx-ai-msg strong, .nx-ai-summary strong { color: var(--text-hi); font-weight: 700; }

/* ---------- Preferences / appearance ---------- */

html[data-accent="coral"] {
    --accent-teal: #ff725e;
    --accent-teal-matte: #d95746;
    --glass-border-hover: rgba(255,114,94,.62);
}
html[data-accent="ice"] {
    --accent-teal: #8ed4ff;
    --accent-teal-matte: #5faad4;
    --glass-border-hover: rgba(142,212,255,.62);
}

.nx-mobile-actions { display: contents; }
.nx-settings-launcher {
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: var(--line);
    border-radius: 50%;
    color: var(--text-mid);
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: color .2s ease, border-color .2s ease, transform .35s ease;
}
.nx-settings-launcher:hover,
.nx-settings-launcher[aria-expanded="true"] {
    color: var(--accent-teal);
    border-color: var(--accent-teal);
    transform: rotate(32deg);
}
.nx-settings-launcher--mobile { display: none; }

.nx-bell-wrap { position: relative; flex: 0 0 auto; }
.nx-bell {
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    border: var(--line);
    border-radius: 50%;
    color: var(--text-mid);
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    position: relative;
    transition: color .2s ease, border-color .2s ease;
}
.nx-bell:hover, .nx-bell[aria-expanded="true"] { color: var(--accent-teal); border-color: var(--accent-teal); }
.nx-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 8px;
    background: var(--accent-rose);
    color: #14150f;
    font-size: 9.5px;
    font-weight: 800;
    font-family: var(--font-mono, monospace);
    display: grid;
    place-items: center;
    line-height: 1;
}
.nx-bell-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 320px;
    max-height: 380px;
    display: flex;
    flex-direction: column;
    background: var(--glass-fill-strong);
    backdrop-filter: var(--glass-blur);
    border: var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-float);
    z-index: 120;
    overflow: hidden;
}
.nx-bell-panel[hidden] { display: none; }
.nx-bell-panel-head {
    padding: 12px 16px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--text-mid);
    border-bottom: var(--line);
    flex: 0 0 auto;
}
.nx-bell-panel-body { overflow-y: auto; padding: 6px; }
.nx-bell-empty { padding: 18px 12px; text-align: center; color: var(--text-low); font-size: 12.5px; }
.nx-bell-item {
    display: block;
    padding: 10px 10px;
    border-radius: var(--radius-md);
    text-decoration: none;
    border-left: 2px solid var(--text-low);
    margin-bottom: 4px;
}
.nx-bell-item:hover { background: var(--surface-raised); }
.nx-bell-item.kritik { border-left-color: var(--accent-rose); }
.nx-bell-item.uyari { border-left-color: var(--accent-amber); }
.nx-bell-item .t { color: var(--text-hi); font-size: 12.5px; font-weight: 700; margin-bottom: 3px; }
.nx-bell-item .d { color: var(--text-mid); font-size: 11.5px; line-height: 1.4; }

html[data-theme="light"] .nx-bell { color: var(--text-mid); }
html[data-theme="light"] .nx-bell-badge { color: #fff; }

.nx-settings-backdrop {
    position: fixed;
    inset: 0;
    z-index: 108;
    border: 0;
    background: rgba(0,0,0,.55);
    opacity: 0;
    visibility: hidden;
    cursor: default;
    backdrop-filter: blur(5px);
    transition: opacity .28s ease, visibility .28s ease;
}
.nx-settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 109;
    width: min(440px, 100vw);
    display: flex;
    flex-direction: column;
    color: var(--text-hi);
    background: var(--surface);
    border-left: var(--line);
    box-shadow: -30px 0 90px rgba(0,0,0,.35);
    visibility: hidden;
    transform: translateX(100%);
    transition: transform .42s cubic-bezier(.76,0,.24,1), visibility .42s ease;
}
body.settings-open { overflow: hidden; }
body.settings-open .nx-settings-backdrop { opacity: 1; visibility: visible; }
body.settings-open .nx-settings-panel { visibility: visible; transform: none; }
.nx-settings-head {
    min-height: 118px;
    padding: 28px 28px 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    border-bottom: var(--line);
}
.nx-settings-head > div { display: flex; flex-direction: column; gap: 8px; }
.nx-settings-head span { color: var(--accent-teal); font-size: 8px; font-weight: 800; letter-spacing: 1.3px; }
.nx-settings-head h2 { margin: 0; font: 600 36px/1 "Chakra Petch", sans-serif; }
.nx-settings-head > button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: var(--line);
    border-radius: 50%;
    color: var(--text-hi);
    background: transparent;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}
.nx-settings-head > button:hover { color: #090909; background: var(--accent-teal); border-color: var(--accent-teal); }
.nx-settings-body { flex: 1; overflow-y: auto; }
.nx-settings-group { padding: 24px 28px 28px; border-bottom: var(--line); }
.nx-settings-label {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-hi);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
}
.nx-settings-label small { color: var(--text-low); font-size: 8px; }
.nx-segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    border: var(--line);
}
.nx-segmented--two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.nx-segmented label { position: relative; min-width: 0; }
.nx-segmented label + label { border-left: var(--line); }
.nx-segmented input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.nx-segmented span {
    min-height: 48px;
    padding: 8px;
    display: grid;
    place-items: center;
    color: var(--text-low);
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    transition: color .18s ease, background .18s ease;
}
.nx-segmented input:checked + span { color: #090909; background: var(--accent-teal); }
.nx-segmented input:focus-visible + span { outline: 2px solid var(--accent-teal); outline-offset: -3px; }
.nx-settings-toggle { display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; }
.nx-settings-toggle > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.nx-settings-toggle strong { color: var(--text-hi); font-size: 11px; }
.nx-settings-toggle small { color: var(--text-low); font-size: 9px; }
.nx-color-options { display: flex; gap: 12px; }
.nx-color-options label { position: relative; cursor: pointer; }
.nx-color-options input { position: absolute; opacity: 0; pointer-events: none; }
.nx-color-options span {
    width: 46px;
    height: 46px;
    display: block;
    border: 5px solid var(--surface);
    outline: var(--line);
    background: var(--swatch);
    transition: transform .18s ease, outline-color .18s ease;
}
.nx-color-options input:checked + span {
    outline: 2px solid var(--text-hi);
    outline-offset: 2px;
    transform: scale(.88);
}
.nx-color-options input:focus-visible + span { outline-color: var(--accent-teal); }
.nx-settings-foot {
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: var(--line);
}
.nx-settings-foot span { color: var(--text-low); font-size: 7px; font-weight: 800; letter-spacing: 1px; white-space: nowrap; }

html[data-density="compact"] .nx-app { padding-top: 28px; }
html[data-density="compact"] .glass-panel { padding: 16px 18px; }
html[data-density="compact"] table.nx-table th { padding: 9px 11px; }
html[data-density="compact"] table.nx-table td { padding: 10px 11px; }
html[data-density="compact"] .nx-kpi { min-height: 120px; padding: 16px; }
html[data-density="compact"] .nx-machine-grid { gap: 10px; }
html[data-density="compact"] .nx-machine-card { padding: 15px; gap: 9px; }
html[data-density="compact"] .nx-page-head { margin-bottom: 24px; padding-bottom: 18px; }
html[data-density="compact"] .is-dashboard .nx-dashboard-data { padding-top: 78px; }

html[data-motion="reduce"] *,
html[data-motion="reduce"] *::before,
html[data-motion="reduce"] *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: .01ms !important;
}
html[data-motion="reduce"] .nx-reveal { opacity: 1; transform: none; }

/* ---------- Complete light appearance ---------- */

html[data-theme="light"] {
    color-scheme: light;
    --bg-0: #f3f3ef;
    --bg-1: #ebebe5;
    --bg-2: #dedfd7;
    --surface: #f9f9f5;
    --surface-raised: #ffffff;
    --glass-fill: rgba(255,255,251,.86);
    --glass-fill-strong: rgba(250,250,246,.96);
    --glass-border: rgba(17,18,15,.16);
    --glass-border-hover: rgba(96,126,0,.56);
    --text-hi: #11120f;
    --text-mid: #4f514a;
    --text-low: #777970;
    --shadow-glass: 0 24px 70px rgba(24,25,20,.08);
    --shadow-float: 0 34px 90px rgba(24,25,20,.18);
}
html[data-theme="light"] body {
    color: var(--text-hi);
    background: var(--bg-0);
}
html[data-theme="light"] body::before {
    opacity: .2;
    background-image: radial-gradient(rgba(17,18,15,.14) .55px, transparent .55px);
}
html[data-theme="light"] ::selection { color: #090909; background: var(--accent-teal); }
html[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg-0); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #b8bab1; border-color: var(--bg-0); }

html[data-theme="light"] .nx-topbar {
    color: var(--text-hi);
    background: rgba(243,243,239,.92);
    border-color: var(--glass-border);
}
html[data-theme="light"] .nx-brand-copy,
html[data-theme="light"] .nx-nav a,
html[data-theme="light"] .nx-user-status,
html[data-theme="light"] .nx-user .logout { color: var(--text-hi); }
html[data-theme="light"] .nx-brand-copy small,
html[data-theme="light"] .nx-nav a span { color: var(--text-low); }
html[data-theme="light"] .nx-nav a:hover,
html[data-theme="light"] .nx-nav a.active {
    color: var(--text-hi);
    background: rgba(17,18,15,.04);
}
html[data-theme="light"] .nx-settings-launcher { color: var(--text-mid); }
html[data-theme="light"] .nx-app { background: var(--bg-0); }
html[data-theme="light"] .glass,
html[data-theme="light"] .glass-panel,
html[data-theme="light"] .nx-machine-card {
    color: var(--text-hi);
    background: var(--glass-fill-strong);
    border-color: var(--glass-border);
    box-shadow: var(--shadow-glass);
}
html[data-theme="light"] .glass-panel:hover,
html[data-theme="light"] .nx-machine-card:hover { border-color: var(--glass-border-hover); }
html[data-theme="light"] .nx-page-head { border-color: var(--glass-border); }
html[data-theme="light"] .nx-page-head h1,
html[data-theme="light"] .nx-section h2,
html[data-theme="light"] .glass-panel > h2,
html[data-theme="light"] .nx-machine-top h3,
html[data-theme="light"] .nx-machine-stats span { color: var(--text-hi); }

html[data-theme="light"] .nx-kpi {
    background: rgba(255,255,251,.34);
    border-color: var(--glass-border);
}
html[data-theme="light"] .nx-kpi:hover { background: var(--surface-raised); }
html[data-theme="light"] .nx-kpi .value { color: var(--text-hi); }
html[data-theme="light"] .nx-kpi .value.accent-teal { color: #739400; }
html[data-theme="light"] .nx-kpi .value.accent-violet { color: #286c99; }
html[data-theme="light"] .nx-kpi .value.accent-amber { color: #a66b00; }
html[data-theme="light"] .nx-kpi .value.accent-rose { color: #d4473b; }

html[data-theme="light"] table.nx-table th {
    color: var(--text-low);
    border-color: var(--glass-border);
}
html[data-theme="light"] table.nx-table td {
    color: var(--text-mid);
    border-color: rgba(17,18,15,.1);
}
html[data-theme="light"] table.nx-table tbody tr:hover { background: rgba(116,148,0,.06); }
html[data-theme="light"] table.nx-table tbody tr:hover td { color: var(--text-hi); }
html[data-theme="light"] table.nx-table td:first-child a { color: var(--text-hi); }
html[data-theme="light"] .nx-badge {
    color: var(--text-mid);
    background: rgba(17,18,15,.035);
    border-color: rgba(17,18,15,.16);
}
html[data-theme="light"] .nx-badge.uretimde { color: #286c99; border-color: rgba(40,108,153,.3); }
html[data-theme="light"] .nx-badge.kalite_kontrol { color: #9a6500; border-color: rgba(154,101,0,.3); }
html[data-theme="light"] .nx-badge.sevkiyata_hazir,
html[data-theme="light"] .nx-badge.sevk_edildi,
html[data-theme="light"] .nx-badge.uygun { color: #5f7c00; border-color: rgba(95,124,0,.3); }
html[data-theme="light"] .nx-badge.gecikmis,
html[data-theme="light"] .nx-badge.red { color: #c33c32; border-color: rgba(195,60,50,.3); }

html[data-theme="light"] .nx-btn--ghost {
    color: var(--text-hi);
    border-color: var(--glass-border);
}
html[data-theme="light"] .nx-btn--ghost:hover { color: #587500; border-color: var(--accent-teal); }
html[data-theme="light"] .nx-btn--danger { color: #c33c32; background: rgba(195,60,50,.05); }
html[data-theme="light"] .nx-field input,
html[data-theme="light"] .nx-field select,
html[data-theme="light"] .nx-field textarea,
html[data-theme="light"] .glass-panel input,
html[data-theme="light"] .glass-panel select,
html[data-theme="light"] .glass-panel textarea,
html[data-theme="light"] .nx-mini-input {
    color: var(--text-hi);
    background: #ffffff;
    border-color: var(--glass-border);
}
html[data-theme="light"] .glass-panel input:not([type="checkbox"]):not([type="radio"])[style],
html[data-theme="light"] .glass-panel select[style],
html[data-theme="light"] .glass-panel textarea[style] {
    color: var(--text-hi) !important;
    background: #ffffff !important;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #8c8e86; }
html[data-theme="light"] .nx-progress { background: #d9dad2; }
html[data-theme="light"] .nx-empty { color: var(--text-low); border-color: rgba(17,18,15,.18); }
html[data-theme="light"] .nx-flash { color: var(--text-hi); background: var(--surface-raised); }

html[data-theme="light"] .nx-ai-panel {
    color: var(--text-hi);
    background: rgba(249,249,245,.98);
    border-color: var(--glass-border);
    box-shadow: var(--shadow-float);
}
html[data-theme="light"] .nx-ai-head,
html[data-theme="light"] .nx-ai-otonomi-row,
html[data-theme="light"] .nx-ai-foot { border-color: var(--glass-border); }
html[data-theme="light"] .nx-ai-summary,
html[data-theme="light"] .nx-ai-reply,
html[data-theme="light"] .nx-ai-msg.assistant {
    color: var(--text-mid);
    background: #ffffff;
}
html[data-theme="light"] .nx-ai-alert {
    background: rgba(17,18,15,.025);
    border-color: var(--glass-border);
}
html[data-theme="light"] .nx-ai-foot input {
    color: var(--text-hi);
    background: #ffffff;
    border-color: var(--glass-border);
}
html[data-theme="light"] #nx-ai-mic { color: var(--text-mid); }
html[data-theme="light"] .nx-ai-msg.user { color: var(--text-hi); background: rgba(116,148,0,.09); }
html[data-theme="light"] .nx-scroll-progress { color: var(--text-hi); background: conic-gradient(var(--accent-teal) var(--scroll-progress), rgba(17,18,15,.14) 0); }
html[data-theme="light"] .nx-scroll-progress::before { background: var(--bg-0); }

html[data-theme="light"] .nx-login { background: var(--bg-0); }
html[data-theme="light"] .nx-login-panel {
    color: var(--text-hi);
    background: rgba(249,249,245,.98);
    border-color: var(--glass-border);
}
html[data-theme="light"] .nx-login-form h2 { color: var(--text-hi); }
html[data-theme="light"] .nx-login-form input { color: var(--text-hi); background: #ffffff; }

html[data-theme="light"] .is-dashboard .nx-app,
html[data-theme="light"] .is-dashboard .nx-dashboard-hero,
html[data-theme="light"] .nx-dashboard-intro { background: var(--bg-0); }
html[data-theme="light"] .is-dashboard.dashboard-data-active .nx-topbar {
    color: var(--text-hi);
    background: rgba(243,243,239,.94);
    border-color: var(--glass-border);
}
html[data-theme="light"] .is-dashboard.dashboard-data-active .nx-brand-copy,
html[data-theme="light"] .is-dashboard.dashboard-data-active .nx-nav a,
html[data-theme="light"] .is-dashboard.dashboard-data-active .nx-user-status,
html[data-theme="light"] .is-dashboard.dashboard-data-active .nx-user .logout { color: var(--text-hi); }
html[data-theme="light"] .is-dashboard.dashboard-data-active .nx-brand-copy small,
html[data-theme="light"] .is-dashboard.dashboard-data-active .nx-nav a span { color: var(--text-low); }
html[data-theme="light"] .nx-dashboard-data {
    color: var(--text-hi);
    background: #e7e8e1;
}
html[data-theme="light"] .nx-dashboard-grid .glass-panel {
    color: var(--text-hi);
    background: rgba(255,255,251,.82);
    border-color: var(--glass-border);
}
html[data-theme="light"] .nx-flow-marquee span,
html[data-theme="light"] .nx-signal-row strong,
html[data-theme="light"] .nx-panel-head h2 { color: var(--text-hi); }
html[data-theme="light"] .nx-signal-row,
html[data-theme="light"] .nx-widget-toggle { border-color: rgba(17,18,15,.1); }
html[data-theme="light"] .nx-row-link { color: var(--text-mid); border-color: var(--glass-border); }
html[data-theme="light"] .is-dashboard .nx-kpi small { color: #85877f; }

html[data-theme="light"] .nx-machine-stats { border-color: var(--glass-border); }
html[data-theme="light"] .nx-capacity-day { background: rgba(17,18,15,.02); border-color: var(--glass-border); }
html[data-theme="light"] .nx-capacity-day .bar { background: #d7d8d0; }
html[data-theme="light"] .nx-capacity-day .pct { color: var(--text-hi); }
html[data-theme="light"] pre[style] { color: var(--text-mid) !important; background: #ffffff !important; border-color: var(--glass-border) !important; }

html[data-theme="light"] .nx-settings-panel {
    color: var(--text-hi);
    background: #f9f9f5;
    border-color: var(--glass-border);
    box-shadow: -30px 0 90px rgba(24,25,20,.16);
}
html[data-theme="light"] .nx-settings-head,
html[data-theme="light"] .nx-settings-group,
html[data-theme="light"] .nx-settings-foot,
html[data-theme="light"] .nx-segmented,
html[data-theme="light"] .nx-segmented label + label { border-color: var(--glass-border); }
html[data-theme="light"] .nx-color-options span { border-color: #f9f9f5; }

@media (max-width: 1180px) {
    .nx-mobile-actions {
        display: flex;
        align-items: center;
        align-self: center;
        gap: 8px;
    }
    .nx-settings-launcher--mobile { display: grid; }
    html[data-theme="light"] .nx-nav,
    html[data-theme="light"] .is-dashboard .nx-nav,
    html[data-theme="light"] .is-dashboard.dashboard-data-active .nx-nav {
        color: var(--text-hi);
        background: rgba(243,243,239,.98);
        border-color: var(--glass-border);
    }
}

@media (max-width: 560px) {
    .nx-settings-panel { width: 100vw; }
    .nx-settings-head { min-height: 98px; padding: 22px 20px 20px; }
    .nx-settings-group { padding: 21px 20px 24px; }
    .nx-settings-foot { padding: 16px 20px; }
}

/* ---------- Physics-informed simulation workspace ---------- */
.nx-sim-head {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr);
    align-items: end;
    gap: 40px;
    margin-bottom: 28px;
}
.nx-kicker,
.nx-sim-section-head span,
.nx-ranking > header > span,
.nx-evidence > header > span {
    color: var(--accent-teal);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.6px;
}
.nx-sim-head h1 {
    margin: 11px 0 0;
    color: var(--text-hi);
    font: 600 clamp(42px, 5.4vw, 76px)/.94 "Chakra Petch", sans-serif;
    letter-spacing: 0;
}
.nx-sim-head p { max-width: 520px; margin: 0; color: var(--text-low); line-height: 1.7; }

.nx-twin-stage {
    position: relative;
    min-height: 590px;
    margin: 0 calc(-1 * clamp(20px, 3.2vw, 54px));
    overflow: hidden;
    border-top: var(--line);
    border-bottom: var(--line);
    background: #080908;
    color: #f2f2e9;
}
#nx-3d-scene { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
#nx-3d-scene canvas { display: block; width: 100%; height: 100%; }
.nx-twin-topbar {
    position: absolute;
    z-index: 2;
    inset: 22px 28px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}
.nx-twin-id { display: flex; align-items: center; gap: 11px; }
.nx-twin-id > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.nx-twin-id small { color: #8a8f86; font-size: 8px; font-weight: 800; letter-spacing: 1.4px; }
.nx-twin-id strong { color: #f2f2e9; font: 600 13px/1.2 "Chakra Petch", sans-serif; }
.nx-live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #ceff38; box-shadow: 0 0 0 5px rgba(206,255,56,.1), 0 0 18px rgba(206,255,56,.7);
}
.nx-twin-actions { display: flex; gap: 6px; pointer-events: auto; }
.nx-icon-btn {
    width: 38px; height: 38px; display: grid; place-items: center;
    border: 1px solid rgba(255,255,255,.2); border-radius: 3px;
    background: rgba(8,9,8,.75); color: #f2f2e9; cursor: pointer;
}
.nx-icon-btn:hover { color: #ceff38; border-color: #ceff38; }
.nx-icon-btn.is-active { color: #8fd8ff; border-color: #8fd8ff; background: rgba(20,40,70,.85); box-shadow: 0 0 14px rgba(143,216,255,.35); }
.nx-twin-hud {
    position: absolute;
    z-index: 2;
    left: 28px;
    bottom: 54px;
    display: grid;
    grid-template-columns: repeat(6, minmax(105px, 1fr));
    min-width: min(820px, calc(100% - 56px));
    background: rgba(8,9,8,.78);
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(14px);
}
.nx-twin-hud div { min-height: 68px; padding: 14px 17px; border-right: 1px solid rgba(255,255,255,.12); }
.nx-twin-hud div:last-child { border: 0; }
.nx-twin-hud small { display: block; margin-bottom: 7px; color: #777e75; font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.nx-twin-hud strong { color: #f2f2e9; font: 600 14px/1 "Chakra Petch", sans-serif; }
.nx-twin-hud div:first-child strong { color: #ceff38; }
.nx-twin-legend {
    position: absolute; z-index: 2; inset: auto 28px 18px;
    display: flex; gap: 22px; color: #737a71; font-size: 9px; font-weight: 700;
}
.nx-twin-legend span { display: flex; align-items: center; gap: 7px; }
.nx-twin-legend i { width: 7px; height: 7px; border-radius: 50%; background: #8ed4ff; }
.nx-twin-legend i.is-calculated { background: #ceff38; }

.nx-sim-layout {
    display: grid;
    grid-template-columns: minmax(390px, .7fr) minmax(0, 1.3fr);
    margin: 0 calc(-1 * clamp(20px, 3.2vw, 54px));
    border-bottom: var(--line);
}
.nx-sim-recipe { padding: 40px clamp(22px, 3vw, 46px); border-right: var(--line); background: var(--bg-1); }
.nx-sim-output { min-width: 0; padding: 40px clamp(22px, 3vw, 46px); background: var(--bg-0); }
.nx-sim-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 28px; }
.nx-sim-section-head h2,
.nx-ranking > header h2,
.nx-evidence > header h2 { margin: 7px 0 0; color: var(--text-hi); font: 600 24px/1.05 "Chakra Petch", sans-serif; }
.nx-model-state {
    padding: 7px 8px; border: 1px solid rgba(206,255,56,.4);
    color: var(--accent-teal) !important; font-size: 7px !important; letter-spacing: 1px !important;
}
.nx-sim-form > .nx-field,
.nx-sim-form > .nx-form-grid { margin-bottom: 15px; }
.nx-sim-form .nx-mini-input { width: 100%; min-width: 0; }
.nx-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nx-field > span { display: flex; justify-content: space-between; align-items: baseline; }
.nx-field-note { display: block; margin-top: 7px; color: var(--text-low); font-size: 8px; line-height: 1.45; }
.nx-field > span b { color: var(--text-low); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.nx-recipe-band { margin-top: 26px; padding-top: 17px; border-top: var(--line); }
.nx-recipe-band > span { display: block; margin-bottom: 13px; color: var(--text-low); font-size: 8px; font-weight: 800; letter-spacing: 1.4px; }
.nx-sim-advanced { margin-top: 20px; border-top: var(--line); border-bottom: var(--line); }
.nx-sim-advanced summary {
    padding: 15px 0; display: flex; justify-content: space-between; align-items: center;
    color: var(--text-mid); font-size: 11px; font-weight: 800; cursor: pointer; list-style: none;
}
.nx-sim-advanced summary::-webkit-details-marker { display: none; }
.nx-sim-advanced[open] summary span { transform: rotate(45deg); }
.nx-sim-advanced > .nx-form-grid { padding: 4px 0 16px; }
.nx-weight-grid { display: grid; gap: 12px; margin: 2px 0 18px; }
.nx-weight-grid label { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; color: var(--text-mid); font-size: 10px; font-weight: 700; }
.nx-weight-grid input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent-teal); }
.nx-weight-grid output { color: var(--text-hi); font-family: "Chakra Petch", sans-serif; }
.nx-sim-run { width: 100%; min-height: 48px; margin-top: 22px; justify-content: center; }
.nx-sim-run:disabled { opacity: .65; cursor: wait; }
.nx-run-spinner { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: nx-spin .7s linear infinite; }
@keyframes nx-spin { to { transform: rotate(360deg); } }

.nx-sim-empty { min-height: 460px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; max-width: 460px; }
.nx-sim-empty > span { color: var(--accent-teal); font: 700 10px/1 "Chakra Petch", sans-serif; }
.nx-sim-empty h2 { margin: 18px 0 9px; color: var(--text-hi); font: 600 38px/1 "Chakra Petch", sans-serif; }
.nx-sim-empty p { margin: 0; color: var(--text-low); line-height: 1.7; }
.nx-sim-loading { min-height: 460px; display: flex; align-items: center; gap: 22px; }
.nx-sim-loading > i { width: 4px; height: 74px; background: var(--accent-teal); animation: nx-load-pulse .8s ease-in-out infinite alternate; }
.nx-sim-loading div { display: flex; flex-direction: column; gap: 6px; }
.nx-sim-loading span { color: var(--accent-teal); font-size: 8px; font-weight: 800; letter-spacing: 1.5px; }
.nx-sim-loading strong { color: var(--text-hi); font: 600 22px/1.1 "Chakra Petch", sans-serif; }
.nx-sim-loading small { color: var(--text-low); }
@keyframes nx-load-pulse { to { height: 112px; opacity: .4; } }
.nx-sim-error { padding: 20px; border-left: 3px solid var(--accent-rose); background: rgba(255,102,89,.06); }
.nx-sim-error strong { color: var(--accent-rose); }
.nx-sim-error p { margin: 6px 0 0; color: var(--text-mid); }

.nx-run-summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 22px; border-bottom: var(--line); }
.nx-run-summary span { color: var(--accent-teal); font-size: 8px; font-weight: 800; letter-spacing: 1.3px; }
.nx-run-summary h2 { margin: 8px 0 5px; color: var(--text-hi); font: 600 27px/1.05 "Chakra Petch", sans-serif; }
.nx-run-summary p { margin: 0; color: var(--text-low); font-size: 10px; }
.nx-run-ok { padding: 7px 9px; border: 1px solid rgba(206,255,56,.4); white-space: nowrap; }
.nx-sim-pass,
.nx-sim-warnings { margin: 16px 0; }
.nx-sim-pass { padding: 11px 13px; color: var(--text-mid); background: rgba(206,255,56,.05); border-left: 2px solid var(--accent-teal); font-size: 10px; }
.nx-sim-pass b { margin-right: 8px; color: var(--accent-teal); }
.nx-sim-warnings p { margin: 0 0 4px; padding: 10px 12px; color: var(--text-mid); background: rgba(255,200,87,.06); border-left: 2px solid var(--accent-amber); font-size: 10px; }
.nx-sim-warnings b { margin-right: 9px; color: var(--accent-amber); }
.nx-physics-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin: 17px 0 34px; border-top: var(--line); border-left: var(--line); }
.nx-physics-strip div { min-height: 72px; padding: 14px; border-right: var(--line); border-bottom: var(--line); }
.nx-physics-strip small,
.nx-sim-metrics small,
.nx-result-analysis > div > small { display: block; color: var(--text-low); font-size: 7px; font-weight: 800; letter-spacing: .8px; }
.nx-physics-strip strong { display: block; margin-top: 10px; color: var(--text-hi); font: 600 14px/1 "Chakra Petch", sans-serif; }
.nx-ranking > header { display: grid; grid-template-columns: 1fr auto; align-items: end; margin-bottom: 16px; }
.nx-ranking > header > span { grid-column: 1 / -1; }
.nx-ranking > header p { margin: 0; color: var(--text-low); font-size: 9px; }

.nx-intelligence-lab { margin: 0 0 42px; padding: 28px 0 38px; border-top: 2px solid var(--accent-teal); border-bottom: var(--line); }
.nx-intelligence-lab > header {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 22px;
}
.nx-intelligence-lab > header span,
.nx-panel-label > span { color: var(--accent-teal); font-size: 7px; font-weight: 800; letter-spacing: 1.2px; }
.nx-intelligence-lab > header h2 { margin: 7px 0 5px; color: var(--text-hi); font: 600 25px/1.05 "Chakra Petch", sans-serif; }
.nx-intelligence-lab > header p { max-width: 510px; margin: 0; color: var(--text-low); font-size: 9px; line-height: 1.55; }
.nx-trust-score {
    min-width: 94px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto;
    border-left: 2px solid #8ed4ff; background: rgba(142,212,255,.045);
}
.nx-trust-score small { grid-column: 1 / -1; color: var(--text-low); font-size: 6px; letter-spacing: 1px; }
.nx-trust-score strong { color: var(--text-hi); font: 600 22px/1.25 "Chakra Petch", sans-serif; }
.nx-trust-score span { align-self: center; color: #8ed4ff !important; font-size: 7px !important; text-transform: uppercase; }
.nx-intelligence-grid { display: grid; grid-template-columns: 1.12fr .88fr; border-top: var(--line); border-left: var(--line); }
.nx-intelligence-grid > article { min-width: 0; padding: 17px; border-right: var(--line); border-bottom: var(--line); }
.nx-confidence-panel { grid-column: 1 / -1; }
.nx-panel-label { min-height: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.nx-panel-label > b { color: var(--text-low); font-size: 7px; font-weight: 700; }
.nx-pareto-plot { position: relative; height: 180px; margin-top: 14px; border-left: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); }
.nx-pareto-plot::before,
.nx-pareto-plot::after { content: ""; position: absolute; pointer-events: none; background: var(--glass-border); }
.nx-pareto-plot::before { left: 0; right: 0; top: 50%; height: 1px; }
.nx-pareto-plot::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.nx-pareto-plot > i {
    position: absolute; z-index: 1; width: 17px; height: 17px; display: grid; place-items: center;
    border: 1px solid var(--accent-teal); border-radius: 50%; color: var(--accent-teal);
    background: var(--bg-0); font-style: normal; transform: translate(-50%, 50%);
}
.nx-pareto-plot > i b { font-size: 6px; font-weight: 800; }
.nx-pareto-plot > i.is-best {
    width: 25px; height: 25px; color: #090909; background: var(--accent-teal);
    box-shadow: 0 0 0 5px rgba(206,255,56,.09);
}
.nx-pareto-x,
.nx-pareto-y { position: absolute; color: var(--text-low); font-size: 6px; font-weight: 800; letter-spacing: .7px; }
.nx-pareto-x { right: 4px; bottom: 5px; }
.nx-pareto-y { left: 5px; top: 5px; }
.nx-pareto-empty { color: var(--text-low); font-size: 10px; line-height: 1.5; }
.nx-opt-recipe { display: grid; grid-template-columns: 1fr 1fr; margin: 15px 0; border-top: var(--line); border-left: var(--line); }
.nx-opt-recipe > div { padding: 11px; border-right: var(--line); border-bottom: var(--line); }
.nx-opt-recipe small { display: block; color: var(--text-low); font-size: 6px; font-weight: 800; letter-spacing: .8px; }
.nx-opt-recipe strong { display: block; margin-top: 6px; color: var(--text-hi); font: 600 12px/1 "Chakra Petch", sans-serif; }
.nx-opt-gains { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.nx-opt-gains span { padding: 6px 7px; color: var(--text-low); border: var(--line); font-size: 7px; }
.nx-opt-gains b { color: var(--accent-teal); font-weight: 800; }
.nx-apply-optimum { width: 100%; justify-content: center; }
.nx-confidence-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
.nx-confidence-bars label {
    display: grid; grid-template-columns: minmax(90px, auto) 1fr 32px; align-items: center;
    gap: 8px; color: var(--text-mid); font-size: 8px;
}
.nx-confidence-bars i { height: 4px; background: var(--surface-raised); }
.nx-confidence-bars i b { display: block; height: 100%; background: #8ed4ff; }
.nx-confidence-bars strong { color: var(--text-hi); font-size: 8px; text-align: right; }
.nx-confidence-panel ul { margin: 13px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; list-style: none; }
.nx-confidence-panel li { padding: 5px 7px; color: var(--text-low); border: var(--line); font-size: 7px; }
.nx-counterfactuals { margin-top: 18px; }
.nx-counterfactual-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.nx-counterfactual {
    min-width: 0; min-height: 160px; padding: 14px; display: flex; flex-direction: column;
    align-items: flex-start; border: var(--line); border-radius: 4px; background: rgba(255,255,255,.012);
}
.nx-counterfactual small { display: block; min-height: 28px; color: var(--text-low); font-size: 7px; line-height: 1.4; }
.nx-counterfactual h4 { margin: 6px 0 12px; color: var(--text-hi); font: 600 13px/1.15 "Chakra Petch", sans-serif; }
.nx-counterfactual-impact { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 13px; }
.nx-counterfactual-impact span { padding: 4px 5px; color: var(--text-mid); border: var(--line); font-size: 7px; }
.nx-counterfactual-impact .good { color: var(--accent-teal); }
.nx-counterfactual-impact .bad { color: var(--accent-rose); }
.nx-counterfactual .nx-btn { width: 100%; margin-top: auto; padding-inline: 7px; justify-content: center; white-space: normal; line-height: 1.25; }

.nx-machine-result { margin-bottom: 8px; border: var(--line); border-radius: 4px; background: rgba(255,255,255,.012); overflow: hidden; }
.nx-machine-result.is-recommended { border-color: rgba(206,255,56,.48); }
.nx-machine-result-main {
    width: 100%; min-height: 77px; padding: 12px 15px; display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 54px 18px; align-items: center; gap: 11px;
    border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer;
}
.nx-machine-result-main:hover { background: rgba(255,255,255,.02); }
.nx-result-rank { color: var(--text-low); font: 600 13px/1 "Chakra Petch", sans-serif; }
.is-recommended .nx-result-rank { color: var(--accent-teal); }
.nx-result-name { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nx-result-name small { color: var(--accent-teal); font-size: 7px; font-weight: 800; letter-spacing: 1px; }
.nx-result-name strong { overflow: hidden; color: var(--text-hi); font: 600 13px/1.2 "Chakra Petch", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.nx-result-name em { width: max-content; max-width: 100%; font-style: normal; font-size: 8px; font-weight: 700; }
.nx-state.ok { color: var(--accent-teal); } .nx-state.warn { color: var(--accent-amber); } .nx-state.bad { color: var(--accent-rose); }
.nx-result-score { text-align: right; }
.nx-result-score small { display: block; color: var(--text-low); font-size: 7px; letter-spacing: .8px; }
.nx-result-score strong { color: var(--text-hi); font: 600 19px/1.2 "Chakra Petch", sans-serif; }
.nx-result-chevron { color: var(--text-low); font-size: 18px; transition: transform .2s ease; }
.nx-machine-result-main[aria-expanded="true"] .nx-result-chevron { transform: rotate(180deg); }
.nx-machine-result-detail { padding: 0 15px 18px 62px; border-top: var(--line); }
.nx-machine-result-detail[hidden] { display: none; }
.nx-sim-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 16px 0; }
.nx-sim-metrics > div { min-width: 0; padding-right: 11px; }
.nx-sim-metrics strong { display: block; margin: 7px 0 3px; color: var(--text-hi); font: 600 13px/1.1 "Chakra Petch", sans-serif; overflow-wrap: anywhere; }
.nx-sim-metrics span { color: var(--text-low); font-size: 8px; }
.nx-result-analysis { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; padding-top: 14px; border-top: var(--line); }
.nx-distribution { height: 62px; display: flex; align-items: flex-end; gap: 3px; margin-top: 12px; }
.nx-distribution i { flex: 1; height: var(--h); min-width: 2px; background: var(--accent-teal); opacity: .74; }
.nx-axis { display: flex; justify-content: space-between; margin-top: 5px; color: var(--text-low); font-size: 7px; }
.nx-axis b { font-weight: 600; }
.nx-risk-row { display: grid; grid-template-columns: minmax(95px, 1fr) 1fr 38px; align-items: center; gap: 7px; margin-top: 9px; }
.nx-risk-row > span { color: var(--text-mid); font-size: 8px; }
.nx-risk-row small { display: block; margin-top: 2px; color: var(--text-low); font-size: 6px; text-transform: uppercase; }
.nx-risk-row > i { height: 3px; background: var(--surface-raised); }
.nx-risk-row > i b { display: block; height: 100%; background: var(--accent-violet); }
.nx-risk-row > strong { color: var(--text-hi); font-size: 8px; text-align: right; }

.nx-sim-capacity {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 12px; margin: 0 0 14px; border-radius: 2px; font-size: 10.5px;
    border: 1px solid rgba(206,255,56,.3); background: rgba(206,255,56,.06); color: var(--text-mid);
}
.nx-sim-capacity b { color: var(--accent-teal); font-size: 11px; }
.nx-sim-capacity.warn { border-color: rgba(255,102,89,.4); background: rgba(255,102,89,.07); }
.nx-sim-capacity.warn b { color: var(--accent-rose); }
.nx-sim-assign { margin-top: 15px; }
.nx-nc-import { margin-top: 18px; border-top: var(--line); border-bottom: var(--line); }
.nx-nc-import summary { padding: 15px 0; display: flex; justify-content: space-between; color: var(--text-mid); font-size: 11px; font-weight: 800; cursor: pointer; list-style: none; }
.nx-nc-import summary::-webkit-details-marker { display: none; }
.nx-nc-import[open] summary span { transform: rotate(45deg); }
.nx-nc-copy { margin: 0 0 10px; color: var(--text-low); font-size: 8px; line-height: 1.5; }
.nx-nc-import textarea {
    width: 100%; min-height: 145px; padding: 12px; resize: vertical;
    border: var(--line); border-radius: 3px; outline: none; background: var(--bg-0);
    color: var(--text-hi); font: 11px/1.55 "Chakra Petch", monospace;
}
.nx-nc-import textarea:focus { border-color: var(--accent-teal); }
.nx-nc-run { width: 100%; margin-top: 9px; justify-content: center; }
.nx-nc-result { margin-top: 12px; }
.nx-nc-status { display: grid; grid-template-columns: 22px 1fr; gap: 2px 8px; padding: 10px; border-left: 2px solid var(--accent-teal); background: rgba(206,255,56,.04); }
.nx-nc-status.is-warning { border-left-color: var(--accent-amber); background: rgba(255,200,87,.05); }
.nx-nc-status > b { grid-row: 1 / span 2; color: var(--accent-teal); }
.nx-nc-status.is-warning > b { color: var(--accent-amber); }
.nx-nc-status strong { color: var(--text-hi); font-size: 10px; text-transform: uppercase; }
.nx-nc-status span { color: var(--text-low); font-size: 8px; }
.nx-nc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 7px; }
.nx-nc-stats span { padding: 7px; border: var(--line); color: var(--text-low); font-size: 7px; }
.nx-nc-stats b { display: block; margin-bottom: 3px; color: var(--text-hi); font: 600 12px "Chakra Petch", sans-serif; }
.nx-nc-warnings { margin: 7px 0 0; padding-left: 16px; color: var(--accent-amber); font-size: 8px; line-height: 1.5; }
.nx-nc-message { margin: 0; color: var(--text-low); font-size: 9px; }
.nx-nc-message.is-error { color: var(--accent-rose); }
.nx-kinematic-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 11px 13px; border: var(--line); background: rgba(142,212,255,.045); }
.nx-kinematic-banner span { color: #8ed4ff; font-size: 7px; font-weight: 800; letter-spacing: 1.2px; }
.nx-kinematic-banner strong { color: var(--text-hi); font: 600 14px/1 "Chakra Petch", sans-serif; }
.nx-kinematic-banner b { color: var(--accent-teal); font: 600 11px/1 "Chakra Petch", sans-serif; letter-spacing: 1px; }
.nx-kinematic-banner small { margin-left: auto; color: var(--text-low); font-size: 8px; }

.nx-evidence { padding: 58px 0 0; }
.nx-evidence > header { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.nx-evidence-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: var(--line); border-left: var(--line); }
.nx-evidence-grid article { min-height: 170px; padding: 22px; border-right: var(--line); border-bottom: var(--line); }
.nx-evidence-grid small { color: var(--text-low); font-size: 7px; font-weight: 800; letter-spacing: 1.2px; }
.nx-evidence-grid [data-kind="measured"] small { color: #8ed4ff; }
.nx-evidence-grid [data-kind="calculated"] small { color: var(--accent-teal); }
.nx-evidence-grid [data-kind="assumption"] small { color: var(--accent-amber); }
.nx-evidence-grid [data-kind="limit"] small { color: var(--accent-rose); }
.nx-evidence-grid h3 { margin: 22px 0 8px; color: var(--text-hi); font: 600 16px/1.15 "Chakra Petch", sans-serif; }
.nx-evidence-grid p { margin: 0; color: var(--text-low); font-size: 10px; line-height: 1.65; }

html[data-theme="light"] .nx-sim-recipe { background: #ecece7; }
html[data-theme="light"] .nx-machine-result { background: rgba(255,255,255,.35); }
html[data-theme="light"] .nx-counterfactual { background: rgba(255,255,255,.35); }
html[data-theme="light"] .nx-sim-pass { background: rgba(121,156,20,.08); }
html[data-theme="light"] .nx-sim-warnings p { background: rgba(185,123,8,.07); }

@media (max-width: 1500px) and (min-width: 1181px) {
    .nx-topbar { gap: 14px; padding-inline: 24px; }
    .nx-nav a { padding-inline: 8px; font-size: 10px; }
    .nx-user-status { display: none; }
}

@media (max-width: 1040px) {
    .nx-twin-stage { min-height: 530px; }
    .nx-sim-layout { grid-template-columns: 1fr; }
    .nx-sim-recipe { border-right: 0; border-bottom: var(--line); }
    .nx-evidence-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .nx-twin-stage,
    .nx-sim-layout { margin-inline: -18px; }
    .nx-sim-head { grid-template-columns: 1fr; gap: 18px; }
    .nx-sim-head h1 { font-size: 48px; }
    .nx-twin-stage { min-height: 560px; }
    .nx-twin-topbar { inset: 15px 16px auto; }
    .nx-twin-id strong { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .nx-twin-hud { left: 16px; right: 16px; bottom: 58px; min-width: 0; grid-template-columns: repeat(3, 1fr); }
    .nx-twin-hud div { min-height: 58px; padding: 11px; }
    .nx-twin-hud div:nth-child(4),
    .nx-twin-hud div:nth-child(5),
    .nx-twin-hud div:nth-child(6) { display: none; }
    .nx-twin-legend { inset: auto 16px 17px; gap: 10px; }
    .nx-twin-legend span:nth-child(2) { display: none; }
    .nx-form-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nx-physics-strip { grid-template-columns: repeat(2, 1fr); }
    .nx-machine-result-detail { padding-left: 15px; }
    .nx-result-analysis { grid-template-columns: 1fr; }
    .nx-intelligence-grid { grid-template-columns: 1fr; }
    .nx-confidence-panel { grid-column: auto; }
    .nx-counterfactual-grid { grid-template-columns: 1fr; }
    .nx-sim-metrics { grid-template-columns: repeat(2, 1fr); }
    .nx-intelligence-lab > header { flex-direction: column; }
    .nx-trust-score { width: 100%; }
    .nx-kinematic-banner { align-items: flex-start; flex-wrap: wrap; gap: 7px 10px; }
    .nx-kinematic-banner small { width: 100%; margin-left: 0; }
    .nx-evidence > header { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
    .nx-sim-head h1 { font-size: 42px; }
    .nx-twin-stage { min-height: 500px; }
    .nx-twin-hud { grid-template-columns: repeat(2, 1fr); }
    .nx-twin-hud div:nth-child(3),
    .nx-twin-hud div:nth-child(4),
    .nx-twin-hud div:nth-child(5),
    .nx-twin-hud div:nth-child(6) { display: none; }
    .nx-twin-legend span:last-child { display: none; }
    .nx-form-grid--3 { grid-template-columns: 1fr 1fr; }
    .nx-physics-strip { grid-template-columns: 1fr 1fr; }
    .nx-ranking > header { display: block; }
    .nx-ranking > header p { margin-top: 8px; }
    .nx-machine-result-main { grid-template-columns: 25px minmax(0, 1fr) 42px 14px; padding-inline: 10px; }
    .nx-result-name strong { font-size: 11px; }
    .nx-sim-metrics { grid-template-columns: 1fr 1fr; gap: 15px 5px; }
    .nx-evidence-grid { grid-template-columns: 1fr; }
}

/* ---- Canli telemetri kartlari ---- */
.nx-tel-body { display: flex; flex-direction: column; gap: 8px; }
.nx-tel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.nx-tel-grid small { display: block; font-size: 8.5px; letter-spacing: .9px; color: var(--text-low); font-weight: 800; margin-bottom: 3px; }
.nx-tel-grid strong { font: 600 13px "IBM Plex Mono", monospace; color: var(--text-hi); font-variant-numeric: tabular-nums; }
.nx-tel-grid strong em { font-style: normal; font-size: 9.5px; color: var(--text-low); }
.nx-tel-satir { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--text-mid); line-height: 1.6; }
.nx-tel-satir b { color: var(--accent-teal); font-weight: 600; }
.nx-tel-alarm { font-size: 11.5px; color: var(--accent-rose); font-weight: 600; }
.nx-tel-yas { font-size: 10px; color: var(--text-low); font-family: "IBM Plex Mono", monospace; }

/* ---- Gruplanmis menu: mobil davranis ----
   Dar ekranda menu zaten aciliyor; gruplar da absolute yerine satir ici acilir. */
@media (max-width: 1180px) {
    .nx-nav { grid-template-columns: 1fr; align-items: start; max-height: calc(100vh - 84px); overflow-y: auto; }
    .nx-nav-group { display: block; }
    .nx-nav-trigger { width: 100%; justify-content: space-between; padding: 11px 4px; }
    .nx-nav-group.active::after { display: none; }
    .nx-nav-menu {
        position: static; transform: none; min-width: 0; width: 100%;
        margin: 0 0 6px; padding: 4px 0 4px 12px;
        background: transparent; backdrop-filter: none;
        border: 0; border-left: 1px solid var(--glass-border); border-radius: 0;
        box-shadow: none;
        opacity: 1; visibility: visible; pointer-events: auto;
        display: none;
    }
    .nx-nav-group.is-open .nx-nav-menu { display: flex; transform: none; }
    /* Dokunmatikte hover yok: sadece is-open ile ac. */
    .nx-nav-group:hover .nx-nav-menu,
    .nx-nav-group:focus-within .nx-nav-menu { display: none; }
    .nx-nav-group.is-open:hover .nx-nav-menu,
    .nx-nav-group.is-open:focus-within .nx-nav-menu { display: flex; }
    .nx-nav-menu a { padding: 8px 6px; }
}

/* Fare olmayan cihazlarda hover ile acma - tiklama gerekir. */
@media (hover: none) {
    .nx-nav-group:hover .nx-nav-menu { opacity: 0; visibility: hidden; pointer-events: none; }
    .nx-nav-group.is-open .nx-nav-menu { opacity: 1; visibility: visible; pointer-events: auto; }
}

/* ---- Acilir menu: ust bar kurallarini ez ----
   `.nx-nav a`, `.is-dashboard .nx-nav a` ve `html[data-theme] .nx-nav a`
   kurallari menu ogelerini de yakaliyordu (ayni ozgulluk, sonra geldikleri
   icin kazaniyorlardi). Menu bir acilir panel; ust bardan farkli hizalanir
   ve her temada panel zeminine gore renklenir. */
.nx-nav .nx-nav-menu a,
.is-dashboard .nx-nav .nx-nav-menu a,
.is-dashboard.dashboard-data-active .nx-nav .nx-nav-menu a,
html[data-theme="light"] .nx-nav .nx-nav-menu a,
html[data-theme="light"] .is-dashboard .nx-nav .nx-nav-menu a,
html[data-theme="light"] .is-dashboard.dashboard-data-active .nx-nav .nx-nav-menu a {
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    min-height: 0;
    border-bottom: 0;
    background: transparent;
    color: var(--text-hi);
}
.nx-nav .nx-nav-menu a small,
.is-dashboard .nx-nav .nx-nav-menu a small,
.is-dashboard.dashboard-data-active .nx-nav .nx-nav-menu a small,
html[data-theme="light"] .nx-nav .nx-nav-menu a small,
html[data-theme="light"] .is-dashboard .nx-nav .nx-nav-menu a small {
    color: var(--text-low);
}
.nx-nav .nx-nav-menu a:hover,
.is-dashboard .nx-nav .nx-nav-menu a:hover,
.is-dashboard.dashboard-data-active .nx-nav .nx-nav-menu a:hover,
html[data-theme="light"] .nx-nav .nx-nav-menu a:hover,
html[data-theme="light"] .is-dashboard .nx-nav .nx-nav-menu a:hover {
    background: var(--surface-raised);
    color: var(--accent-teal);
}
.nx-nav .nx-nav-menu a:hover small { color: var(--text-mid); }
/* Panel her zaman kendi zeminini boyar - ust bar saydamligindan etkilenmesin. */
.nx-nav .nx-nav-menu,
.is-dashboard .nx-nav .nx-nav-menu {
    background: var(--glass-fill-strong);
}

/* Menu ogeleri: baslik+aciklama tek birim gibi okunsun, ogeler ayrissin. */
.nx-nav .nx-nav-menu { gap: 1px; padding: 7px; }
.nx-nav .nx-nav-menu a { gap: 1px; padding: 8px 12px 9px; }
.nx-nav .nx-nav-menu a + a { margin-top: 3px; }
/* Panel arkasindaki sayfa gorseli sizmasin. */
.nx-nav .nx-nav-menu,
.is-dashboard .nx-nav .nx-nav-menu { background: var(--surface); }
html[data-theme="light"] .nx-nav .nx-nav-menu,
html[data-theme="light"] .is-dashboard .nx-nav .nx-nav-menu { background: #ffffff; }

/* ---- Hata sayfasi ---- */
.nx-hata { max-width: 560px; margin: clamp(40px, 10vh, 120px) auto; text-align: center; }
.nx-hata-kod {
    display: block; font: 700 clamp(56px, 12vw, 104px)/1 "Chakra Petch", sans-serif;
    color: var(--accent-teal); letter-spacing: -.02em; margin-bottom: 10px;
}
.nx-hata h1 { margin: 0 0 12px; font: 600 24px "Chakra Petch", sans-serif; color: var(--text-hi); }
.nx-hata p { margin: 0 0 26px; color: var(--text-mid); font-size: 14px; line-height: 1.65; }
.nx-hata-eylem { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---- Guvenlik uyarisi (varsayilan sifre) ---- */
.nx-guvenlik-uyari {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: 0 0 18px; padding: 12px 16px;
    border: 1px solid rgba(255,102,89,.45); border-left: 3px solid var(--accent-rose);
    border-radius: var(--radius-md); background: rgba(255,102,89,.07);
    font-size: 12.5px; line-height: 1.55;
}
.nx-guvenlik-uyari strong { color: var(--accent-rose); font-size: 11px; letter-spacing: .8px; text-transform: uppercase; }
.nx-guvenlik-uyari span { color: var(--text-mid); }
.nx-guvenlik-uyari b { color: var(--text-hi); font-family: "IBM Plex Mono", monospace; }
.nx-guvenlik-uyari a { margin-left: auto; color: var(--accent-teal); font-weight: 700; white-space: nowrap; }

/* ---- Uyarilar sayfasi ---- */
.nx-uyari-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.nx-uyari-karti {
    padding: 14px 16px; border: var(--line); border-left: 3px solid var(--text-low);
    border-radius: var(--radius-md); background: var(--surface);
    display: flex; flex-direction: column; gap: 6px;
}
.nx-uyari-kritik { border-left-color: var(--accent-rose); }
.nx-uyari-onemli { border-left-color: var(--accent-amber); }
.nx-uyari-bilgi { border-left-color: var(--accent-teal); }
.nx-uyari-ust { display: flex; }
.nx-uyari-etiket { font: 800 9px "IBM Plex Mono", monospace; letter-spacing: 1px; color: var(--text-low); }
.nx-uyari-kritik .nx-uyari-etiket { color: var(--accent-rose); }
.nx-uyari-onemli .nx-uyari-etiket { color: var(--accent-amber); }
.nx-uyari-bilgi .nx-uyari-etiket { color: var(--accent-teal); }
.nx-uyari-karti strong { font: 600 13.5px "Chakra Petch", sans-serif; color: var(--text-hi); }
.nx-uyari-karti p { margin: 0; font-size: 12px; color: var(--text-mid); line-height: 1.55; }
.nx-uyari-karti a { margin-top: 4px; font-size: 11.5px; color: var(--accent-teal); font-weight: 700; }

/* ============================================================================
   SİMÜLASYON: BİTMİŞ PARÇA GÖRÜNÜMÜ, AI ÖZETİ VE FİRE ARAMA AYARLARI
   Bu blok dosyanın sonundadır; yalnızca bu bölüme özgü sınıf adları kullanır,
   mevcut kuralların özgüllüğüyle yarışmaz.
   ========================================================================= */

/* 3D sahne üzerinde, kesim sonrası parçanın gerçek ölçü kartı.
   Sahne her temada koyu olduğu için renkleri sabittir. */
.nx-part-badge {
    position: absolute;
    z-index: 3;
    top: 76px;
    right: 28px;
    width: min(292px, 46vw);
    padding: 15px 17px 14px;
    background: rgba(8, 9, 8, .86);
    border: 1px solid rgba(143, 216, 255, .38);
    border-left: 3px solid #8fd8ff;
    backdrop-filter: blur(14px);
    color: #f2f2e9;
}
.nx-part-badge[hidden] { display: none; }
.nx-part-badge header { display: flex; flex-direction: column; gap: 5px; margin-bottom: 11px; }
.nx-part-badge header span { color: #8fd8ff; font-size: 8px; font-weight: 800; letter-spacing: 1.4px; }
.nx-part-badge header strong { font: 600 13px/1.3 "Chakra Petch", sans-serif; }
.nx-part-badge dl { display: grid; gap: 6px; margin: 0; }
.nx-part-badge dl > div {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    padding-bottom: 5px; border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.nx-part-badge dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.nx-part-badge dt { margin: 0; color: #9aa196; font-size: 10px; font-weight: 600; }
.nx-part-badge dd {
    margin: 0; color: #f2f2e9; font: 600 11.5px "IBM Plex Mono", monospace;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.nx-part-badge dl > div.is-strong dd { color: #ceff38; }
.nx-part-badge p { margin: 11px 0 0; color: #7f867d; font-size: 9.5px; line-height: 1.55; }

@media (max-width: 900px) {
    .nx-part-badge { position: static; width: auto; margin: 0 20px 18px; backdrop-filter: none; }
    .nx-twin-stage { min-height: 0; }
}

/* AI simülasyon özeti */
.nx-ai-ozet {
    margin-bottom: 26px;
    padding: 20px 22px;
    border: var(--line);
    border-left: 3px solid var(--accent-teal);
    border-radius: var(--radius-md);
    background: var(--surface-raised);
}
.nx-ai-ozet[hidden] { display: none; }
.nx-ai-ozet header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 14px; }
.nx-ai-ozet header span { color: var(--text-low); font-size: 9px; font-weight: 800; letter-spacing: 1.4px; }
.nx-ai-ozet header h2 {
    flex: 1 1 100%; margin: 0;
    color: var(--text-hi); font: 600 21px/1.25 "Chakra Petch", sans-serif;
    text-wrap: balance;
}
.nx-ai-kaynak {
    padding: 3px 8px; border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    color: var(--text-low); font-size: 9.5px; font-weight: 700;
}
.nx-ai-ozet ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.nx-ai-ozet li { color: var(--text-mid); font-size: 13px; line-height: 1.65; }
.nx-ai-ozet li::marker { color: var(--accent-teal); }
.nx-ai-karar, .nx-ai-dikkat {
    display: flex; gap: 10px; align-items: baseline;
    margin: 14px 0 0; padding-top: 12px; border-top: var(--line);
    color: var(--text-mid); font-size: 12.5px; line-height: 1.6;
}
.nx-ai-karar b, .nx-ai-dikkat b {
    flex: 0 0 auto; font-size: 9px; font-weight: 800; letter-spacing: 1.2px;
    text-transform: uppercase; color: var(--accent-teal);
}
.nx-ai-dikkat { margin-top: 8px; padding-top: 0; border-top: 0; }
.nx-ai-dikkat b { color: var(--accent-amber); }
.nx-ai-ozet-yukleniyor { display: flex; align-items: center; gap: 10px; color: var(--text-low); font-size: 12px; }
.nx-ai-ozet-hata { color: var(--accent-rose); font-size: 12px; }

/* Fire araması ayarları */
.nx-fire-controls { display: grid; gap: 12px; margin-top: 18px; }
.nx-fire-budget { display: grid; gap: 5px; }
.nx-fire-budget > span { color: var(--text-mid); font-size: 10.5px; font-weight: 700; }
.nx-fire-budget > em { color: var(--text-low); font-size: 10px; font-style: normal; line-height: 1.5; }
.nx-fire-budget output { color: var(--accent-teal); font-family: "IBM Plex Mono", monospace; font-weight: 700; }
.nx-fire-budget input[type="range"] { width: 100%; min-height: 0; accent-color: var(--accent-teal); }
.nx-fire-toggle { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.nx-fire-toggle input[type="checkbox"] {
    width: 15px; height: 15px; min-height: 0; margin: 1px 0 0; padding: 0;
    flex: 0 0 auto; accent-color: var(--accent-teal);
}
.nx-fire-toggle span { color: var(--text-mid); font-size: 10.5px; line-height: 1.5; }
.nx-fire-toggle b { display: block; color: var(--text-low); font-size: 9.5px; font-weight: 600; }
.nx-fire-starts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.nx-fire-starts small { width: 100%; color: var(--text-low); font-size: 9px; font-weight: 800; letter-spacing: 1.2px; }
.nx-fire-starts span {
    padding: 3px 8px; border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    color: var(--text-low); font: 600 10px "IBM Plex Mono", monospace;
}
.nx-fire-starts span.is-winner { color: var(--accent-teal); border-color: rgba(206, 255, 56, .45); }
