/*
 * Apasis Material adapter
 *
 * The application injects resolved Design engine tokens into :root or an
 * apartment scope. This file provides the framework-neutral mobile shell.
 */

:root {
  --apasis-color-surface: #fbf8f2;
  --apasis-color-surface-container: #f1ece4;
  --apasis-color-surface-raised: #fffdf8;
  --apasis-color-ink: #1a2024;
  --apasis-color-ink-muted: #596268;
  --apasis-color-line: #d5cec4;
  --apasis-color-primary: #a95535;
  --apasis-color-on-primary: #ffffff;
  --apasis-color-primary-container: #ffdccf;
  --apasis-color-on-primary-container: #3d0f05;
  --apasis-color-success: #55705c;
  --apasis-color-info: #39748f;
  --apasis-color-warning: #a8732e;
  --apasis-color-danger: #a7463d;
  /* Windows: Segoe UI; macOS: system San Francisco; Linux: Ubuntu/Noto Sans. */
  --apasis-font-body: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Ubuntu", "Noto Sans", Arial, sans-serif;
  --apasis-font-display: "Segoe UI Display", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Ubuntu", "Noto Sans", Arial, sans-serif;
  --apasis-grid-unit: 8px;
  --apasis-space-unit: 4px;
  --apasis-radius-panel: 14px;
  --apasis-radius-control: 8px;
  --apasis-control-height: 48px;
  --apasis-touch-target: 48px;
  --apasis-focus-ring: 3px solid var(--apasis-color-info);
  --apasis-motion-duration: 180ms;
  --apasis-button-gap: 10px;
  --apasis-shell-top-mode: fixed;
  --apasis-shell-bottom-mode: fixed;
  --apasis-action-text-align: center;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--apasis-color-surface);
  color: var(--apasis-color-ink);
  font-family: var(--apasis-font-body);
  font-size: 16px;
  line-height: 1.5;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--apasis-color-surface);
}

html,
body { scrollbar-width: none; }

html::-webkit-scrollbar,
body::-webkit-scrollbar { width: 0; height: 0; display: none; }

button,
input,
select,
textarea {
  min-height: var(--apasis-touch-target);
  font: inherit;
  box-sizing: border-box;
}

button,
[role="button"],
a.apasis-action,
.apasis-screen-tabs a {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

input,
textarea,
select {
  user-select: text;
  -webkit-user-select: text;
}

.apasis-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.apasis-icon--small { width: 16px; height: 16px; }
.apasis-icon--large { width: 24px; height: 24px; }

.apasis-button,
.apasis-control,
.apasis-action--primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--apasis-button-gap);
  text-decoration: none;
  cursor: pointer;
  text-align: var(--apasis-action-text-align);
  text-transform: capitalize;
  box-sizing: border-box;
}

