/* Bileşen stilleri Tailwind'in "components" katmanındadır: Tailwind'in temel stillerini (base) ezer, yardımcı
   sınıflar (utilities, ör. lg:hidden) da bunları ezer. Katman sırası burada da bildirilir ki dosyaların
   yükleme sırası sonucu değiştirmesin (katmansız CSS her katmanı ezeceği için bu dosya katmansız bırakılmaz). */
@layer theme, base, components, utilities;
@layer components {

/* Temel davranışlar. Bileşenler aşağıda; sayfa görünümleri yerleşimi belirler. */
  html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: 7rem; }
  body { font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-feature-settings: 'tnum' 0; -webkit-tap-highlight-color: transparent; }
  a, button, label, summary, select, input { touch-action: manipulation; }
  .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
  .safe-b { padding-bottom: env(safe-area-inset-bottom); }
  .safe-b-pad { padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
  .scroll-x { -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .scroll-x::-webkit-scrollbar { display: none; }
  input[type="date"] { -webkit-appearance: none; appearance: none; }
  @media (max-width: 1023px), (pointer: coarse) { input[type="date"] { min-height: 3rem; } }
  input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
  /* iOS 16px altındaki alanlarda sayfayı yakınlaştırır */
  input, select, textarea { font-size: max(16px, 1em); }
  details > summary::-webkit-details-marker { display: none; }
  [data-when].is-hidden { display: none; }
  .field-invalid { border-color: var(--color-rose-600, #87382e) !important; }

/* Ortak yüzey, ölçü ve renk sistemi. Renkler assets/src/app.src.css → @theme'den CSS değişkeni olarak gelir (assets/app.min.css). */
:root {
  --ui-bg: var(--color-slate-100, #eceeef);
  --ui-surface: #fff;
  --ui-line: var(--color-slate-300, #c9cfd2);
  --ui-line-soft: var(--color-slate-200, #dee2e4);
  --ui-field-line: var(--color-slate-400, #a7b0b5);
  --ui-muted: var(--color-slate-600, #5f6a70);
  --ui-text: var(--color-slate-900, #1d2327);
  --ui-hover: var(--color-slate-50, #f5f6f6);
  --ui-sidebar: var(--color-ink-900, #0e181a);
  --ui-sidebar-text: var(--color-slate-300, #c9cfd2);
  --ui-radius: 10px;
}
body.app { background: var(--ui-bg); color: var(--ui-text); }
/* Klavye odağı: bağlantı, düğme ve seçim kutularında dış halka. Yazı alanlarında halka yok;
   kenarlık koyulaşıp kalınlaşır (kenarlık + ayrık halka iki çizgi gibi görünüyordu). */
:where(a, button, summary, input[type=checkbox], input[type=radio]):focus-visible {
  outline: 3px solid var(--color-brand-500, #1f8076);
  outline-offset: 3px;
}
:where(input:not([type=checkbox]):not([type=radio]), select, textarea):focus { outline: none; }
.ui-surface, .ui-panel, .ui-stat {
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
}
.ui-panel { overflow: hidden; min-width: 0; }
.ui-panel__header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; min-height: 56px; border-bottom: 1px solid var(--ui-line);
}
.ui-panel__header h2 { font-size: 14px; font-weight: 600; color: var(--ui-text); }
.ui-panel__header > a, .ui-panel__header > button {
  display: inline-flex; align-items: center; min-height: 40px; flex-shrink: 0;
}
.ui-stat { display: block; padding: 16px; min-width: 0; }
.ui-stat__label { font-size: 12px; font-weight: 500; color: var(--ui-muted); }
.ui-stat__value { margin-top: 8px; font-size: clamp(19px, 2vw, 25px); font-weight: 600; letter-spacing: -.035em; }
.ui-stat__detail { margin-top: 5px; font-size: 12px; line-height: 1.5; color: var(--ui-muted); }
.ui-stat--link { transition: border-color .15s, background .15s; }
.ui-stat--link:hover { border-color: var(--color-brand-400); background: var(--ui-hover); }
.ui-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 16px; border: 1px solid transparent;
  border-radius: 8px; font-size: 14px; line-height: 1.35; font-weight: 600;
  text-align: center; transition: background .15s, border-color .15s;
}
.ui-button:disabled { opacity: .6; cursor: wait; }
.ui-button--primary { background: var(--color-brand-600, #176b63); color: #fff; }
.ui-button--primary:hover { background: var(--color-brand-700, #135851); }
.ui-button--ghost { background: #fff; border-color: var(--ui-line); color: var(--ui-text); }
.ui-button--ghost:hover { background: var(--ui-bg); }
.ui-button--danger { background: #fff; color: var(--color-rose-700); border-color: var(--color-rose-200); }
.ui-button--danger:hover { background: var(--color-rose-50); }
.ui-button--dark { background: var(--color-ink-900); color: #fff; }
.app .ui-field {
  display: block; width: 100%; min-width: 0; min-height: 48px;
  border: 1px solid var(--ui-field-line); border-radius: 8px; background-color: #fff;
  padding: 11px 13px; font-size: 16px; line-height: 1.5; color: var(--ui-text);
}
.app select.ui-field { padding-right: 36px; }
.app .ui-field:focus { border-color: var(--color-brand-600); box-shadow: inset 0 0 0 1px var(--color-brand-600); }
.ui-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--color-slate-800); }
.ui-date-chip { min-height: 44px; padding: 8px 12px; border-radius: 8px; background: var(--ui-bg); font-size: 12px; font-weight: 500; color: var(--ui-muted); }
.ui-date-chip:hover { background: var(--color-slate-200); }
.ui-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ui-filter { margin-bottom: 16px; padding: 12px 16px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); background: #fff; }
.ui-filter summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-size: 14px; cursor: pointer; }
.ui-filter summary::after { content: '+'; color: var(--ui-muted); }
.ui-filter details[open] summary::after { content: '−'; }
.ui-filter__fields { display: grid; gap: 12px; align-items: end; grid-template-columns: repeat(2,minmax(0,1fr)); padding-top: 12px; }
.ui-filter__fields > * { min-width: 0; }
.ui-filter__fields .ui-actions { grid-column: 1 / -1; }
.ui-metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.ui-muted { color: var(--ui-muted); font-size: 13px; line-height: 1.6; }
.ui-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-brand-700); font-size: 13px; font-weight: 600; }
.ui-stack { display: grid; gap: 16px; min-width: 0; align-content: start; }
.ui-detail-grid { display: grid; gap: 16px; margin-top: 20px; align-items: start; }
.ui-empty { padding: 28px 16px; font-size: 13px; color: var(--ui-muted); text-align: center; }
.ui-action-card { padding: 20px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); background: #fff; }
@media (max-width: 1023px) {
  .ui-action-wrap--fixed { position: fixed; bottom: 0; inset-inline: 0; z-index: 30; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--ui-line); }
  .ui-action-wrap--fixed .ui-action-card { padding: 0; border: 0; border-radius: 0; }
}
.ui-record { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 64px; border-bottom: 1px solid var(--ui-line-soft); }
.ui-record:last-child { border-bottom: 0; }
a.ui-record:hover { background: var(--ui-hover); }
.ui-record__body { flex: 1; min-width: 0; }
.ui-record__title { display: block; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.ui-record__meta { display: block; margin-top: 4px; font-size: 12px; color: var(--ui-muted); }
.ui-record__amount { flex-shrink: 0; text-align: right; font-size: 14px; font-weight: 600; }
.ui-detail-grid > section, #gundem { scroll-margin-top: 132px; }

/* Uygulama kabuğu. Mobilde proje seçimi ayrı satırda; başlık daralmaz. */
.app-frame { min-height: 100%; }
.app-sidebar { display: none; }
.app-workspace { min-width: 0; }
.app-header { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--ui-line); padding-top: env(safe-area-inset-top); }
.app-header__row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; }
.app-header__title { flex: 1; min-width: 0; }
.app-header__title h1 { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-icon-button { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 8px; color: var(--ui-muted); }
.app-icon-button:hover { background: var(--ui-bg); }
/* Proje adı başlığın altında küçük bir düğme; seçici ayrı satır / kutu kaplamaz. */
.app-header__project { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 24px; margin-top: 1px; font-size: 13px; font-weight: 500; color: var(--color-brand-700); }
.app-header__row { min-height: 60px; }
.app-sheet { width: 100%; max-width: 100%; margin: auto 0 0; padding: 0; border: 0; border-radius: 14px 14px 0 0; background: #fff; color: var(--ui-text); max-height: 80vh; }
.app-sheet::backdrop { background: rgba(8,16,18,.5); }
.app-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 4px 20px; }
.app-sheet__head h2 { font-size: 15px; font-weight: 600; }
.app-sheet__list { overflow-y: auto; max-height: calc(80vh - 60px); padding: 0 8px max(12px, env(safe-area-inset-bottom)); }
.app-sheet__item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 12px; border-radius: 8px; text-align: left; font-size: 15px; }
.app-sheet__item:active, .app-sheet__item:hover { background: var(--ui-hover); }
.app-sheet__item[aria-current] { background: var(--color-brand-50); color: var(--color-brand-800); font-weight: 600; }
.app-main { width: 100%; max-width: 1600px; margin: auto; padding: 20px 16px calc(100px + max(0px, env(safe-area-inset-bottom) - 14px)); }
.app-main--focus { padding-bottom: calc(116px + env(safe-area-inset-bottom)); }
/* Alt boşluk: iPhone'un ev çubuğu payı (34px) olduğu gibi eklenince ana ekran uygulamasında sekmeler
   tarayıcıdakinden belirgin yukarıda duruyordu. Çizgi en altta ~13px'lik alanda; 20px pay yeter. */
.app-bottom-nav { position: fixed; bottom: 0; inset-inline: 0; z-index: 30; background: #fff; border-top: 1px solid var(--ui-line); padding-bottom: max(0px, env(safe-area-inset-bottom) - 14px); }
.app-bottom-nav__items { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); }
.app-bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 62px; font-size: 11px; font-weight: 500; color: var(--ui-muted); }
/* Seçili sekme: üstte kısa petrol çizgi + koyu renk; tam dolgu yok (sakin, kurumsal). */
.app-bottom-nav a[aria-current] { color: var(--color-brand-700); font-weight: 600; }
.app-bottom-nav a[aria-current]:not(.app-bottom-nav__entry)::before { content: ''; position: absolute; top: -1px; left: 50%; width: 28px; height: 3px; margin-left: -14px; border-radius: 0 0 3px 3px; background: var(--color-brand-600); }
.app-bottom-nav a:active { background: var(--ui-hover); }
/* Kayıt: diğer sekmelerden belirgin büyük, hafif yukarı taşan tek dolu düğme. */
.app-bottom-nav__entry { gap: 3px; }
.app-bottom-nav__create { display: grid; place-items: center; height: 46px; width: 54px; margin-top: -10px; border-radius: 14px; background: var(--color-brand-600); color: #fff; box-shadow: 0 2px 6px rgba(23,107,99,.35); }
.app-bottom-nav__entry:active .app-bottom-nav__create { background: var(--color-brand-700); }
.app-bottom-nav__entry span:last-child { color: var(--color-brand-700); font-weight: 600; }
.app-logo { display: grid; place-items: center; height: 32px; width: 32px; border-radius: 8px; background: var(--color-brand-600); color: #fff; font-weight: 700; flex-shrink: 0; }
/* Canlı arama. Masaüstü: kutunun altında açılan panel. Telefon: tam ekran, üstte arama satırı. */
.search-pop { position: absolute; top: calc(100% + 6px); right: 0; width: min(560px, calc(100vw - 32px)); max-height: min(70vh, 640px); overflow-y: auto; z-index: 40; padding: 10px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); background: var(--ui-bg); box-shadow: 0 12px 32px rgba(8,16,18,.18); }
.search-sheet { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--ui-bg); color: var(--ui-text); }
.search-sheet[open] { display: flex; flex-direction: column; }
.search-sheet::backdrop { background: var(--ui-bg); }
.search-sheet__bar { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: #fff; border-bottom: 1px solid var(--ui-line); }
.search-sheet__body { flex: 1; overflow-y: auto; padding: 12px 16px max(16px, env(safe-area-inset-bottom)); }
.app-skip { position: fixed; z-index: 100; left: 16px; top: -80px; padding: 12px; background: #fff; }
.app-skip:focus { top: 8px; }

/* Oturum dışı ekranlar (giriş, kurulum): koyu antrasit zemin, ortada beyaz kart. */
body.shell { background: var(--color-ink-900, #0e181a); color: var(--ui-text); }
.shell__main { width: 100%; margin: 0 auto; padding: max(40px, env(safe-area-inset-top)) 16px 32px; }
.shell__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.shell__product { color: #fff; font-size: 17px; font-weight: 600; line-height: 1.25; }
.shell__firm { color: var(--color-slate-400); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell__card { background: #fff; border-radius: var(--ui-radius); padding: 20px; }
.shell__card + .shell__card { margin-top: 12px; }
.shell__card h1 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.shell__card h2 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.shell__lead { margin-top: 4px; font-size: 13.5px; color: var(--ui-muted); line-height: 1.55; }
.shell__foot { margin-top: 20px; text-align: center; font-size: 11.5px; color: var(--color-slate-500); }
.shell__error { margin-bottom: 14px; padding: 10px 12px; border-radius: 8px; background: var(--color-rose-50); border: 1px solid var(--color-rose-200); color: var(--color-rose-800); font-size: 13.5px; }
.check-list { display: grid; gap: 2px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: 13.5px; border-bottom: 1px solid var(--ui-line-soft); }
.check:last-child { border-bottom: 0; }
.check__dot { flex-shrink: 0; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: var(--color-slate-300); }
.check--ok .check__dot { background: var(--color-emerald-600); }
.check--warn .check__dot { background: var(--color-amber-500); }
.check--fail .check__dot { background: var(--color-rose-600); }
.check__label { font-weight: 500; }
.check__detail { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ui-muted); line-height: 1.5; }
.check__detail code { font-size: 11.5px; background: var(--ui-hover); padding: 1px 4px; border-radius: 4px; }
@media (min-width: 640px) { .shell__main { padding-top: 64px; } .shell__card { padding: 24px; } }

/* Yarım kalan kayıt önerisi (taslak). */
.draft-offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 14px; border: 1px solid var(--color-brand-200); border-radius: var(--ui-radius); background: var(--color-brand-50); }
.draft-offer__title { font-size: 14px; font-weight: 600; color: var(--color-brand-900); }
.draft-offer__meta { margin-top: 2px; font-size: 12.5px; color: var(--color-brand-800); overflow-wrap: anywhere; }
.draft-offer__actions { display: flex; gap: 8px; }

/* Örnek veri şeridi: başlığın altında ince, hardal; işi bölmez. */
.demo-strip { padding: 7px 16px; background: var(--color-amber-50); border-bottom: 1px solid var(--color-amber-200); color: var(--color-amber-900); font-size: 12.5px; }
.demo-strip a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
@media (min-width: 1024px) { .demo-strip { padding-inline: 28px; } }

/* Kayıt seçimi: iş türleri aynı bileşenden, bağlamı taşıyan açık etiketlerle. */
.entry-groups { display: grid; gap: 24px; }
.entry-group__title { margin-bottom: 10px; font-size: 13px; color: var(--ui-muted); font-weight: 600; }
.entry-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.entry-option { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); background: #fff; min-width: 0; }
.entry-option:hover { border-color: var(--color-brand-400); background: var(--ui-hover); }
.entry-option__icon { display: grid; place-items: center; height: 36px; width: 36px; flex-shrink: 0; background: var(--color-brand-50); color: var(--color-brand-700); border-radius: 8px; }
.entry-option__title { display: block; font-size: 14px; font-weight: 600; }
.entry-option__hint { display: block; margin-top: 5px; font-size: 12px; color: var(--ui-muted); line-height: 1.5; }
.entry-context { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; margin-bottom: 20px; background: var(--color-brand-50); border: 1px solid var(--color-brand-200); border-radius: var(--ui-radius); font-size: 14px; }
.entry-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 24px; align-items: start; }
.entry-layout > *, .entry-option > span { min-width: 0; }
.entry-option__hint { overflow-wrap: anywhere; }
.context-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.company-identity { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.company-identity__name { font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.025em; }
.company-contact { padding: 16px; }
.company-contact dl { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 12px; font-size: 13px; }
.company-contact dt { color: var(--ui-muted); }
.company-contact dd { overflow-wrap: anywhere; }
.statement { width: 100%; border-collapse: collapse; font-size: 13px; }
.statement th { color: var(--ui-muted); font-size: 12px; font-weight: 500; background: var(--ui-hover); }
.statement th, .statement td { padding: 12px 16px; border-bottom: 1px solid var(--ui-line-soft); text-align: left; }
.statement .statement__money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.statement__row { position: relative; }
.statement__row:hover { background: var(--ui-hover); }
.statement__link { font-weight: 600; color: var(--color-brand-700); }
/* Satırın tamamı kaydı açar (liste kuralı: satıra dokun). */
.statement__link::after { content: ''; position: absolute; inset: 0; }
.statement__balance-label--same { visibility: hidden; }
.statement__description { display: block; font-size: 12px; color: var(--ui-muted); margin-top: 2px; overflow-wrap: anywhere; }
.statement__balance-label { display: block; color: var(--ui-muted); font-size: 11px; font-weight: 400; }
.statement__footer { padding: 14px 16px; border-top: 1px solid var(--ui-line); }
.statement__project { display: none; }
@media (max-width: 639px) {
  .entry-option { flex-direction: column; gap: 10px; padding: 14px; }
  .statement thead { display: none; }
  .statement, .statement tbody { display: block; }
  .statement tr { display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 14px 16px; gap: 6px 12px; border-bottom: 1px solid var(--ui-line); }
  .statement td { padding: 0; border: 0; }
  .statement__date { grid-column: 1 / -1; font-size: 11px; color: var(--ui-muted); }
  .statement td.statement__balance { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 6px; }
  .statement__balance-label { font-size: 12px; }
  .statement__balance-label--same { visibility: visible; }
}
@media (min-width: 768px) {
  .app-main { padding-inline: 24px; }
  .ui-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
  .context-actions { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (min-width: 1280px) {
  .ui-detail-grid { grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr); }
  .company-sidebar { grid-column: 2; grid-row: 1 / span 2; }
  .company-statement { grid-column: 1; grid-row: 2; }
  /* Yan sütun iki satırı kaplar; fazla yükseklik ilk satıra (notlar) değil ekstrenin altına gitsin. */
  .ui-detail-grid--company { grid-template-rows: auto 1fr; }
}
@media (min-width: 1024px) {
  .ui-filter summary { display: none; }
  .ui-filter__fields { padding-top: 0; grid-template-columns: repeat(var(--filter-cols), minmax(0,1fr)) auto; }
  .ui-filter .ui-actions { flex-wrap: nowrap; }
  .ui-filter .ui-filter__fields > * { grid-column: auto; }
  .ui-filter__fields .ui-actions { grid-column: auto; }
  .app-sidebar { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 224px; background: var(--ui-sidebar); color: var(--ui-sidebar-text); }
  .app-workspace { padding-left: 224px; }
  /* Kenar menüsü: kaydırma gerekirse ince, koyu zemine uyan çubuk; fare menüdeyken görünür. Kısa ekranda (dizüstü)
     satırlar sıkışır ki çoğu zaman hiç kaydırma gerekmesin (layout.php: [@media(max-height:860px)] sınıfları). */
  .app-sidebar__nav { scrollbar-width: thin; scrollbar-color: transparent transparent; }
  .app-sidebar__nav:hover { scrollbar-color: rgb(255 255 255 / .18) transparent; }
  .app-sidebar__nav::-webkit-scrollbar { width: 6px; }
  .app-sidebar__nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
  .app-sidebar__nav:hover::-webkit-scrollbar-thumb { background: rgb(255 255 255 / .18); }
  .app-header { display: flex; align-items: center; padding-inline: 24px; }
  .app-header__row { flex: 1; min-width: 0; padding: 0; min-height: 68px; }
  .app-header__project:hover { color: var(--color-brand-800); text-decoration: underline; text-underline-offset: 3px; }
  .app-sheet { width: 440px; margin: 12vh auto auto; border-radius: 12px; box-shadow: 0 20px 50px rgba(8,16,18,.25); }
  .app-sheet__list { padding-bottom: 12px; }
  .app-main { padding: 28px 28px 48px; }
  .ui-action-card { position: sticky; top: 92px; }
  .app-bottom-nav { display: none; }
  .entry-layout { grid-template-columns: minmax(0,1.5fr) minmax(300px,1fr); }
  .statement__project { display: table-cell; }
}
/* Fareli masaüstünde liste tablo olur; sütunlar ui_rows() içinde --row-cols ile verilir. */
.ui-rows__grid { display: none; }
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .ui-rows__grid { display: grid; grid-template-columns: var(--row-cols); align-items: center; gap: 16px; }
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .ui-button { min-height: 40px; padding-block: 8px; }
  .ui-date-chip { min-height: 32px; padding-block: 6px; }
  .app .ui-field { min-height: 40px; padding-block: 8px; font-size: 14px; }
}
/* ------------------------------------------------------------ grafikler (Chart.php) */
.chart { container-type: inline-size; padding: 12px 16px 12px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 10px; font-size: 11.5px; color: var(--color-slate-600); }
.chart-legend--inset { padding: 2px 16px 0; margin-bottom: 4px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-key { display: inline-block; background: var(--c); }
.chart-key--bar { width: 10px; height: 10px; border-radius: 2px; }
.chart-key--line { width: 14px; height: 2px; border-radius: 1px; }
.chart-plot, .chart-axis { position: relative; margin-left: 50px; }
.chart-plot--end { margin-right: 54px; }
.chart-area { position: absolute; inset: 0; }
.chart-area svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-tick { position: absolute; left: -50px; width: 44px; white-space: nowrap; text-align: right; transform: translateY(-50%); font-size: 10.5px; color: var(--color-slate-500); font-variant-numeric: tabular-nums; pointer-events: none; }
.chart-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff; transform: translate(-50%, -50%); pointer-events: none; }
.chart-end { position: absolute; left: 100%; margin-left: 9px; transform: translateY(-50%); font-size: 11px; font-weight: 600; color: var(--color-slate-700); white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.chart-ref { position: absolute; left: 4px; transform: translateY(-100%); padding-bottom: 2px; font-size: 10.5px; color: var(--color-slate-600); pointer-events: none; }
.chart-hit { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.chart-hit:hover, .chart-hit.is-active { background: rgba(14, 24, 26, .05); }
.chart-axis { height: 22px; }
.chart-axis > div { position: absolute; inset: 0; }
.chart-axis span { position: absolute; top: 6px; transform: translateX(-50%); font-size: 10.5px; color: var(--color-slate-500); white-space: nowrap; }
.chart-axis span.is-warn { color: var(--color-rose-700); font-weight: 600; }
@container (max-width: 560px) { .chart-axis span.is-minor { display: none; } }
.chart-tipbox { position: fixed; z-index: 90; max-width: 260px; padding: 6px 9px; border-radius: 8px; background: var(--color-ink-900); color: #fff; font-size: 12px; line-height: 1.35; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.chart-bars { padding: 4px 16px 10px; }
.chart-bars li { padding: 7px 0; }
.chart-bars__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; }
.chart-bars__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-slate-800); }
.chart-bars__value { flex-shrink: 0; font-weight: 600; color: var(--color-slate-900); font-variant-numeric: tabular-nums; }
.chart-bars__value small { margin-left: 2px; font-weight: 400; font-size: 11px; color: var(--color-slate-500); }
.chart-bars__track { margin-top: 5px; height: 8px; border-radius: 999px; background: var(--color-slate-100); overflow: hidden; }
.chart-bars__track > div { height: 100%; border-radius: 999px; }
.chart-bars__track--frame { height: 4px; background: var(--color-slate-200); }
.chart-bars__pair { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.chart-bars__pair > div { height: 8px; min-width: 2px; border-radius: 0 4px 4px 0; }
.chart-bars__pair span { font-size: 11px; color: var(--color-slate-600); font-variant-numeric: tabular-nums; }
.chart-bars__note { margin-top: 3px; font-size: 11.5px; color: var(--color-slate-500); }
.chart-insight { margin: 0 16px; padding: 9px 12px; border-radius: 10px; background: var(--color-slate-50); font-size: 12.5px; color: var(--color-slate-700); }
.chart-insight b { color: var(--color-slate-900); }
.chart-insight.is-warn { background: var(--color-amber-50); color: #5a4510; }
.chart-insight.is-bad { background: var(--color-rose-50); color: var(--color-rose-700); }
/* ------------------------------------------------------------ takvim */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-grid--head > div { padding: 8px 10px; border-bottom: 1px solid var(--color-slate-100); background: var(--color-slate-50); font-size: 11.5px; font-weight: 600; color: var(--color-slate-500); }
.cal-day { display: flex; flex-direction: column; gap: 1px; min-width: 0; min-height: 116px; padding: 6px 6px 8px; border-right: 1px solid var(--color-slate-100); border-bottom: 1px solid var(--color-slate-100); }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.is-weekend { background: #fafbfb; }
.cal-day.is-outside { background: var(--color-slate-50); }
.cal-day.is-outside .cal-day__num, .cal-day.is-outside .cal-ev { opacity: .45; }
.cal-day.is-holiday { background: var(--color-rose-50); }
.cal-day__head { display: flex; align-items: center; gap: 6px; min-width: 0; margin-bottom: 2px; }
.cal-day__num { display: inline-grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--color-slate-700); }
.cal-day.is-today .cal-day__num { background: var(--color-brand-600); color: #fff; }
.cal-day__holiday { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; font-weight: 500; color: var(--color-rose-700); }
.cal-ev { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 2px 4px; border-radius: 6px; font-size: 11.5px; color: var(--color-slate-800); }
.cal-ev:hover { background: rgba(14, 24, 26, .05); }
.cal-ev .num { font-size: 11px; }
.cal-more { padding: 0 4px; font-size: 11px; color: var(--color-slate-500); }
.cal-dot { display: inline-block; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--c); vertical-align: middle; }
.cal-dot--ring { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }

/* ------------------------------------------------------------ izleyici (salt okunur rol)
   Sunucu her yazma isteğini zaten reddeder (public/index.php); bu kural, elden kaçan bir yazma formunu
   (ekle, takip edildi, kur gir…) da ekrandan kaldırır. Proje seçici, çıkış ve kilitli kayıt formu kalır. */
.is-viewer form[method="post"]:not([data-logout]):not([data-entry-form]):not([action*="projects/switch"]):not([action*="projects.switch"]) { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; }
  .chart-hit, .chart-tipbox, .app-sidebar, .app-bottom-nav, .app-skip, #outbox-banner, .print\:hidden, [data-confirm], button, header a { display: none !important; }
  button[data-print-keep] { display: inline-flex !important; } /* içerik taşıyan düğme (ör. rapor satır başlığı) çıktıda kalır */
  header { position: static !important; border: 0 !important; }
  main { padding: 0 !important; max-width: none !important; }
  .shadow-card { box-shadow: none !important; }
  /* Bölümler sayfa arasında bölünebilir: bütün bölümü bölmeden tutmak, sayfadan uzun bölümü yeni sayfaya itip
     önceki sayfayı (ör. yalnız başlık) boş bırakıyordu. Bölünmeyen birimler satır, grafik, kart ve özet kutusudur. */
  section, .rounded-2xl { border-color: #cbd5e1 !important; }
  .ui-panel__header { break-after: avoid; }
  .chart, .chart-bars li, .chart-insight, li, .cal-week { break-inside: avoid; }
  [data-print-date] { display: block !important; }
  .app-workspace { padding-left: 0; }
  .app-header { position: static; padding: 0; }
  .app-project, .context-actions { display: none; }
  .ui-detail-grid { display: block; }
  .cal-day { min-height: 48px; padding-block: 2px 3px; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ui-panel, .ui-surface, .ui-stat { box-shadow: none; }
  .ui-stat { break-inside: avoid; padding: 10px 12px; }
  .ui-stat__value { margin-top: 4px; font-size: 18px; }
  .ui-stat__detail { margin-top: 2px; }
  .overflow-x-auto, .scroll-x { overflow: visible !important; } /* geniş tablo kaydırma çubuğuyla kesilmesin */
  table { font-size: 11.5px; }
  th, td { padding-left: 6px !important; padding-right: 6px !important; }
  td.pl-10 { padding-left: 24px !important; } /* rapordaki cari alt satırları girintili kalsın */
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  .statement thead { display: table-header-group; }
  .statement { display: table; }
  .statement tbody { display: table-row-group; }
  .statement tr { display: table-row; }
  .statement td { display: table-cell; padding: 8px; }
  /* Proje sütunu ekranda yalnız geniş ekranda açılır; çıktıda başlığı da hücresi de görünsün (başlık gizli kalıp
     hücre basılınca Tutar / Bakiye başlıkları bir sütun kayıyordu), satır altındaki proje tekrarı gizlensin. */
  .statement .statement__project { display: table-cell; }
  .statement .statement__what .lg\:hidden { display: none; }
  .ui-link { min-height: 0; }
  /* Cari çıktısı ekstreye odaklansın: içi boş yan paneller ("görüşme notu yok", "bekleyen evrak yok") basılmaz. */
  .ui-detail-grid--company .ui-panel:not(.company-statement):has(> .ui-empty) { display: none; }
}

}
