/* Pronimos KOBİ Yüzü — Paraşüt "Güncel Durum" Birebir Önyüz & AI Katmanı */

/* ==========================================================================
   1. KOBİ Yüzü Koyu Antrasit Sol Menü (data-workspace="kobi")
   ========================================================================== */

:root[data-workspace="kobi"] .fs-shell {
  grid-template-columns: 220px minmax(0, 1fr);
  transition: grid-template-columns 150ms ease;
}

:root[data-workspace="kobi"][data-sidebar-collapsed="true"] .fs-shell {
  grid-template-columns: 60px minmax(0, 1fr);
}

:root[data-workspace="kobi"] .fs-rail {
  background: #353432;
  border-right: 1px solid #262523;
  color: #d6d4d0;
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
  overflow-y: auto;
}

:root[data-workspace="kobi"] .fs-rail-seal {
  width: 100%;
  height: 54px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border-bottom: 1px solid #474643;
}

:root[data-workspace="kobi"][data-sidebar-collapsed="true"] .fs-rail-seal {
  justify-content: center;
  padding: 10px 0;
}

:root[data-workspace="kobi"] .fs-rail-brand-text {
  display: inline-block;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

:root[data-workspace="kobi"][data-sidebar-collapsed="true"] .fs-rail-brand-text {
  display: none;
}

:root[data-workspace="kobi"] .fs-rail-nav {
  gap: 0;
  padding: 6px 0;
  flex: 1 1 auto;
}

:root[data-workspace="kobi"] .fs-rail-btn {
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 11px;
  border-radius: 0;
  border: 0;
  border-left: 3px solid transparent;
  padding: 11px 16px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d6d4d0;
  text-align: left;
  width: 100%;
}

:root[data-workspace="kobi"] .fs-rail-btn:hover {
  background: #2e2d2b;
  color: #ffffff;
}

:root[data-workspace="kobi"] .fs-rail-btn[aria-selected="true"] {
  background: #2a2927;
  color: #ffffff;
  border-left-color: #de7763;
}

:root[data-workspace="kobi"] .fs-rail-btn .fs-rail-legacy-label {
  display: none;
}

:root[data-workspace="kobi"] .fs-rail-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  opacity: 0.85;
}

:root[data-workspace="kobi"] .fs-rail-btn[aria-selected="true"] .fs-rail-icon {
  opacity: 1;
}

:root[data-workspace="kobi"] .fs-rail-text {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:root[data-workspace="kobi"] .fs-rail-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: #de7763;
  color: #ffffff;
  letter-spacing: 0.04em;
}

:root[data-workspace="kobi"] .fs-rail-badge-new {
  background: #55b895;
}

:root[data-workspace="kobi"] .fs-rail-caret {
  font-size: 10px;
  opacity: 0.6;
}

:root[data-workspace="kobi"] .fs-rail-sep {
  height: 1px;
  background: #474643;
  margin: 8px 0;
}

:root[data-workspace="kobi"][data-sidebar-collapsed="true"] .fs-rail-btn {
  justify-content: center;
  padding: 12px 0;
}

:root[data-workspace="kobi"][data-sidebar-collapsed="true"] .fs-rail-text,
:root[data-workspace="kobi"][data-sidebar-collapsed="true"] .fs-rail-badge,
:root[data-workspace="kobi"][data-sidebar-collapsed="true"] .fs-rail-caret {
  display: none;
}

:root[data-workspace="kobi"] .fs-rail-controls {
  padding: 10px 12px 14px;
  border-top: 1px solid #474643;
  gap: 6px;
}

:root[data-workspace="kobi"] .fs-ctrl-mini {
  background: #2a2927;
  color: #d6d4d0;
  border: 1px solid #474643;
}

:root[data-workspace="kobi"] .fs-ctrl-mini:hover {
  border-color: #de7763;
  color: #ffffff;
}

:root[data-workspace="kobi"][data-sidebar-collapsed="true"] .fs-rail-controls {
  display: none;
}

:root[data-workspace="kobi"] .fs-rail-btn[hidden],
:root[data-workspace="smmm"] .fs-rail-btn[hidden] {
  display: none !important;
}

/* SMMM modunda KOBİ-only sol menü öğelerini gizle */
:root[data-workspace="smmm"] .fs-kobi-only-rail,
:root[data-workspace="smmm"] .fs-rail-brand-text,
:root[data-workspace="smmm"] .fs-rail-btn .fs-rail-icon,
:root[data-workspace="smmm"] .fs-rail-btn .fs-rail-text,
:root[data-workspace="smmm"] .fs-rail-btn .fs-rail-caret,
:root[data-workspace="smmm"] .fs-rail-btn .fs-rail-badge {
  display: none !important;
}

/* KOBİ "Güncel Durum" görünümünde sıcak gri arka plan */
:root[data-workspace="kobi"] .fs-main-col {
  background: #ecebe9;
}

/* ==========================================================================
   2. Güncel Durum Ana Sayfa İskeleti (.gd-page)
   ========================================================================== */

.gd-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #3d3c3a;
  padding-bottom: 64px;
}