.apasis-button {
  min-height: var(--apasis-control-height);
  padding: 0 16px;
  border: 1px solid var(--apasis-color-line);
  border-radius: var(--apasis-radius-control);
  background: var(--apasis-color-surface-raised);
  color: var(--apasis-color-ink);
  font-weight: 600;
}
.apasis-button:hover { background: var(--apasis-color-surface-container); }
.apasis-button,
.apasis-control,
.apasis-action--primary { transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease; }
.apasis-control:hover,
.apasis-control:focus-visible,
.apasis-button--quiet:hover,
.apasis-button--quiet:focus-visible { border-color: var(--apasis-color-primary); background: var(--apasis-color-surface-container); color: var(--apasis-color-primary); transform: translateY(-1px); box-shadow: 0 3px 10px rgb(26 32 36 / 10%); }
.apasis-button--primary { border: 0; background: var(--apasis-color-primary); color: var(--apasis-color-on-primary); font-weight: 650; }
.apasis-button--primary:hover { background: color-mix(in srgb, var(--apasis-color-primary) 88%, var(--apasis-color-ink)); }
.apasis-button--secondary { border-color: var(--apasis-color-line); background: var(--apasis-color-surface-raised); color: var(--apasis-color-primary); }
.apasis-button--quiet { border: 1px solid transparent; background: transparent; color: var(--apasis-color-primary); }
.apasis-button--danger { border: 1px solid var(--apasis-color-danger); background: var(--apasis-color-surface-raised); color: var(--apasis-color-danger); }
.apasis-button--icon { width: var(--apasis-control-height); padding: 0; }
.apasis-button--toolbar { min-height:40px; padding:0 12px; border-color:var(--apasis-color-line); background:var(--apasis-color-surface-raised); color:var(--apasis-color-ink); font-size:.875rem; }
.apasis-button--compact { min-height:36px; padding:0 10px; gap:7px; font-size:.875rem; }
.apasis-icon-button { display:inline-grid; width:var(--apasis-touch-target); min-width:var(--apasis-touch-target); height:var(--apasis-touch-target); min-height:var(--apasis-touch-target); place-items:center; padding:0; border:1px solid transparent; border-radius:var(--apasis-radius-control); background:transparent; color:var(--apasis-color-ink-muted); cursor:pointer; }
.apasis-icon-button { position:relative; }
.apasis-icon-button > .apasis-badge { position:absolute; top:0; right:0; z-index:1; pointer-events:none; }
.apasis-icon-button:hover,.apasis-icon-button:focus-visible { border-color:var(--apasis-color-line); background:var(--apasis-color-surface-container); color:var(--apasis-color-ink); }
.apasis-icon-button--compact { width:40px; min-width:40px; height:40px; min-height:40px; }
.apasis-badge { display:inline-grid; min-width:20px; height:20px; place-items:center; padding:0 5px; border:2px solid var(--apasis-color-surface); border-radius:999px; background:var(--apasis-color-danger); color:#fff; font-size:.68rem; font-weight:800; line-height:1; }
.apasis-badge--info { background:var(--apasis-color-info); }
.apasis-badge--success { background:var(--apasis-color-success); }
.apasis-badge--warning { background:var(--apasis-color-warning); }
.apasis-button:disabled, .apasis-control:disabled { cursor: not-allowed; opacity: .55; }
@media (prefers-reduced-motion: reduce) { .apasis-button, .apasis-control, .apasis-action--primary { transition: none; } .apasis-control:hover, .apasis-control:focus-visible, .apasis-button--quiet:hover, .apasis-button--quiet:focus-visible, .apasis-action--primary:hover, .apasis-action--primary:focus-visible { transform: none; } }

.apasis-context-bar { display:flex; min-height:36px; align-items:center; justify-content:space-between; gap:12px; padding:4px 16px; background:var(--apasis-color-surface-container); border-bottom:1px solid var(--apasis-color-line); color:var(--apasis-color-ink-muted); font-size:.78rem; }
.apasis-taskbar { position:fixed; z-index:60; right:0; bottom:0; left:0; display:none; min-height:52px; align-items:center; gap:6px; padding:4px 12px; padding-bottom:calc(4px + env(safe-area-inset-bottom)); overflow-x:auto; background:var(--apasis-color-surface-container); border-top:1px solid var(--apasis-color-line); }
.apasis-taskbar.is-visible { display:flex; }
.apasis-taskbar__item { display:inline-flex; min-height:44px; flex:0 0 auto; align-items:center; gap:7px; padding:0 12px; border:1px solid transparent; border-radius:var(--apasis-radius-control); background:transparent; color:var(--apasis-color-ink-muted); white-space:nowrap; }
.apasis-taskbar__item.is-active { border-color:var(--apasis-color-line); background:var(--apasis-color-surface-raised); color:var(--apasis-color-ink); font-weight:650; }
.apasis-taskbar__dot { width:8px; height:8px; border-radius:50%; background:var(--apasis-apartment-color,var(--apasis-color-primary)); }
.apasis-window-layer { position:fixed; z-index:35; inset:0; pointer-events:none; }
.apasis-window { position:absolute; top:48px; left:50%; display:grid; width:min(680px,calc(100% - 16px)); max-height:calc(100dvh - 112px); grid-template-rows:40px minmax(0,1fr); transform:translateX(-50%); pointer-events:auto; background:var(--apasis-color-surface-raised); border:1px solid var(--apasis-color-line); border-radius:var(--apasis-radius-panel); box-shadow:0 18px 48px rgb(26 32 36 / 20%); overflow:hidden; }
.apasis-window[hidden] { display:none; }
.apasis-window.is-focused { box-shadow:0 22px 60px rgb(26 32 36 / 28%); }
.apasis-window__titlebar { display:flex; min-width:0; align-items:center; justify-content:space-between; gap:10px; padding:0 10px 0 14px; background:var(--apasis-color-surface-container); border-bottom:1px solid var(--apasis-color-line); }
.apasis-window__title { min-width:0; overflow:hidden; color:var(--apasis-color-ink); font-family:var(--apasis-font-display); font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.apasis-window__actions { display:flex; gap:6px; align-items:center; }
.apasis-window__actions button { display:inline-grid; width:24px; min-width:24px; height:24px; min-height:24px; place-items:center; padding:0; border:1px solid transparent; border-radius:50%; appearance:none; -webkit-appearance:none; background:var(--apasis-color-line); color:var(--apasis-color-ink); font:inherit; line-height:1; text-align:center; vertical-align:middle; transition:transform .14s ease, filter .14s ease, box-shadow .14s ease; }
.apasis-window__actions button[data-window-minimize] { order:1; background:#e9b94d; border-color:#c89424; color:#5d430d; }
.apasis-window__actions button[data-window-maximize] { order:2; background:#69b883; border-color:#398e5c; color:#164f2d; }
.apasis-window__actions button[data-window-close] { order:3; background:#e56b61; border-color:#c85048; color:#57201c; }
.apasis-window__actions button:hover, .apasis-window__actions button:focus-visible { transform:scale(1.08); filter:saturate(1.08); box-shadow:0 2px 6px rgb(26 32 36 / 20%); }
.apasis-window__actions .apasis-icon { width:11px; height:11px; stroke-width:2.2; }
.apasis-window__actions [data-window-close] .apasis-icon { width:12px; height:12px; stroke-width:2.3; }
.apasis-window__actions button:hover,.apasis-window__actions button:focus-visible { background:var(--apasis-color-surface-raised); color:var(--apasis-color-ink); }
.apasis-window__body { min-height:0; overflow:auto; padding:16px; }
.apasis-window__body h2 { margin-top:0; font-family:var(--apasis-font-display); }
.apasis-window__body form { display:grid; gap:12px; }
.apasis-window__body textarea,.apasis-window__body input { width:100%; min-height:48px; padding:10px 12px; border:1px solid var(--apasis-color-line); border-radius:var(--apasis-radius-control); background:var(--apasis-color-surface); color:var(--apasis-color-ink); font:inherit; }
.apasis-window__body textarea { min-height:120px; resize:vertical; }

.apasis-context-bar {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 16px;
  background: var(--apasis-color-surface-container);
  border-bottom: 1px solid var(--apasis-color-line);
  color: var(--apasis-color-ink-muted);
  font-size: .78rem;
}

.apasis-taskbar {
  position: fixed;
  z-index: 60;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  min-height: 52px;
  align-items: center;
  gap: 6px;
  padding: 4px 12px env(safe-area-inset-bottom);
  overflow-x: auto;
  background: var(--apasis-color-surface-container);
  border-top: 1px solid var(--apasis-color-line);
}
.apasis-taskbar.is-visible { display:flex; }

.apasis-taskbar__item {
  display: inline-flex;
   min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--apasis-radius-control);
  background: transparent;
  color: var(--apasis-color-ink-muted);
  white-space: nowrap;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  text-align: center;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.apasis-taskbar__item:hover, .apasis-taskbar__item:focus-visible { border-color: var(--apasis-color-line); background: var(--apasis-color-surface-raised); color: var(--apasis-color-ink); transform: translateY(-1px); }

.apasis-taskbar__item.is-active { border-color: var(--apasis-color-line); background: var(--apasis-color-surface-raised); color: var(--apasis-color-ink); font-weight: 650; }
.apasis-taskbar__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--apasis-apartment-color, var(--apasis-color-primary)); }
.apasis-taskbar__item:focus-visible { outline: 2px solid var(--apasis-color-primary); outline-offset: 2px; }
.apasis-window__titlebar { cursor: grab; user-select: none; }
.apasis-window__titlebar:active { cursor: grabbing; }
.apasis-window__actions button[data-window-maximize] { font-size: 1.15rem; line-height: 1; }
body.prototype-only .apasis-window.is-maximized { top: 72px; right: 8px; bottom: 60px; left: 8px; width: auto; max-height: none; transform: none; }
@media (prefers-reduced-motion: reduce) { .apasis-taskbar__item { transition: none; } .apasis-taskbar__item:hover, .apasis-taskbar__item:focus-visible { transform: none; } }
@media (max-width:600px) { .apasis-window { grid-template-rows:52px minmax(0,1fr); } .apasis-window__actions button { width:44px; min-width:44px; height:44px; min-height:44px; } .apasis-window__actions { gap:4px; } }

.apasis-window-layer { position: fixed; z-index: 35; inset: 0; pointer-events: none; }
.apasis-window { position: absolute; top: clamp(64px, 11vh, 112px); left: 50%; display: grid; width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 136px); grid-template-rows: 40px minmax(0, 1fr); transform: translateX(-50%); pointer-events: auto; background: var(--apasis-color-surface-raised); border: 1px solid var(--apasis-color-line); border-radius: var(--apasis-radius-panel); box-shadow: 0 18px 48px rgb(26 32 36 / 20%); overflow: hidden; }
.apasis-window[hidden] { display: none; }
.apasis-window.is-focused { box-shadow: 0 22px 60px rgb(26 32 36 / 28%); }
.apasis-window__titlebar { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px 0 14px; background: var(--apasis-color-surface-container); border-bottom: 1px solid var(--apasis-color-line); }
.apasis-window__title { min-width: 0; overflow: hidden; color: var(--apasis-color-ink); font-family: var(--apasis-font-display); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.apasis-window__actions { display: flex; gap: 6px; align-items: center; }
.apasis-window__actions button { display: inline-grid; width: 24px; min-width: 24px; height: 24px; min-height: 24px; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 50%; appearance: none; -webkit-appearance: none; background: var(--apasis-color-line); color: var(--apasis-color-ink); font: inherit; line-height: 1; text-align: center; vertical-align: middle; transition: transform .14s ease, filter .14s ease, box-shadow .14s ease; }
.apasis-window__actions button[data-window-minimize] { order: 1; background: #e9b94d; border-color: #c89424; color: #5d430d; }
.apasis-window__actions button[data-window-maximize] { order: 2; background: #69b883; border-color: #398e5c; color: #164f2d; }
.apasis-window__actions button[data-window-close] { order: 3; background: #e56b61; border-color: #c85048; color: #57201c; }
.apasis-window__actions button:hover, .apasis-window__actions button:focus-visible { transform: scale(1.08); filter: saturate(1.08); box-shadow: 0 2px 6px rgb(26 32 36 / 20%); }
.apasis-window__actions .apasis-icon { width: 11px; height: 11px; stroke-width: 2.2; }
.apasis-window__actions [data-window-close] .apasis-icon { width: 12px; height: 12px; stroke-width: 2.3; }
 .apasis-window__actions button:hover, .apasis-window__actions button:focus-visible { background: var(--apasis-color-surface-raised); color: var(--apasis-color-ink); }
 @media (max-width:600px) { .apasis-window { grid-template-rows:52px minmax(0,1fr); } .apasis-window__actions button { width:44px; min-width:44px; height:44px; min-height:44px; } .apasis-window__actions { gap:4px; } }
.apasis-window__body { min-height: 0; overflow: auto; padding: 20px; }
.apasis-window__body h2 { margin-top: 0; font-family: var(--apasis-font-display); }
.apasis-window__body form { display: grid; gap: 12px; }
.apasis-window__body textarea, .apasis-window__body input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--apasis-color-line); border-radius: var(--apasis-radius-control); background: var(--apasis-color-surface); color: var(--apasis-color-ink); font: inherit; }
.apasis-window__body textarea { min-height: 120px; resize: vertical; }
.prototype-integration-form { gap: 14px !important; }
.prototype-integration-form fieldset { display: grid; gap: 10px; margin: 0; padding: 14px; border: 1px solid var(--apasis-color-line); border-radius: var(--apasis-radius-panel); }
.prototype-integration-form legend { padding: 0 6px; color: var(--apasis-color-primary); font-family: var(--apasis-font-display); font-weight: 700; }
.prototype-integration-status, .prototype-integration-result { margin: 0; color: var(--apasis-color-ink-muted); font-size: .82rem; line-height: 1.45; }
.prototype-integration-result { padding: 10px 12px; border: 1px solid var(--apasis-color-line); border-radius: var(--apasis-radius-control); background: var(--apasis-color-primary-container); color: var(--apasis-color-on-primary-container); }
@media (max-width: 600px) { .apasis-window { top: 48px; width: calc(100% - 16px); max-height: calc(100dvh - 112px); } .apasis-window__body { padding: 16px; } }

button,
[role="button"],
a.apasis-action {
  min-width: var(--apasis-touch-target);
  min-height: var(--apasis-touch-target);
}

:focus-visible {
  outline: var(--apasis-focus-ring);
  outline-offset: 3px;
}

.apasis-shell {
  min-height: 100dvh;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

.apasis-app-bar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: var(--apasis-touch-target);
  align-items: center;
  justify-content: space-between;
  gap: calc(2 * var(--apasis-space-unit));
  padding: 8px 16px;
  background: color-mix(in srgb, var(--apasis-color-surface) 94%, var(--apasis-color-primary));
  border-bottom: 1px solid var(--apasis-color-line);
}

.apasis-app-bar__title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--apasis-color-ink);
  font-family: var(--apasis-font-display);
  font-size: 1.25rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apasis-app-bar__context {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: var(--apasis-color-ink-muted);
  font-size: 0.875rem;
}

.apasis-apartment-mark {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--apasis-apartment-color, var(--apasis-color-primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--apasis-apartment-color, var(--apasis-color-primary)) 18%, transparent);
}

.apasis-content {
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
  padding: 24px 0 32px;
}

.apasis-page-title {
  margin: 0 0 16px;
  font-family: var(--apasis-font-display);
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  line-height: 1.15;
}

.apasis-card {
  margin: 0 0 16px;
  padding: 16px;
  background: var(--apasis-color-surface-raised);
  border: 1px solid var(--apasis-color-line);
  border-radius: var(--apasis-radius-panel);
}

.apasis-ledger-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--apasis-color-surface-raised);
  border-top: 1px solid var(--apasis-color-line);
}

