/* MAKINEX ONE demo: panel tasarim sistemi (/app/css/app.css) uzerine yalnizca demoya ozgu eklemeler. */
html, body { height: auto; min-height: 100%; }
:root { --banner-h: 64px; }
.ic-wrap { display: inline-flex; }

/* ust bilgi seridi: her ekranda yapisik */
.demo-banner {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
  padding: 10px 28px; background: var(--mock-bg); color: #4c1d95; border-bottom: 1px solid #ddd0fb;
}
.demo-banner-text { flex: 1; min-width: 240px; }
.demo-banner-text strong { display: block; font-size: 14px; }
.demo-banner-text p { font-size: 13px; margin-top: 1px; }
.demo-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.demo-banner .btn { height: 36px; }
.demo-banner .btn.ghost { color: #4c1d95; }
.demo-banner .btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .6); }
.demo-banner :focus-visible { outline-color: #4c1d95; }
.demo-noscript { padding: 24px; }

/* kabuk: banner altinda yapisan kenar cubugu, ust cubuk akista */
.shell { min-height: calc(100vh - var(--banner-h)); }
.sidebar { top: var(--banner-h); height: calc(100vh - var(--banner-h)); }
.topbar { position: static; }
.topbar .crumbs svg { flex: none; }
.content { max-width: 1280px; }
.content:focus { outline: none; }

.page > * + * { margin-top: 18px; }
.page > .page-head { margin-top: 18px; margin-bottom: 0; }
.demo-block { margin: 0; }
.demo-rail .stepper { padding: 10px 14px; }
.demo-rail .step { min-height: 36px; padding: 0 6px; border-radius: 8px; }
.demo-rail a.step:hover { background: var(--surface-2); }
.demo-rail .step-line { min-width: 14px; margin: 0 4px; }
.demo-rail .step.current { color: var(--brand-700); }

.demo-hl td { background: var(--brand-50); }
.demo-message { max-height: none; font-family: var(--font); font-size: 14px; line-height: 1.6; }
.demo-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.conf { display: grid; gap: 4px; min-width: 120px; }
.conf-cell { min-width: 150px; }
.demo-sub { margin: 0 0 8px; }
.demo-alts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.demo-alts li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.demo-alts li.sel { border-color: var(--brand-500); background: var(--brand-50); }
.demo-alts .alt-main { flex: 1; min-width: 220px; display: grid; gap: 6px; justify-items: start; }
.demo-alts .alt-act { display: flex; gap: 8px; align-items: center; }
.demo-checks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.demo-checks li { display: flex; gap: 8px; align-items: center; }
.demo-checks svg { color: var(--ok); }
.demo-timeline li.todo .tdot { background: var(--surface); border-color: var(--border-strong); }
.demo-timeline li.todo .tbody b { color: var(--muted); }
.demo-timeline li { padding-bottom: 20px; }
.items-editor .col-qty input { width: 84px; }
.items-editor tr.missing td { background: #fffaf0; }
.items-editor td, .items-editor th { vertical-align: middle; }

@media (max-width: 900px) {
  .demo-banner { padding: 8px 16px; }
  .sidebar { top: 0; height: 100vh; z-index: 60; }
  .shell { min-height: 100vh; }
  .btn, .btn.sm, .demo-banner .btn { min-height: 44px; height: auto; }
  .btn.icon, .btn.sm.icon { width: 44px; }
  .nav a { min-height: 44px; }
  .demo-rail .step { min-height: 44px; padding: 0 8px; }
  input:not([type="checkbox"]), textarea { min-height: 44px; }
  .items-editor input { height: 44px; }
}
.m-only { display: none; }
.qty-label { display: block; }
.btn[aria-disabled="true"] { opacity: .6; }
.btn[aria-disabled="true"]:hover { background: var(--surface); }
.btn.primary[aria-disabled="true"]:hover { background: var(--brand-grad); border-color: var(--brand-600); }
.items-editor .qty-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toasts { pointer-events: none; }
.toast { pointer-events: auto; }

@media (max-width: 640px) {
  /* banner: tek satir, kompakt */
  .demo-banner { flex-wrap: nowrap; gap: 8px; padding: 6px 12px; }
  .demo-banner-text { min-width: 0; flex: 1 1 auto; }
  .demo-banner-text strong { font-size: 13px; line-height: 1.2; }
  .demo-banner-note, .demo-banner .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .demo-banner .m-only { display: inline-flex; }
  .demo-banner-actions { flex: none; gap: 6px; flex-wrap: nowrap; }
  .demo-banner .btn { padding: 0 10px; font-size: 13px; }
  .demo-banner .btn.icon-only, .demo-banner #demo-reset, .demo-banner .btn.ghost { width: 44px; padding: 0; }
  .demo-alts .alt-act { width: 100%; }
  .card-head .badge, .demo-alts .badge { white-space: normal; border-radius: 12px; }

  /* toast: altta, 16px kenar boslugu, sadece kendisi tiklanabilir */
  .toasts { left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); max-width: none; }

  /* tablolar: yatay kaydirma yerine kart yigini */
  .m-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .m-cards, .m-cards tbody { display: block; }
  .m-cards tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .m-cards tbody tr:last-child { border-bottom: 0; }
  .table.m-cards td { display: block; padding: 0; border: 0; background: transparent; min-width: 0; text-align: left; white-space: normal; }
  .m-cards td:first-child, .m-cards td.m-full { grid-column: 1 / -1; }
  .m-cards td[data-label]::before, .m-cards .col-qty .qty-label { font-family: var(--font); content: attr(data-label); display: block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 2px; }
  .items-editor .col-qty .qty-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .items-editor .col-qty .qty-label .sr-only { position: absolute; }
  .items-editor .col-qty { width: auto; }
  .items-editor .col-qty input { width: 100%; }
  .m-cards tr.demo-hl { background: var(--brand-50); }
  .items-editor tr.missing { background: #fffaf0; }
  .m-cards .conf-cell { min-width: 0; }
  .m-cards td.right { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* menu dugmesi yalnizca dar ekranda (".btn" gorunurlugu ezmesin) */
.btn.menu-btn { display: none; }
@media (max-width: 900px) { .btn.menu-btn { display: inline-flex; } }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.demo-label { padding: 0 20px 4px; font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: #aab8ff; }

h1, h2, h3 { text-wrap: balance; }

/* ---- demo hesabı oluşturma ve kurulum sihirbazı ---- */
:root { --demo-accent: var(--brand-600); }
.lbl-short { display: none; }
.demo-onb > * + * { margin-top: 18px; }
.demo-onb h1:focus { outline: none; }
.demo-sub-p { margin-top: 4px; }
.demo-company { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.demo-company-name { font-weight: 600; overflow-wrap: anywhere; }
.demo-badge { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--demo-accent); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.demo-badge.circle { border-radius: 50%; }
.demo-badge.sm { width: 26px; height: 26px; font-size: 11px; }
.sidebar-foot .demo-company { margin-bottom: 6px; }
.demo-fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px 14px; margin: 0; min-width: 0; }
.demo-fieldset legend { font-weight: 600; padding: 0 6px; }
.demo-choices { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.demo-choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }
.demo-choice:has(input:checked) { border-color: var(--demo-accent); box-shadow: 0 0 0 2px var(--ring); }
.demo-choice:has(input:focus-visible) { outline: 2px solid var(--brand-600); outline-offset: 2px; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .15); }
.demo-check-row { min-height: 44px; }
.demo-quote-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border: 1px solid var(--border); border-left: 4px solid var(--demo-accent); border-radius: 8px; background: var(--surface-2); }
.demo-quote-head.corporate { background: color-mix(in srgb, var(--demo-accent) 8%, white); border-left-width: 6px; }
.demo-errlist { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.demo-errlist .btn { height: auto; min-height: 36px; padding: 4px 8px; white-space: normal; text-align: left; color: inherit; text-decoration: underline; }
.demo-warn { color: var(--warn); font-weight: 500; }
.field .err { font-size: 13px; }
.demo-summary dd { margin-bottom: 4px; }
.demo-wiz-nav { margin-top: 4px; }
.card-body .form-grid .field textarea { min-height: 84px; }
@media (max-width: 640px) {
  .demo-banner-actions .lbl-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .demo-banner-actions .lbl-short { display: inline; }
  .demo-wiz-nav .btn, .demo-onb form > .row .btn { flex: 1 1 auto; }
  .demo-choices { width: 100%; }
  .demo-choice { flex: 1 1 140px; }
  .demo-errlist .btn { min-height: 44px; }
  .demo-onb select { min-height: 44px; }
}

.demo-block .demo-block { margin-top: 12px; }