.gd-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gd-title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  color: #3d3c3a;
  letter-spacing: -0.01em;
}

.gd-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.gd-pill-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  background: #ffffff;
  transition: background-color 120ms ease, transform 120ms ease;
}

.gd-pill-ai {
  border: 1.5px solid #55b895;
  color: #2f8b6b;
}

.gd-pill-ai:hover {
  background: #eef9f5;
}

.gd-pill-smmm {
  border: 1.5px solid #6b68c7;
  color: #4f4cb0;
}

.gd-pill-smmm:hover {
  background: #f2f2fc;
}

.gd-company-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 8px;
}

.gd-company-meta {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.25;
}

.gd-company-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #3d3c3a;
}

.gd-company-sub {
  font-size: 11px;
  color: #7c7a76;
}

.gd-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2b2a28;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  letter-spacing: 0.04em;
}

/* 2 Sütunlu Ana Yerleşim: Sol Kartlar + Sağ Zaman Çizelgesi */
.gd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 276px;
  gap: 18px;
  align-items: start;
}

.gd-cards-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ==========================================================================
   3. Paraşüt Birebir Kartlar (.gd-card)
   ========================================================================== */

.gd-card {
  background: #ffffff;
  border: 1px solid #e2e0dc;
  border-radius: 4px;
  overflow: hidden;
}

.gd-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid #eceae6;
}

.gd-card-title-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #4a90b8;
  cursor: pointer;
}

.gd-card-title-link:hover {
  text-decoration: underline;
}

.gd-card-helper-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: 12.5px;
  color: #8c8a85;
  cursor: pointer;
}

.gd-card-helper-link:hover {
  color: #4a90b8;
  text-decoration: underline;
}

.gd-card-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 225px;
}

/* 3'lü Halka Grafik Alanı */
.gd-donuts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 16px 20px;
  align-items: center;
}

.gd-donut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.gd-donut-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #7d7b76;
  text-transform: uppercase;
}

.gd-donut-wrap {
  position: relative;
  width: 136px;
  height: 136px;
  display: grid;
  place-items: center;
}

.gd-donut-svg {
  width: 136px;
  height: 136px;
  display: block;
}

.gd-donut-center {
  position: absolute;
  inset: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.gd-donut-amount {
  font-variant-numeric: tabular-nums;
  font-size: 16.5px;
  font-weight: 700;
  color: #3d3c3a;
  line-height: 1.15;
}

.gd-donut-amount.is-danger {
  color: #de7763;
}

.gd-donut-cents {
  font-size: 11.5px;
  font-weight: 600;
}

.gd-donut-empty-text {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #7d7b76;
  margin-top: 4px;
}

/* Sağ İstatistik Kutuları (%26 alan) */
.gd-side-stats {
  border-left: 1px solid #eceae6;
  display: flex;
  flex-direction: column;
}

.gd-side-stat {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.gd-side-stat + .gd-side-stat {
  border-top: 1px solid #eceae6;
}

.gd-side-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f0efec;
  color: #8c8a85;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
}

.gd-side-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gd-side-val {
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  font-weight: 700;
  color: #3d3c3a;
  line-height: 1.15;
}

.gd-side-val .gd-donut-cents {
  font-size: 12px;
}

.gd-side-desc {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #7d7b76;
  text-transform: uppercase;
  line-height: 1.3;
}

.gd-side-sub {
  font-size: 10px;
  color: #9b9994;
}

.gd-inline-action {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 2px 0 0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #4a90b8;
  cursor: pointer;
  text-align: left;
}

.gd-inline-action:hover {
  text-decoration: underline;
}

/* ==========================================================================
   4. Kart 3: Bankaya Bağlı Hesaplarınız + AI Eşleştirme
   ========================================================================== */

.gd-bank-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gd-bank-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #f7f6f4;
  border: 1px solid #eceae6;
  border-radius: 4px;
}

.gd-bank-total-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #7d7b76;
  text-transform: uppercase;
}

.gd-bank-total-val {
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 700;
  color: #2f8b6b;
}

.gd-bank-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.gd-bank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #eceae6;
  border-radius: 4px;
  background: #ffffff;
}

.gd-bank-name {
  font-size: 13px;
  font-weight: 600;
  color: #3d3c3a;
}

.gd-bank-sync {
  font-size: 11px;
  color: #8c8a85;
}

.gd-bank-bal {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
  color: #3d3c3a;
  white-space: nowrap;
}

.gd-ai-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #eef9f5;
  border: 1px solid #bfe6d7;
  border-radius: 4px;
  font-size: 12.5px;
}

.gd-ai-strip-btn {
  appearance: none;
  border: 1px solid #55b895;
  background: #55b895;
  color: #ffffff;
  border-radius: 4px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.gd-ai-strip-btn:hover:not(:disabled) {
  background: #429e7d;
}

.gd-ai-strip-btn:disabled {
  background: #d8ece4;
  border-color: #bfe6d7;
  color: #2f8b6b;
  cursor: default;
}

/* ==========================================================================
   5. Kart 4: Önümüzdeki 12 Haftanın Nakit Akışı
   ========================================================================== */

.gd-cashflow-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gd-cashflow-svg {
  width: 100%;
  height: 210px;
  display: block;
}

.gd-cashflow-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: #7d7b76;
}