.apasis-ledger-list > li {
  display: grid;
  gap: 4px;
  min-height: var(--apasis-touch-target);
  padding: 12px 4px;
  border-bottom: 1px solid var(--apasis-color-line);
}

.apasis-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--apasis-button-gap);
  text-align: center;
  min-height: var(--apasis-control-height);
  padding: 0 16px;
  border: 1px solid var(--apasis-color-line);
  border-radius: var(--apasis-radius-control);
  background: var(--apasis-color-surface-raised);
  color: var(--apasis-color-ink);
}

/* Kart ve hızlı işlem grupları aynı üretim ölçüsünü kullanır; içerik taşmaz. */
.prototype-actions > .apasis-control,
.prototype-actions > .apasis-action--primary { width: 100%; min-width: 0; }
.prototype-card-title > .apasis-button { flex: 0 1 auto; min-width: 112px; }

/* Ikonlu metin butonunda ikon akistan cikar; metin kutunun gercek merkezinde kalir. */
.apasis-button:has(> .apasis-icon):not(.apasis-button--icon),
.apasis-control:has(> .apasis-icon),
.apasis-action--primary:has(> .apasis-icon) { position: relative; padding-inline: 42px; }
.apasis-button:has(> .apasis-icon):not(.apasis-button--icon) > .apasis-icon,
.apasis-control:has(> .apasis-icon) > .apasis-icon,
.apasis-action--primary:has(> .apasis-icon) > .apasis-icon { position: absolute; left: 14px; }