.gd-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.gd-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gd-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

/* ==========================================================================
   6. Sağ Sütun: Zaman Çizelgesi (.gd-timeline)
   ========================================================================== */

.gd-timeline {
  background: #f4f3f1;
  border: 1px solid #e2e0dc;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gd-tl-upcoming,
.gd-tl-overdue,
.gd-tl-history {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gd-tl-item {
  position: relative;
  padding: 11px 14px 11px 32px;
  font-size: 12px;
  line-height: 1.35;
}

.gd-tl-item::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(125, 123, 118, 0.35);
}

.gd-tl-node {
  position: absolute;
  left: 11.5px;
  top: 13px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f4f3f1;
  border: 2px solid #9b9994;
}

.gd-tl-when {
  font-size: 11px;
  color: #7d7b76;
}

.gd-tl-desc {
  color: #3d3c3a;
  font-weight: 500;
}

.gd-tl-today {
  background: #55b895;
  color: #ffffff;
  padding: 11px 14px 11px 32px;
  position: relative;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.gd-tl-today::before {
  content: "";
  position: absolute;
  left: 11.5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #55b895;
}

.gd-tl-overdue {
  background: #de7763;
  color: #ffffff;
}

.gd-tl-overdue .gd-tl-item::before {
  background: rgba(255, 255, 255, 0.32);
}

.gd-tl-overdue .gd-tl-node {
  background: rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.85);
  color: #ffffff;
  font-size: 8px;
  font-weight: 700;
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  left: 10.5px;
}

.gd-tl-overdue .gd-tl-when {
  color: rgba(255, 255, 255, 0.86);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.gd-tl-overdue .gd-tl-desc {
  color: #ffffff;
}

.gd-tl-more-btn,
.gd-tl-history-btn {
  appearance: none;
  width: 100%;
  border: 0;
  text-align: left;
  padding: 11px 14px 11px 32px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  position: relative;
}

.gd-tl-more-btn {
  background: #d76b57;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.gd-tl-more-btn:hover {
  background: #cb5f4b;
}

.gd-tl-history-btn {
  background: #eceae6;
  color: #6b6965;
  border-top: 1px solid #dfddd8;
}

.gd-tl-history-btn:hover {
  background: #e3e1dc;
}

.gd-tl-history {
  background: #ffffff;
  border-top: 1px solid #eceae6;
}

.gd-tl-ai-tag {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  background: #eef9f5;
  color: #2f8b6b;
}

/* ==========================================================================
   7. Alt-Orta Yüzen "+ Hızlı İşlemler" Popover Menüsü
   ========================================================================== */

.gd-quick-fab {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #2b2a28;
  color: #ffffff;
  padding: 11px 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gd-quick-fab:hover,
.gd-quick-fab[aria-expanded="true"] {
  background: #1f1e1d;
}

[popover]:has(> [focusgroup~="menu"]) {
  position-area: block-start center;
  position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
  inset: auto;
  margin-bottom: 10px;
  padding: 6px;
  border: 1px solid #dfddd8;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  min-width: 240px;
}

.gd-quick-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gd-quick-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #3d3c3a;
  text-align: left;
  padding: 9px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gd-quick-menu button:hover,
.gd-quick-menu button:focus-visible {
  background: #eef9f5;
  color: #1f5f49;
  outline: none;
}

.gd-quick-menu .gd-qm-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #55b895;
  color: #ffffff;
}

@media (prefers-reduced-motion: no-preference) {
  [popover]:has(> [focusgroup~="menu"]) {
    opacity: 0;
    translate: 0 0.25rem;
    transition: opacity, translate, display, overlay;
    transition-duration: 0.14s;
    transition-behavior: allow-discrete;
  }

  [popover]:has(> [focusgroup~="menu"]):popover-open {
    opacity: 1;
    translate: 0 0;
    transition-duration: 0.1s;
    @starting-style {
      opacity: 0;
      translate: 0 0.25rem;
    }
  }
}

/* ==========================================================================
   8. Responsive Kırılma Noktaları
   ========================================================================== */

@media (max-width: 1080px) {
  .gd-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  :root[data-workspace="kobi"] .fs-shell,
  :root[data-workspace="kobi"][data-sidebar-collapsed="true"] .fs-shell {
    grid-template-columns: 1fr;
  }
  :root[data-workspace="kobi"] .fs-rail-btn {
    width: auto;
    padding: 8px 10px;
  }
  :root[data-workspace="kobi"] .fs-rail-sep {
    display: none;
  }
}

@media (max-width: 760px) {
  .gd-card-split {
    grid-template-columns: 1fr;
  }
  .gd-side-stats {
    border-left: 0;
    border-top: 1px solid #eceae6;
    flex-direction: row;
  }
  .gd-side-stat + .gd-side-stat {
    border-top: 0;
    border-left: 1px solid #eceae6;
  }
  .gd-donuts-grid {
    grid-template-columns: 1fr;
  }
}