.apasis-action--primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--apasis-button-gap);
  text-align: center;
  min-height: var(--apasis-touch-target);
  padding: 0 20px;
  border: 0;
  border-radius: var(--apasis-radius-control);
  background: var(--apasis-color-primary);
  color: var(--apasis-color-on-primary);
  font-weight: 650;
}

.apasis-action--primary:hover,
.apasis-action--primary:focus-visible { background: color-mix(in srgb, var(--apasis-color-primary) 86%, var(--apasis-color-ink)); transform: translateY(-1px); box-shadow: 0 4px 12px rgb(26 32 36 / 16%); }

.apasis-status {
  display: inline-flex;
  min-width: 84px;
  justify-content: center;
  box-sizing: border-box;
  min-height: 32px;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 650;
}

.apasis-status--success { background: #dce9de; color: #24442b; }
.apasis-status--info { background: #d9eaf0; color: #164356; }
.apasis-status--warning { background: #f5e6c8; color: #5a3d0e; }
.apasis-status--danger { background: #f5dcd8; color: #5a1712; }

/* Aynı işlem grubundaki eylemler tek bir şekil ailesi kullanır. */
.prototype-actions .apasis-action--primary { border-radius: var(--apasis-radius-control); }
.prototype-ledger-row .apasis-status { min-width: 84px; }

.apasis-bottom-nav {
  display: none !important;
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 64px;
  padding: 4px 8px env(safe-area-inset-bottom);
  background: var(--apasis-color-surface-container);
  border-top: 1px solid var(--apasis-color-line);
}

.apasis-bottom-nav__item {
  display: grid;
  min-height: var(--apasis-touch-target);
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--apasis-color-ink-muted);
  font-size: 0.75rem;
}

.apasis-bottom-nav__item[aria-current="page"] {
  background: var(--apasis-color-primary-container);
  color: var(--apasis-color-on-primary-container);
  font-weight: 650;
}

.apasis-nav-rail { display: none; }

.apasis-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 600px) {
  .apasis-shell { padding-bottom: 60px; padding-left: 88px; }
  .apasis-taskbar { bottom:0; }
  .apasis-bottom-nav { display: none; }
  .apasis-nav-rail {
    position: fixed;
    z-index: 20;
    top: 0;
    bottom: 0;
    left: 0;
    display: grid;
    width: 72px;
    align-content: start;
    gap: 8px;
    padding: 16px 8px;
    background: var(--apasis-color-surface-container);
    border-right: 1px solid var(--apasis-color-line);
  }
}

@media (min-width: 840px) {
  .apasis-shell { padding-left: 232px; }
  .apasis-nav-rail { width: 216px; padding: 20px 16px; }
  .apasis-content { padding-top: 32px; }
  .apasis-card { padding: 24px; }
}

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

/* Sabit uygulama kabuğu: içerik iki çubuk arasında akar. */
.apasis-topbar { position:fixed; z-index:80; top:0; right:0; left:0; background:var(--apasis-color-surface); box-shadow:0 4px 16px rgb(26 32 36 / 10%); }
.apasis-topbar .apasis-app-bar { position:static; }
.apasis-screen-tabs { display:flex; min-height:48px; align-items:center; gap:4px; padding:4px 12px; overflow-x:auto; background:var(--apasis-color-surface-raised); border-top:1px solid var(--apasis-color-line); border-bottom:1px solid var(--apasis-color-line); }
.apasis-screen-tabs button,.apasis-screen-tabs a { display:inline-flex; min-height:40px; flex:0 0 auto; align-items:center; gap:7px; padding:0 14px; border:0; border-radius:999px; background:transparent; color:var(--apasis-color-ink-muted); text-decoration:none; white-space:nowrap; }
.apasis-screen-tabs button.is-active,.apasis-screen-tabs button[aria-current="page"],.apasis-screen-tabs a.is-active,.apasis-screen-tabs a[aria-current="page"] { background:var(--apasis-color-primary-container); color:var(--apasis-color-on-primary-container); font-weight:700; }
.apasis-shell { padding-top:148px; }
.apasis-window { top:164px; max-height:calc(100dvh - 280px); }
.apasis-topbar .apasis-app-bar { position:relative; }
.apasis-topbar .apasis-app-bar__title { position:absolute; left:50%; display:flex; align-items:center; gap:10px; max-width:42%; transform:translateX(-50%); }
.apasis-user-trigger { display:inline-flex; min-height:36px; align-items:center; gap:7px; padding:3px 8px 3px 4px; border:1px solid transparent; border-radius:999px; background:transparent; color:var(--apasis-color-ink); font-weight:650; }
.apasis-user-trigger[aria-expanded="true"],.apasis-user-trigger:hover { border-color:var(--apasis-color-line); background:var(--apasis-color-surface-raised); }
.apasis-user-avatar { display:inline-grid; width:28px; height:28px; place-items:center; border-radius:50%; background:var(--apasis-color-primary); color:var(--apasis-color-on-primary); font-size:.7rem; font-weight:800; }
.apasis-user-avatar--large { width:40px; height:40px; }
.apasis-user-menu { position:fixed; z-index:100; top:154px; right:16px; display:grid; width:min(340px,calc(100% - 24px)); gap:3px; padding:10px; border:1px solid var(--apasis-color-line); border-radius:var(--apasis-radius-panel); background:var(--apasis-color-surface-raised); box-shadow:0 18px 48px rgb(26 32 36 / 24%); }
.apasis-user-menu[hidden] { display:none; }
.apasis-user-menu__identity { display:flex; align-items:center; gap:10px; padding:8px 8px 12px; border-bottom:1px solid var(--apasis-color-line); }
.apasis-user-menu__identity div { display:grid; gap:1px; }
.apasis-user-menu__identity small { color:var(--apasis-color-ink-muted); }
.apasis-user-menu button { display:flex; min-height:44px; align-items:center; gap:10px; padding:8px 10px; border:0; border-radius:var(--apasis-radius-control); background:transparent; color:var(--apasis-color-ink); text-align:left; }
.apasis-user-menu button:hover,.apasis-user-menu button:focus-visible { background:var(--apasis-color-surface-container); }
.apasis-user-menu__section { display:grid; gap:8px; margin:4px 0; padding:10px; border-top:1px solid var(--apasis-color-line); border-bottom:1px solid var(--apasis-color-line); color:var(--apasis-color-ink-muted); font-size:.82rem; }
.apasis-user-menu__section label { display:flex; gap:8px; align-items:flex-start; }
.apasis-user-menu__section input { min-height:18px; accent-color:var(--apasis-color-primary); }
.apasis-user-menu__switch { width:34px; height:20px; margin-left:auto; border-radius:999px; background:var(--apasis-color-line); }
.apasis-user-menu__logout { color:var(--apasis-color-danger) !important; }
.apasis-settings-tabs { display:flex; gap:6px; margin:-4px 0 18px; padding-bottom:8px; border-bottom:1px solid var(--apasis-color-line); overflow-x:auto; }
.apasis-settings-tabs button { min-height:38px; padding:0 12px; border:0; border-radius:999px; background:transparent; color:var(--apasis-color-ink-muted); }
.apasis-settings-tabs button.is-active { background:var(--apasis-color-primary-container); color:var(--apasis-color-on-primary-container); font-weight:700; }
.apasis-theme-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:360px; overflow:auto; padding:2px; }
.apasis-theme-option { display:grid; grid-template-columns:36px 1fr; grid-template-rows:auto auto; align-items:center; gap:0 9px; min-height:58px; padding:8px; border:1px solid var(--apasis-color-line); border-radius:var(--apasis-radius-control); background:var(--apasis-color-surface-raised); color:var(--apasis-color-ink); text-align:left; cursor:pointer; }
.apasis-theme-option:hover,.apasis-theme-option:focus-visible { border-color:var(--apasis-color-info); background:var(--apasis-color-surface-container); }
.apasis-theme-option.is-active { border-color:var(--apasis-color-primary); box-shadow:inset 0 0 0 2px var(--apasis-color-primary-container); }
.apasis-theme-option__swatch { grid-row:1 / span 2; display:block; width:32px; height:32px; border:1px solid color-mix(in srgb,var(--theme-primary) 45%,#808080); border-radius:50%; background:linear-gradient(135deg,var(--theme-primary) 0 48%,var(--theme-surface) 48%); }
.apasis-theme-option strong { font-size:.86rem; line-height:1.2; }
.apasis-theme-option small { color:var(--apasis-color-ink-muted); font-size:.7rem; line-height:1.2; }
@media (max-width:600px) { .apasis-theme-options { grid-template-columns:1fr; } }
[data-apasis-theme="dark"] { --apasis-color-surface:#171615; --apasis-color-surface-container:#252321; --apasis-color-surface-raised:#302d2a; --apasis-color-ink:#f4eee7; --apasis-color-ink-muted:#c9c0b7; --apasis-color-line:#514a44; --apasis-color-primary-container:#6e3d2f; --apasis-color-on-primary-container:#ffe9df; }
@media (max-width: 600px) { .apasis-window { top:156px; max-height:calc(100dvh - 268px); } }
@media (min-width: 600px) { .apasis-nav-rail { top:148px; } }

/* Apasis kabuğu: alt alan yalnız küçültülen pencereleri park eder; navigasyon değildir. */
.apasis-shell { padding-left:0; padding-bottom:0; }
.apasis-nav-rail { display:none; }
.apasis-content { min-height:calc(100dvh - 140px); text-align:center; }
.apasis-content > * { text-align:left; }
.apasis-content .finance-hero,
.apasis-content .finance-scope,
.apasis-content .finance-hero > div { text-align:center; }

.apasis-topbar--single { display:flex; min-height:64px; align-items:center; gap:12px; padding:0 16px; overflow-x:auto; }
.apasis-topbar--single .apasis-context-bar { display:contents; }
.apasis-topbar--single .apasis-context-bar > span:first-child { white-space:nowrap; }
.apasis-topbar--single .apasis-context-bar > span:first-child { order:1; }
.apasis-topbar--single .apasis-context-bar > span:last-child { order:4; margin-left:auto; }
.apasis-topbar--single .apasis-app-bar { position:static; flex:0 0 0; width:0; min-width:0; padding:0; border:0; background:transparent; }
.apasis-topbar--single .apasis-app-bar { order:2; }
.apasis-topbar--single .apasis-app-bar__title { top:50%; z-index:1; max-width:28vw; transform:translate(-50%,-50%); }
.apasis-topbar--single .apasis-app-bar__context { display:none; }
.apasis-topbar--single .apasis-screen-tabs { flex:0 0 auto; min-height:0; padding:0; border:0; background:transparent; }
.apasis-topbar--single .apasis-screen-tabs { order:3; }
.apasis-topbar--single .apasis-screen-tabs button,.apasis-topbar--single .apasis-screen-tabs a { min-height:42px; }
.apasis-topbar--single + .apasis-nav-rail { display:none; }
.apasis-topbar--single ~ .apasis-content { padding-top:24px; }
.apasis-topbar--single ~ .apasis-window-layer .apasis-window { top:80px; max-height:calc(100dvh - 196px); }
.apasis-shell:has(.apasis-topbar--single) { padding-top:64px; }
.apasis-notification-trigger { position:relative; display:inline-grid; width:40px; min-width:40px; height:40px; min-height:40px; place-items:center; padding:0; border:0; border-radius:50%; background:transparent; color:var(--apasis-color-primary); }
.apasis-notification-trigger:hover,.apasis-notification-trigger:focus-visible { background:var(--apasis-color-surface-raised); }
.apasis-notification-trigger .apasis-notification-badge { position:absolute; top:0; right:0; }
.apasis-notification-badge { position:absolute; top:1px; right:0; display:grid; min-width:18px; height:18px; place-items:center; padding:0 4px; border:2px solid var(--apasis-color-surface); border-radius:999px; background:var(--apasis-color-danger); color:#fff; font-size:.68rem; font-weight:800; line-height:1; }
.apasis-topbar--single { min-height:54px; gap:8px; padding:0 12px; scrollbar-width:none; }
.apasis-topbar--single::-webkit-scrollbar { display:none; }
.apasis-topbar--single .apasis-screen-tabs { gap:2px; }
.apasis-topbar--single .apasis-screen-tabs button,.apasis-topbar--single .apasis-screen-tabs a { min-height:36px; padding:0 10px; gap:5px; font-size:.9rem; }
.apasis-topbar--single .apasis-user-trigger { min-height:34px; padding-right:5px; font-size:.9rem; }
.apasis-topbar--single .apasis-notification-trigger { width:34px; min-width:34px; height:34px; min-height:34px; }
.apasis-topbar--single .apasis-user-avatar { width:25px; height:25px; }
.apasis-topbar--single .apasis-app-bar__title { max-width:24vw; font-size:1.05rem; }
.apasis-topbar--single .apasis-app-bar__title { pointer-events:none; }
.apasis-shell:has(.apasis-topbar--single) { padding-top:54px; }
.apasis-topbar--single ~ .apasis-user-menu { top:62px; }
.apasis-topbar--single ~ .apasis-window-layer .apasis-window { top:70px; max-height:calc(100dvh - 180px); }
.apasis-content { padding-top:16px; }
.apasis-card { padding:16px; }
.apasis-shell:has(.apasis-topbar--single) { padding-left:0; }

/* Yönetim kabuğunda alt alan mobil navigasyon değildir. Yalnızca açılmış
   çalışma pencereleri Windows tipi görev çubuğunda park edilir. */
body.prototype-only .apasis-shell { padding-bottom:0; }
body.prototype-only .apasis-taskbar { bottom:0; }
body.prototype-only .apasis-taskbar.is-visible { display:flex; }
body.prototype-only .prototype-context-actions { display:flex; flex:0 0 auto; align-items:center; gap:4px; }
body.prototype-only .apasis-topbar--single { overflow-x:auto; overflow-y:hidden; }
body.prototype-only .apasis-topbar--single .apasis-context-bar { flex:1 1 auto; min-width:0; }
body.prototype-only .apasis-topbar--single .apasis-context-bar > span:first-child { flex:0 0 auto; }
body.prototype-only .apasis-topbar--single .apasis-context-bar > span:last-child { flex:0 0 auto; margin-left:auto; }
body.prototype-only .apasis-topbar--single .apasis-screen-tabs { flex:0 0 auto; }
body.prototype-only h2,
body.prototype-only .prototype-eyebrow { text-transform:capitalize; }
.apasis-reminders { position:fixed; z-index:25; top:78px; left:18px; display:block; width:176px; height:230px; }
.apasis-reminder { position:absolute; left:0; display:grid; width:176px; gap:5px; min-height:92px; height:auto; padding:14px 13px; border:1px solid rgb(26 32 36 / 10%); border-radius:3px 3px 12px 3px; color:#3d3028; box-shadow:2px 5px 12px rgb(26 32 36 / 12%); cursor:pointer; transition:transform 140ms ease, box-shadow 140ms ease, filter 140ms ease; }
.apasis-reminder:nth-child(1) { top:0; z-index:1; transform:rotate(-1.2deg); }
.apasis-reminder:nth-child(2) { top:46px; z-index:2; transform:rotate(1.5deg); }
.apasis-reminder:nth-child(3) { top:92px; z-index:3; transform:rotate(-.6deg); }
.apasis-reminder.is-raised { z-index:10 !important; transform:translateY(-24px) rotate(0deg); box-shadow:3px 12px 20px rgb(26 32 36 / 20%); }
.apasis-reminder__check { position:absolute; top:9px; right:9px; display:grid; width:22px; height:22px; place-items:center; cursor:pointer; }
.apasis-reminder__check input { position:absolute; opacity:0; width:1px; height:1px; }
.apasis-reminder__check span { display:block; width:16px; height:16px; border:2px solid currentColor; border-radius:4px; background:rgb(255 255 255 / 35%); }
.apasis-reminder__check input:checked + span { border-color:#55705c; background:#55705c; box-shadow:inset 0 0 0 3px rgb(255 255 255 / 75%); }
.apasis-reminder.is-complete { filter:saturate(.45); opacity:.68; }
.apasis-reminder.is-complete strong,.apasis-reminder.is-complete > span { text-decoration:line-through; }
.apasis-reminder strong { font-family:var(--apasis-font-display); font-size:.95rem; }
.apasis-reminder span { color:#66564d; font-size:.78rem; }
.apasis-reminder--peach { background:#ffd9c8; }
.apasis-reminder--yellow { background:#f8e7a8; }
.apasis-reminder--blue { background:#cfe8ed; }
@media (min-width: 840px) { .apasis-content { padding-top:20px; } .apasis-card { padding:18px; } }
@media (max-width: 1199px) { .apasis-reminders { display:none; } }
@media (max-width: 600px) { .apasis-reminders { position:static; display:flex; width:auto; height:82px; margin:10px 16px 0; overflow-x:auto; } .apasis-reminder { position:relative; top:auto !important; left:auto; min-width:160px; min-height:70px; } .apasis-reminder.is-raised { transform:translateY(-8px) rotate(0deg); } }

/* Mesaj Merkezi ve aktarım kuyrukları: sabit kabuk içinde açılan uygulama parçaları. */
.prototype-message-layout { display:grid; min-height:440px; grid-template-columns:220px minmax(0,1fr); border:1px solid var(--apasis-color-line); border-radius:var(--apasis-radius-control); overflow:hidden; }
.prototype-message-list { display:grid; align-content:start; gap:0; background:var(--apasis-color-surface-container); border-right:1px solid var(--apasis-color-line); }
.prototype-message-chat { display:grid; min-width:0; grid-template-rows:auto minmax(0,1fr) auto; background:var(--apasis-color-surface); }
.prototype-message-list button { display:grid; gap:2px; padding:12px; border:0; border-bottom:1px solid var(--apasis-color-line); background:transparent; color:var(--apasis-color-ink); text-align:left; cursor:pointer; }
.prototype-message-list button.is-active,.prototype-message-list button:hover { background:var(--apasis-color-surface-raised); }
.prototype-message-list small,.prototype-message-meta { color:var(--apasis-color-ink-muted); font-size:.75rem; }
.prototype-message-chat__head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:12px 16px; border-bottom:1px solid var(--apasis-color-line); background:var(--apasis-color-surface-raised); }
.prototype-message-stream { display:grid; align-content:start; gap:10px; padding:16px; overflow:auto; }
.prototype-message-bubble { max-width:78%; padding:10px 12px; border-radius:12px 12px 12px 3px; background:var(--apasis-color-surface-container); }
.prototype-message-bubble.is-own { justify-self:end; border-radius:12px 12px 3px 12px; background:var(--apasis-color-primary-container); color:var(--apasis-color-on-primary-container); }
.prototype-message-compose { display:flex; gap:8px; padding:10px; border-top:1px solid var(--apasis-color-line); background:var(--apasis-color-surface-raised); }
.prototype-message-compose input { flex:1; min-width:0; min-height:40px; padding:8px 10px; border:1px solid var(--apasis-color-line); border-radius:var(--apasis-radius-control); background:var(--apasis-color-surface); color:var(--apasis-color-ink); }
.prototype-transfer-list { display:grid; gap:10px; margin:0; padding:0; list-style:none; }
.prototype-transfer-list li { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; border:1px solid var(--apasis-color-line); border-radius:var(--apasis-radius-control); background:var(--apasis-color-surface); }
.prototype-transfer-list li span:first-child { display:grid; gap:2px; }
.prototype-transfer-list small { color:var(--apasis-color-ink-muted); }
@media (max-width:600px) { .prototype-message-layout { grid-template-columns:1fr; } .prototype-message-list { grid-template-columns:repeat(3,minmax(0,1fr)); border-right:0; border-bottom:1px solid var(--apasis-color-line); } .prototype-message-list button { min-width:0; padding:9px; } .prototype-message-list small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } }
