
/* ==========================================================================
   1. TEMEL DEĞİŞKENLER (TASARIM TOKEN'LARI)
   Açık, kurumsal, göz yormayan bir palet. Koyu tema yok.
   ========================================================================== */
:root{
  --bg:#F4F7FA;
  --surface:#FFFFFF;
  --surface-alt:#F0F4F8;
  --border:#E2E8F0;
  --border-soft:#EDF1F5;
  --text:#1E2A38;
  --text-muted:#64748B;
  --text-faint:#94A3B8;

  --primary:#2F6690;
  --primary-dark:#204A69;
  --primary-light:#E8F1F8;
  --primary-line:#C7DCEC;

  --green:#3F8F68;
  --green-light:#E7F5EE;
  --amber:#B07A22;
  --amber-light:#FBF1DE;
  --red:#B0504A;
  --red-light:#FBEAEA;
  --purple:#6E5CA6;
  --purple-light:#EFECF9;
  --slate:#5B6B7C;
  --slate-light:#EEF2F5;

  --radius-sm:6px;
  --radius:10px;
  --radius-lg:14px;
  --shadow-sm:0 1px 2px rgba(30,42,56,0.05);
  --shadow:0 2px 8px rgba(30,42,56,0.06);
  --sidebar-w:264px;
  --topbar-h:64px;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  font-size:14px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{margin:0;font-weight:600;letter-spacing:-0.01em;}
p{margin:0;}
button{font-family:inherit;cursor:pointer;}
input,select,textarea{font-family:inherit;font-size:13px;}
a{color:inherit;text-decoration:none;}
::selection{background:var(--primary-line);}

/* ==========================================================================
   2. SAYFA İSKELETİ — SOL MENÜ + ÜST BAR + İÇERİK
   ========================================================================== */
.app{display:flex;min-height:100vh;}

/* --- Sol Menü --- */
.sidebar{
  width:var(--sidebar-w);
  background:var(--surface);
  border-right:1px solid var(--border);
  position:fixed;
  top:0;left:0;bottom:0;
  display:flex;flex-direction:column;
  z-index:40;
  transition:transform .2s ease;
}
.sidebar-brand{
  height:var(--topbar-h);
  display:flex;align-items:center;gap:10px;
  padding:0 20px;
  border-bottom:1px solid var(--border);
  flex-shrink:0;
}
.sidebar-collapse-btn{
  margin-left:auto;background:none;border:1px solid var(--border);border-radius:var(--radius-sm);
  width:26px;height:26px;display:flex;align-items:center;justify-content:center;
  color:var(--text-faint);flex-shrink:0;cursor:pointer;transition:color .15s ease;
}
.sidebar-collapse-btn:hover{color:var(--primary);border-color:var(--primary-line);}
.sidebar-collapse-btn .ic{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;transition:transform .2s ease;}
.sidebar.collapsed{width:68px;}
.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-collapse-btn,
.sidebar.collapsed .nav-group-label,
.sidebar.collapsed .nav-item span{display:none;}
.sidebar.collapsed .sidebar-brand{padding:0;justify-content:center;}
.sidebar.collapsed .nav-item{justify-content:center;padding:9px 0;}
.sidebar.collapsed ~ .main{margin-left:68px;}
.sidebar-edge-toggle{
  display:none;position:fixed;top:18px;z-index:41;
  background:var(--surface);border:1px solid var(--border);border-radius:50%;
  width:26px;height:26px;align-items:center;justify-content:center;color:var(--text-faint);
  cursor:pointer;box-shadow:var(--shadow-sm);transition:left .2s ease,color .15s ease;
}
.sidebar-edge-toggle:hover{color:var(--primary);}
.sidebar-edge-toggle .ic{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;transform:rotate(180deg);}
@media (min-width:901px){
  .sidebar-edge-toggle{display:flex; left:calc(var(--sidebar-w) - 13px);}
  .sidebar.collapsed ~ .sidebar-edge-toggle{left:55px;}
  .sidebar.collapsed ~ .sidebar-edge-toggle .ic{transform:rotate(0deg);}
}
.brand-mark{
  width:32px;height:32px;border-radius:8px;
  background:var(--primary);
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-weight:700;font-size:13px;letter-spacing:0.02em;
  flex-shrink:0;
}
.brand-text{display:flex;flex-direction:column;line-height:1.15;}
.brand-text strong{font-size:13.5px;color:var(--text);}
.brand-text span{font-size:11px;color:var(--text-faint);}

.nav-scroll{overflow-y:auto;padding:14px 10px 20px;flex:1;}
.nav-group-label{
  font-size:10.5px;text-transform:uppercase;letter-spacing:0.06em;
  color:var(--text-faint);padding:14px 12px 6px;font-weight:600;
}

/* ==========================================================================
   SIDEBAR — 2 seviyeli accordion navigasyon (v97)
   ========================================================================== */
.nav-group{margin-bottom:2px;}

.nav-group-header{
  display:flex;align-items:center;gap:10px;
  padding:9px 12px;border-radius:var(--radius-sm);
  cursor:pointer;color:var(--slate);
  font-size:13px;font-weight:600;
  border:1px solid transparent;user-select:none;
  transition:background .12s ease, color .12s ease;
}
.nav-group-header:hover{background:var(--surface-alt);color:var(--text);}
.nav-group.open > .nav-group-header{color:var(--text);background:var(--surface-alt);}

.nav-group-icon{
  width:28px;height:28px;border-radius:7px;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.nav-group-icon .ic{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;}
.nav-group-icon--purple{background:var(--purple-light);color:var(--purple);}
.nav-group-icon--amber{background:var(--amber-light);color:var(--amber);}
.nav-group-icon--green{background:var(--green-light);color:var(--green);}
.nav-group-icon--slate{background:var(--slate-light);color:var(--slate);}
.nav-group-icon--blue{background:var(--primary-light);color:var(--primary);}

.nav-group-label-text{flex:1;font-size:13px;font-weight:600;color:inherit;}

.nav-group-chevron{
  width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;
  transition:transform .2s ease;color:var(--text-faint);flex-shrink:0;
}
.nav-group.open > .nav-group-header .nav-group-chevron{transform:rotate(90deg);}

.nav-group-body{display:none;padding-left:10px;margin-top:2px;}
.nav-group.open > .nav-group-body{display:block;}

.nav-sub-item{
  display:flex;align-items:center;gap:10px;
  padding:7px 12px;border-radius:var(--radius-sm);
  color:var(--slate);font-size:13px;font-weight:500;
  cursor:pointer;border:1px solid transparent;margin-bottom:1px;
}
.nav-sub-item:hover{background:var(--surface-alt);color:var(--text);}
.nav-sub-item.active{
  background:var(--primary-light);color:var(--primary-dark);
  border-color:var(--primary-line);
}
.nav-sub-item .ic{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.6;flex-shrink:0;}

.sidebar.collapsed .nav-group-label-text,
.sidebar.collapsed .nav-group-chevron,
.sidebar.collapsed .nav-sub-item span{display:none;}
.sidebar.collapsed .nav-group-header{justify-content:center;padding:9px 0;}
.sidebar.collapsed .nav-group-body{padding-left:0;}
.sidebar.collapsed .nav-sub-item{justify-content:center;padding:7px 0;}
.sidebar.collapsed .nav-group-icon{width:24px;height:24px;border-radius:6px;}

.nav-group.has-active > .nav-group-header{color:var(--primary-dark);}
.nav-group.has-active > .nav-group-header .nav-group-icon{
  background:var(--primary-light);color:var(--primary);
}
.nav-item{
  display:flex;align-items:center;gap:11px;
  padding:9px 12px;border-radius:var(--radius-sm);
  color:var(--slate);font-size:13.5px;font-weight:500;
  cursor:pointer;position:relative;
  border:1px solid transparent;
  margin-bottom:2px;
}
.nav-item:hover{background:var(--surface-alt);color:var(--text);}
.nav-item.active{background:var(--primary-light);color:var(--primary-dark);border-color:var(--primary-line);}
.nav-item .ic{width:17px;height:17px;flex-shrink:0;stroke:currentColor;fill:none;stroke-width:1.6;}
.nav-item .num{
  margin-left:auto;font-size:10px;color:var(--text-faint);
  font-variant-numeric:tabular-nums;
}
.nav-item.active .num{color:var(--primary);}

/* --- Üst Bar --- */
.main{margin-left:var(--sidebar-w);flex:1;min-width:0;display:flex;flex-direction:column;}
.topbar{
  height:var(--topbar-h);
  background:var(--surface);
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;
  padding:0 24px;gap:16px;
  position:sticky;top:0;z-index:30;
}
.menu-toggle{display:none;background:none;border:1px solid var(--border);border-radius:var(--radius-sm);width:34px;height:34px;align-items:center;justify-content:center;color:var(--slate);}
.topbar-title{font-size:15.5px;font-weight:600;}
.topbar-sub{font-size:12px;color:var(--text-faint);margin-left:2px;}
.search-box{
  margin-left:auto;
  display:flex;align-items:center;gap:8px;
  background:var(--surface-alt);border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:0 10px;height:36px;width:280px;
}
.search-box .ic{width:15px;height:15px;stroke:var(--text-faint);fill:none;stroke-width:1.8;flex-shrink:0;}
.search-box input{border:none;background:transparent;outline:none;width:100%;color:var(--text);}
.search-kbd-hint{font-size:10.5px;color:var(--text-faint);background:var(--surface);border:1px solid var(--border);border-radius:5px;padding:1px 6px;flex-shrink:0;}
.topbar-actions{display:flex;align-items:center;gap:14px;}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.role-badge-select{
  font-size:11.5px;font-weight:600;color:var(--primary);background:var(--primary-light);
  border:1px solid var(--border);border-radius:20px;padding:5px 10px;cursor:pointer;
}

/* Global arama / komut paleti (v101) */
.cmdk-overlay{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:400;display:none;align-items:flex-start;justify-content:center;padding-top:90px;}
.cmdk-overlay.open{display:flex;}
.cmdk-box{width:560px;max-width:92vw;background:var(--surface);border-radius:var(--radius);box-shadow:0 20px 50px rgba(0,0,0,.25);overflow:hidden;}
.cmdk-input-wrap{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--border-soft);}
.cmdk-input-wrap .ic{width:17px;height:17px;stroke:var(--text-faint);fill:none;stroke-width:1.8;flex-shrink:0;}
.cmdk-input-wrap input{border:none;outline:none;background:transparent;width:100%;font-size:14px;color:var(--text);}
.cmdk-results{max-height:360px;overflow-y:auto;padding:6px;}
.cmdk-item{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:8px;cursor:pointer;font-size:13px;}
.cmdk-item:hover,.cmdk-item.active{background:var(--surface-alt);}
.cmdk-item .ic{width:15px;height:15px;stroke:var(--text-faint);fill:none;stroke-width:1.7;flex-shrink:0;}
.cmdk-item .cmdk-item-label{flex:1;}
.cmdk-item .cmdk-item-hint{font-size:11px;color:var(--text-faint);}
.cmdk-empty{padding:24px;text-align:center;color:var(--text-faint);font-size:12.5px;}
.icon-btn{
  width:36px;height:36px;border-radius:var(--radius-sm);
  border:1px solid var(--border);background:var(--surface);
  display:flex;align-items:center;justify-content:center;color:var(--slate);
  position:relative;
}
.icon-btn .ic{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.7;}
.icon-btn .dot{
  position:absolute;top:-3px;right:-3px;width:8px;height:8px;border-radius:50%;
  background:var(--red);border:2px solid var(--surface);
}
.notif-bell-wrap{position:relative;}
.notif-count{
  display:none;position:absolute;top:-6px;right:-6px;min-width:16px;height:16px;padding:0 3px;
  border-radius:9px;background:var(--red);color:#fff;font-size:9.5px;font-weight:700;
  align-items:center;justify-content:center;border:2px solid var(--surface);line-height:1;
}
.notif-dropdown{
  display:none;position:absolute;top:calc(100% + 8px);right:0;width:340px;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:0;z-index:60;
}
.notif-bell-wrap.open .notif-dropdown{display:block;}
.notif-dropdown-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--border-soft);}
.notif-dropdown-head h4{font-size:13px;margin:0;}
.notif-dropdown-head .badge{font-size:10.5px;}
.notif-dropdown-list{max-height:320px;overflow-y:auto;padding:6px;}
.notif-item{display:flex;align-items:flex-start;gap:9px;padding:9px 8px;border-radius:var(--radius-sm);cursor:pointer;}
.notif-item:hover{background:var(--surface-alt);}
.notif-item .ic{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;flex-shrink:0;margin-top:1px;}
.notif-item.tone-red .ic{color:var(--red);}
.notif-item.tone-amber .ic{color:var(--amber);}
.notif-item.tone-slate .ic{color:var(--text-faint);}
.notif-item-body{flex:1;min-width:0;}
.notif-item-title{font-size:12.3px;color:var(--text);line-height:1.35;}
.notif-item-meta{display:flex;align-items:center;gap:6px;margin-top:2px;}
.notif-item-meta .badge{font-size:9.5px;padding:1px 6px;}
.notif-item-time{font-size:10.5px;color:var(--text-faint);}
.notif-empty{padding:24px;text-align:center;color:var(--text-faint);font-size:12.5px;}
.notif-dropdown-foot{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-top:1px solid var(--border-soft);gap:8px;}
.notif-dropdown-foot .muted-link{font-size:11.5px;color:var(--primary);font-weight:600;cursor:pointer;background:none;border:none;padding:0;}
.user-chip-wrap{position:relative;padding-left:12px;border-left:1px solid var(--border);}
.user-chip{display:flex;align-items:center;gap:9px;background:none;border:none;cursor:pointer;padding:6px 4px;border-radius:var(--radius-sm);}
.user-chip:hover{background:var(--surface-alt);}
.avatar{width:32px;height:32px;border-radius:50%;background:var(--primary-dark);color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;flex-shrink:0;}
.user-chip .who{display:flex;flex-direction:column;line-height:1.2;text-align:left;}
.user-chip .who strong{font-size:12.5px;color:var(--text);}
.user-chip .who span{font-size:11px;color:var(--text-faint);}
.user-chip-caret{width:12px;height:12px;stroke:var(--text-faint);fill:none;stroke-width:2;transition:transform .15s ease;}
.user-chip-wrap.open .user-chip-caret{transform:rotate(180deg);}
.user-dropdown{
  display:none;position:absolute;top:calc(100% + 8px);right:0;width:250px;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:8px;z-index:60;
}
.user-chip-wrap.open .user-dropdown{display:block;}
.user-dropdown-head{display:flex;align-items:center;gap:10px;padding:8px 6px 12px;}
.user-dropdown-head div{display:flex;flex-direction:column;line-height:1.3;min-width:0;}
.user-dropdown-head strong{font-size:13px;}
.user-dropdown-head span{font-size:11px;color:var(--text-faint);}
.user-dropdown-head .mail{font-size:10.5px;color:var(--text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.user-dropdown-divider{height:1px;background:var(--border-soft);margin:4px 0;}
.user-dropdown-item{
  display:flex;align-items:center;gap:10px;width:100%;text-align:left;
  background:none;border:none;padding:9px 8px;border-radius:var(--radius-sm);
  font-size:12.8px;color:var(--text);cursor:pointer;
}
.user-dropdown-item:hover{background:var(--surface-alt);}
.user-dropdown-item .ic{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;flex-shrink:0;}
.user-dropdown-item.danger{color:var(--red);}
.user-dropdown-item.danger:hover{background:var(--red-light);}
.logout-overlay{
  display:none;position:fixed;inset:0;background:var(--bg);z-index:200;
  align-items:center;justify-content:center;
}
.logout-overlay.open{display:flex;}
.logout-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);
  box-shadow:var(--shadow);padding:40px 44px;text-align:center;max-width:360px;}
.logout-card .brand-mark{width:52px;height:52px;font-size:16px;margin:0 auto 18px;}
.logout-card h3{font-size:16px;margin-bottom:6px;}
.logout-card p{font-size:12.8px;color:var(--text-muted);margin-bottom:22px;line-height:1.5;}

/* --- İçerik --- */
.content{padding:24px 26px 60px;max-width:1720px;}
.view{display:none;animation:fade .15s ease;}
.view.active{display:block;}
@keyframes fade{from{opacity:0;transform:translateY(3px);}to{opacity:1;transform:translateY(0);}}

/* ==========================================================================
   3. ORTAK BİLEŞENLER
   ========================================================================== */

/* Sayfa başlığı satırı: başlık + açıklama + eylem butonu */
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:22px;flex-wrap:wrap;}
.page-head h2{font-size:20px;}
.page-head .desc{font-size:13px;color:var(--text-muted);margin-top:4px;}
.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:0.07em;color:var(--primary);font-weight:700;margin-bottom:6px;display:block;}

.btn{
  display:inline-flex;align-items:center;gap:7px;
  padding:9px 15px;border-radius:var(--radius-sm);
  font-size:13px;font-weight:600;border:1px solid transparent;
  white-space:nowrap;
}
.btn .ic{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;}
.btn-primary{background:var(--primary);color:#fff;}
.btn-primary:hover{background:var(--primary-dark);}
.btn-outline{background:var(--surface);color:var(--text);border-color:var(--border);}
.btn-outline:hover{background:var(--surface-alt);}
.btn-sm{padding:6px 11px;font-size:12.5px;}
/* v122 — kurumsal odak görünürlüğü (klavye erişilebilirliği) */
:focus-visible{outline:2px solid var(--primary, #3a5a7a);outline-offset:2px;border-radius:3px;}
.btn:focus-visible,.nav-item:focus-visible,.panel-head.collapsible:focus-visible,[role="button"]:focus-visible{outline:2px solid var(--primary, #3a5a7a);outline-offset:2px;}
[role="button"]{cursor:pointer;}

/* İstatistik kartları (dashboard grid) */
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin-bottom:22px;}
.stat-card{
  display:flex;flex-direction:column;min-height:96px;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  padding:16px 17px;box-shadow:var(--shadow-sm);
}
.stat-card .top{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;}
.stat-card .icon-wrap{width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.stat-card .icon-wrap .ic{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.7;}
/* v117: label ve value her zaman ayrı satır — inline <span> veya <div> fark etmeksizin blok akış */
.stat-card .value{
  display:block;font-size:24px;font-weight:700;letter-spacing:-0.02em;line-height:1.1;
  margin-top:2px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;
}
.stat-card .label{
  display:block;font-size:12.5px;color:var(--text-muted);line-height:1.35;
  margin-top:2px;white-space:normal;overflow-wrap:anywhere;
}
/* span tabanlı kartlarda label üstte gelir; value ile arasına net boşluk bırak */
.stat-card > .label:first-child{margin-top:0;margin-bottom:2px;}
.stat-card > .label:first-child + .value{margin-top:0;}
.stat-card .trend{font-size:11.5px;margin-top:8px;display:flex;align-items:center;gap:4px;color:var(--text-faint);}
.trend.up{color:var(--green);}
.trend.down{color:var(--red);}

.tone-blue .icon-wrap{background:var(--primary-light);color:var(--primary);}
.tone-green .icon-wrap{background:var(--green-light);color:var(--green);}
.tone-amber .icon-wrap{background:var(--amber-light);color:var(--amber);}
.tone-red .icon-wrap{background:var(--red-light);color:var(--red);}
.tone-purple .icon-wrap{background:var(--purple-light);color:var(--purple);}
.tone-slate .icon-wrap{background:var(--slate-light);color:var(--slate);}

/* Yönetici Aksiyon Merkezi — bağımsız kart düzeni (v101) */
.action-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;align-items:stretch;}
.action-card{
  display:flex;flex-direction:column;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  padding:16px 17px;box-shadow:var(--shadow-sm);
}
.action-card.is-empty{background:var(--surface-alt);}
.action-card .action-card-top{display:flex;align-items:center;gap:10px;margin-bottom:10px;}
.action-card .action-card-top .icon-wrap{width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.action-card .action-card-top .icon-wrap .ic{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.7;}
.action-card .action-card-heading{display:flex;flex-direction:column;min-width:0;}
.action-card .value{font-size:22px;font-weight:700;letter-spacing:-0.02em;line-height:1.2;}
.action-card .label{font-size:12px;color:var(--text-muted);margin-top:1px;white-space:normal;line-height:1.3;}
.action-card .info-strip{margin-bottom:0;}
.action-card .action-card-btn{margin-top:auto;padding-top:12px;}
.action-card.is-empty .value,.action-card.is-empty .label{color:var(--text-faint);}
.action-card.is-outofscope{opacity:.5;}
.action-card-outofscope-hint{font-size:10.5px;color:var(--text-faint);font-style:italic;margin:-4px 0 8px;}

/* Dashboard modül panelleri sürükle-bırak (v103) */
.panel-drag-handle{cursor:grab;color:var(--text-faint);font-size:14px;line-height:1;flex-shrink:0;user-select:none;}
.panel-drag-handle:active{cursor:grabbing;}
#dashModulePanels .panel.dash-panel-dragging{opacity:.45;}
#dashModulePanels .panel.dash-panel-drop-before{box-shadow:inset 0 2px 0 var(--primary);}
#dashModulePanels .panel.dash-panel-drop-after{box-shadow:inset 0 -2px 0 var(--primary);}
@media(max-width:700px){ .panel-drag-handle{display:none;} }
.audit-meta-line{font-size:11px;color:var(--text-faint);margin-top:3px;}

/* Genel kart / panel */
.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);}
.panel-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--border-soft);}
.panel-head h3{font-size:14.5px;}
.panel-head .muted-link{font-size:12px;color:var(--primary);font-weight:600;}
.panel-body{padding:16px 18px;}
.panel-body.no-pad{padding:0;}

/* Açılır-kapanır panel deseni (v102) */
.panel-head.collapsible{cursor:pointer;user-select:none;}
.panel-head.collapsible:hover{background:var(--surface-alt);}
.panel-head.collapsible .panel-head-left{display:flex;align-items:center;gap:10px;flex:1;min-width:0;}
.panel-collapse-chevron{width:16px;height:16px;stroke:var(--text-faint);fill:none;stroke-width:1.8;flex-shrink:0;transition:transform .18s ease;}
.panel-head.collapsible[aria-expanded="false"] .panel-collapse-chevron{transform:rotate(-90deg);}
.panel-collapsible-body{transition:opacity .15s ease;opacity:1;}
.panel-collapsible-body.collapsed{display:none;opacity:0;}

.grid-2{display:grid;grid-template-columns:1.3fr 1fr;gap:16px;}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;}
@media(max-width:1100px){.grid-2,.grid-3{grid-template-columns:1fr;}}

/* Durum etiketleri */
.badge{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:20px;font-size:11.5px;font-weight:600;white-space:nowrap;}
.badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;}
.erp-link-chip{cursor:pointer;}
.erp-link-chip:hover{filter:brightness(0.94);}
.erp-dm-panel .panel-body{padding:14px 18px;display:flex;flex-direction:column;gap:9px;}
.erp-dm-row{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;font-size:12px;line-height:1.6;}
.erp-dm-row .erp-dm-label{min-width:150px;flex-shrink:0;font-weight:600;color:var(--text-faint);font-size:11px;text-transform:uppercase;letter-spacing:.02em;padding-top:2px;}
.erp-dm-row .erp-dm-values{display:flex;flex-wrap:wrap;gap:5px;flex:1;min-width:0;}
.erp-dm-chip{font-size:10.5px;padding:2px 8px;border-radius:10px;background:var(--surface-alt);border:1px solid var(--border);color:var(--text);white-space:nowrap;}
.erp-dm-perm{font-size:10.5px;padding:2px 8px;border-radius:10px;white-space:nowrap;}
.erp-dm-perm.st-aktif{background:var(--green-light);color:var(--green);}
.erp-dm-perm.st-kismi{background:var(--amber-light);color:var(--amber);}
.erp-dm-perm.st-planlandi{background:var(--surface-alt);color:var(--text-faint);border:1px solid var(--border);}
.dqi-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border-bottom:1px solid var(--border-soft);font-size:12.5px;}
.dqi-row:last-child{border-bottom:none;}
.dqi-row .dqi-label{color:var(--text);flex:1;}
.dqi-row .dqi-meta{color:var(--text-faint);font-size:11px;}
.dqi-row .dqi-right{display:flex;align-items:center;gap:8px;flex-shrink:0;}
.dqi-fix-btn{font-size:11px;font-weight:600;color:var(--primary);background:var(--primary-light);border:1px solid var(--border);border-radius:14px;padding:3px 10px;cursor:pointer;white-space:nowrap;}
.dqi-fix-btn:hover{filter:brightness(0.96);}
/* v108 — yetkisiz (pasif görünümlü) buton */
.perm-blocked{opacity:.45;cursor:not-allowed;filter:grayscale(0.4);}
/* v109 — form validasyon vurgusu */
.field-invalid{border-color:var(--red)!important;box-shadow:0 0 0 2px var(--red-light)!important;}
/* v109 — veri kalitesi skoru paneli */
.dq-score-wrap{display:flex;align-items:center;gap:18px;padding:14px 18px;flex-wrap:wrap;}
.dq-score-num{font-size:34px;font-weight:700;line-height:1;}
.dq-score-num.st-good{color:var(--green);}
.dq-score-num.st-watch{color:var(--amber);}
.dq-score-num.st-risk{color:#C97A16;}
.dq-score-num.st-crit{color:var(--red);}
.dq-score-meta{display:flex;flex-direction:column;gap:2px;}
.dq-score-meta .k{font-size:11px;color:var(--text-faint);text-transform:uppercase;letter-spacing:.03em;}
.dq-score-bar{flex:1;min-width:180px;height:9px;border-radius:6px;background:var(--surface-alt);overflow:hidden;}
.dq-score-bar > span{display:block;height:100%;border-radius:6px;}
.dq-metric-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;padding:0 18px 16px;}
.dq-metric{border:1px solid var(--border);border-radius:var(--radius-sm);padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:10px;}
.dq-metric .dq-m-label{font-size:12px;color:var(--text);}
.dq-metric .dq-m-val{font-size:15px;font-weight:700;}
/* v109 — kayıt kalitesi rozeti */
.rq-badge{font-size:10px;padding:1px 7px;border-radius:9px;font-weight:600;white-space:nowrap;}
.rq-tam{background:var(--green-light);color:var(--green);}
.rq-eksik{background:var(--amber-light);color:var(--amber);}
.rq-onay{background:var(--primary-light);color:var(--primary);}
.rq-baglanti{background:#FBF1DE;color:#C97A16;}
.rq-kontrol{background:var(--surface-alt);color:var(--text-faint);border:1px solid var(--border);}
/* v108 — onay akışı paneli */
.awf-panel{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-alt);padding:12px 14px;}
.awf-panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;}
.awf-panel-head h4{font-size:12.5px;margin:0;}
.awf-steps{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px;}
.awf-step{display:flex;flex-direction:column;gap:1px;font-size:10.5px;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:5px 9px;min-width:96px;}
.awf-step .k{color:var(--text-faint);text-transform:uppercase;letter-spacing:.02em;font-size:9.5px;}
.awf-step .v{color:var(--text);font-weight:600;}
.awf-actions{display:flex;flex-wrap:wrap;gap:6px;}
.awf-actions .btn{font-size:11.5px;}
.badge-green{background:var(--green-light);color:var(--green);}
.badge-amber{background:var(--amber-light);color:var(--amber);}
.badge-red{background:var(--red-light);color:var(--red);}
.badge-blue{background:var(--primary-light);color:var(--primary);}
.badge-purple{background:var(--purple-light);color:var(--purple);}
.badge-slate{background:var(--slate-light);color:var(--slate);}

/* Tablolar */
.table-wrap{overflow-x:auto;}
table{width:100%;border-collapse:collapse;font-size:13px;min-width:640px;}
thead th{
  text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:0.04em;
  color:var(--text-faint);font-weight:700;padding:11px 11px;
  border-bottom:1px solid var(--border);white-space:nowrap;background:var(--surface-alt);
}
tbody td{padding:12px 11px;border-bottom:1px solid var(--border-soft);color:var(--text);white-space:nowrap;}
tbody tr:last-child td{border-bottom:none;}
tbody tr:hover{background:var(--surface-alt);}
td.wrap,th.wrap{white-space:normal;}
.cell-strong{font-weight:600;}
.cell-muted{color:var(--text-muted);}
.row-actions{display:flex;gap:6px;}
.row-actions-inline{display:flex;gap:6px;flex-wrap:wrap;}
.row-actions button{background:none;border:1px solid var(--border);border-radius:var(--radius-sm);width:28px;height:28px;display:flex;align-items:center;justify-content:center;color:var(--slate);}
.row-actions .ic{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;}

/* Filtre çubuğu */
.filter-bar{display:flex;flex-wrap:wrap;gap:10px;padding:14px 18px;border-bottom:1px solid var(--border-soft);}
.filter-bar input[type=text],.filter-bar select{
  border:1px solid var(--border);border-radius:var(--radius-sm);
  padding:8px 11px;background:var(--surface);color:var(--text);min-width:150px;
}
.filter-bar input[type=text]{min-width:200px;}
.filter-bar .flex-fill{flex:1;}

/* İlerleme çubuğu */
.progress{background:var(--surface-alt);border-radius:20px;height:7px;width:100px;overflow:hidden;}
.progress > span{display:block;height:100%;background:var(--primary);border-radius:20px;}
.progress-row{display:flex;align-items:center;gap:8px;}
.progress-row .pct{font-size:12px;color:var(--text-muted);width:32px;}

/* Aşama / kanban kartları (AR-GE süreci) */
.stage-track{display:grid;grid-template-columns:repeat(8,1fr);gap:10px;margin-bottom:22px;}
@media(max-width:1200px){.stage-track{grid-template-columns:repeat(4,1fr);}}
@media(max-width:640px){.stage-track{grid-template-columns:repeat(2,1fr);}}
.stage-card{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  padding:13px;min-height:112px;display:flex;flex-direction:column;gap:8px;
  position:relative;
}
.stage-card .step-no{font-size:10.5px;color:var(--text-faint);font-weight:700;letter-spacing:0.04em;}
.stage-card .step-title{font-size:12.8px;font-weight:600;line-height:1.3;}
.stage-card .step-count{font-size:11px;color:var(--text-muted);margin-top:auto;}
.stage-card.is-current{border-color:var(--primary-line);background:var(--primary-light);}
.stage-card.is-current .step-title{color:var(--primary-dark);}
.stage-card.is-done{opacity:0.68;}

/* Uyarı listesi */
.alert-list{display:flex;flex-direction:column;}
.alert-item{display:flex;gap:11px;padding:12px 18px;border-bottom:1px solid var(--border-soft);align-items:flex-start;}
.alert-item:last-child{border-bottom:none;}
.alert-dot{width:8px;height:8px;border-radius:50%;margin-top:5px;flex-shrink:0;}
.alert-item .txt strong{font-size:13px;display:block;}
.alert-item .txt span{font-size:12px;color:var(--text-faint);}

/* Aktivite listesi */
.activity-item{display:flex;gap:11px;padding:11px 18px;border-bottom:1px solid var(--border-soft);}
.activity-item:last-child{border-bottom:none;}
.act-avatar{width:28px;height:28px;border-radius:50%;background:var(--slate-light);color:var(--slate);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;flex-shrink:0;}
.activity-item .txt{font-size:12.8px;}
.activity-item .txt b{font-weight:600;}
.activity-item .time{font-size:11.3px;color:var(--text-faint);margin-top:2px;}

/* Basit grafik placeholder (gerçek chart kütüphanesi yok) */
.chart-placeholder{padding:18px;}
.bar-chart{display:flex;align-items:flex-end;gap:10px;height:150px;padding-top:10px;}
.bar-chart .bar-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;justify-content:flex-end;height:100%;}
.bar-chart .bar{width:100%;max-width:34px;border-radius:5px 5px 0 0;background:var(--primary-line);position:relative;}
.bar-chart .bar.filled{background:var(--primary);}
.bar-chart .bar-label{font-size:10.5px;color:var(--text-faint);}
.legend{display:flex;gap:16px;padding:0 18px 16px;flex-wrap:wrap;}
.legend-item{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-muted);}
.legend-dot{width:9px;height:9px;border-radius:3px;}
.dash-chart-filter{display:flex;gap:4px;}
.chart-filter-btn{
  font-size:10.5px;font-weight:600;color:var(--text-faint);background:var(--surface-alt);
  border:1px solid var(--border);border-radius:14px;padding:3px 9px;cursor:pointer;
}
.chart-filter-btn.active{color:var(--primary);background:var(--primary-light);border-color:var(--primary);}
.dash-chart-panel.is-dimmed{opacity:.55;}

/* Donut placeholder (CSS conic-gradient ile, kütüphanesiz) */
.donut{
  width:120px;height:120px;border-radius:50%;
  background:conic-gradient(var(--primary) 0 62%, var(--green) 62% 80%, var(--amber) 80% 93%, var(--red) 93% 100%);
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.donut-inner{width:76px;height:76px;border-radius:50%;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;}
.donut-inner strong{font-size:17px;}
.donut-inner span{font-size:10px;color:var(--text-faint);}

/* Form ızgarası (yeni kayıt formları için iskelet) */
.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px 18px;}
@media(max-width:700px){.form-grid{grid-template-columns:1fr;}}
.field label{display:block;font-size:12.3px;font-weight:600;margin-bottom:6px;color:var(--text);}
.field input,.field select,.field textarea{
  width:100%;border:1px solid var(--border);border-radius:var(--radius-sm);
  padding:9px 11px;background:var(--surface);color:var(--text);
}
.field .hint{font-size:11px;color:var(--text-faint);margin-top:4px;}

/* Placeholder kutuları (barkod/QR vs.) */
.placeholder-box{
  border:1.5px dashed var(--border);border-radius:var(--radius);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  color:var(--text-faint);padding:22px;text-align:center;background:var(--surface-alt);
}
.placeholder-box .ic{width:26px;height:26px;stroke:currentColor;fill:none;stroke-width:1.5;}
.placeholder-box span{font-size:12px;}

/* Bilgi kartı (module summary strip) */
.info-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1px;background:var(--border);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;margin-bottom:18px;}
.info-cell{background:var(--surface);padding:13px 16px;}
.info-cell .k{font-size:11px;color:var(--text-faint);margin-bottom:4px;}
.info-cell .v{font-size:14px;font-weight:600;}

.section-gap{margin-bottom:18px;}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
@media(max-width:900px){.two-col{grid-template-columns:1fr;}}

.empty-note{padding:34px 18px;text-align:center;color:var(--text-faint);font-size:13px;}

/* Tutarlı boş durum bileşeni (v101) */
.empty-state-cell{padding:0 !important;}
.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:36px 18px;color:var(--text-faint);text-align:center;}
.empty-state .ic{width:28px;height:28px;stroke:currentColor;fill:none;stroke-width:1.4;opacity:.55;}
.empty-state p{font-size:12.5px;max-width:340px;line-height:1.5;}

/* Mobil uyum */
/* ==========================================================================
   4. PROJE DETAY EKRANI — SEKMELER, GÖRÜNÜRLÜK MODU, MASKELİ ALANLAR
   ========================================================================== */
.back-link{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--primary);font-weight:600;margin-bottom:14px;cursor:pointer;border:none;background:none;padding:0;}
.back-link .ic{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;}

.detail-hero{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:19px 22px;margin-bottom:16px;}
.detail-hero-top{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap;}
.detail-hero-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.detail-hero-title h2{font-size:19px;}
.detail-hero-code{font-size:12.5px;color:var(--text-faint);font-weight:600;}
.detail-hero-customer{font-size:12.5px;color:var(--text-muted);margin-top:4px;}
.detail-hero-meta{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px;}
.detail-hero-links{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px;}
.link-chip{font-size:11.3px;background:var(--surface-alt);border:1px solid var(--border);color:var(--slate);padding:4px 10px;border-radius:20px;font-weight:600;}

.mode-switch-wrap{display:flex;flex-direction:column;align-items:flex-end;gap:6px;}
.mode-switch{display:inline-flex;background:var(--surface-alt);border:1px solid var(--border);border-radius:20px;padding:3px;gap:2px;}
.mode-btn{padding:7px 14px;border-radius:16px;font-size:12px;font-weight:600;color:var(--text-muted);border:none;background:none;display:flex;align-items:center;gap:6px;}
.mode-btn .ic{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;}
.mode-btn.active{background:var(--surface);color:var(--primary-dark);box-shadow:var(--shadow-sm);}
.mode-btn.active.is-customer{color:var(--green);}
.preview-portal-link{font-size:11.5px;color:var(--primary);font-weight:600;cursor:pointer;}

.customer-mode-banner{display:none;align-items:center;gap:9px;background:var(--green-light);color:var(--green);border:1px solid #cfead9;border-radius:var(--radius-sm);padding:10px 14px;font-size:12.5px;font-weight:600;margin-bottom:16px;}
.customer-mode-banner .ic{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;flex-shrink:0;}
.customer-mode .customer-mode-banner{display:flex;}

.mini-stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));gap:10px;margin-bottom:20px;}
.mini-stat{display:flex;flex-direction:column;min-height:58px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px 13px;}
.mini-stat .v{display:block;font-size:17px;font-weight:700;letter-spacing:-0.01em;line-height:1.15;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;}
.mini-stat .l{display:block;font-size:10.8px;color:var(--text-faint);margin-top:3px;line-height:1.3;white-space:normal;overflow-wrap:anywhere;}

.detail-tabs{display:flex;gap:2px;overflow-x:auto;border-bottom:1px solid var(--border);margin-bottom:20px;}
.detail-tab{padding:10px 13px;font-size:12.5px;font-weight:600;color:var(--text-muted);white-space:nowrap;border-bottom:2px solid transparent;cursor:pointer;display:flex;align-items:center;gap:5px;}
.detail-tab:hover{color:var(--text);}
.detail-tab.active{color:var(--primary);border-bottom-color:var(--primary);}
.detail-tab .lock-mini{width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2;opacity:.55;}
.customer-mode .detail-tab.tab-internal{display:none;}

.detail-subview{display:none;}
.detail-subview.active{display:block;}

.io-customer{display:none;}
.customer-mode .io-internal{display:none !important;}
.customer-mode .io-customer{display:inline-flex !important;}
.customer-mode tr.io-internal-row{display:none !important;}

.locked-field{display:inline-flex;align-items:center;gap:5px;color:var(--text-faint);font-style:italic;font-size:12px;}
.locked-field .ic{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:1.8;flex-shrink:0;}

.visibility-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:20px;font-size:10.3px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap;}
.vis-internal{background:var(--slate-light);color:var(--slate);}
.vis-customer{background:var(--green-light);color:var(--green);}
.vis-mgmt{background:var(--purple-light);color:var(--purple);}
.vis-finance{background:var(--amber-light);color:var(--amber);}

.customer-mode .hide-in-customer{display:none !important;}

.doc-row{display:flex;align-items:center;gap:13px;padding:12px 18px;border-bottom:1px solid var(--border-soft);}
.doc-row:last-child{border-bottom:none;}
.doc-icon{width:34px;height:34px;border-radius:8px;background:var(--primary-light);color:var(--primary);display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.doc-icon .ic{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.7;}
.doc-info{flex:1;min-width:0;}
.doc-info .name{font-size:13px;font-weight:600;}
.doc-info .meta{font-size:11.3px;color:var(--text-faint);margin-top:2px;}
.doc-actions{display:flex;gap:6px;flex-shrink:0;align-items:center;}

.task-row{display:grid;grid-template-columns:2.1fr 1fr 1fr 1fr 1fr 32px;gap:10px;align-items:center;padding:11px 18px;border-bottom:1px solid var(--border-soft);font-size:12.6px;}
.task-row:last-child{border-bottom:none;}
.task-row .t-name{font-weight:600;color:var(--text);}
.task-row .t-desc{font-size:11.3px;color:var(--text-faint);margin-top:2px;}
@media(max-width:840px){.task-row{grid-template-columns:1fr;gap:4px;}}

.row-del-btn{background:none;border:1px solid var(--border);border-radius:6px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;color:var(--text-faint);flex-shrink:0;}
.row-del-btn .ic{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;}
.row-del-btn:hover{color:var(--red);border-color:#f0c9c8;background:var(--red-light);}

.timeline{position:relative;padding:4px 4px 4px 26px;}
.timeline::before{content:"";position:absolute;left:9px;top:6px;bottom:6px;width:2px;background:var(--border);}
.timeline-item{position:relative;padding-bottom:22px;}
.timeline-item:last-child{padding-bottom:0;}
.timeline-item::before{content:"";position:absolute;left:-21px;top:2px;width:11px;height:11px;border-radius:50%;background:var(--surface);border:2px solid var(--primary-line);}
.timeline-item.done::before{background:var(--primary);border-color:var(--primary);}
.timeline-item.current::before{background:var(--surface);border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-light);}
.timeline-item .t-date{font-size:10.8px;color:var(--text-faint);font-weight:700;letter-spacing:.02em;text-transform:uppercase;}
.timeline-item .t-title{font-size:13.3px;font-weight:600;margin-top:3px;}
.timeline-item .t-desc{font-size:12px;color:var(--text-muted);margin-top:3px;}

.note-card{border:1px solid var(--border);border-radius:var(--radius-sm);padding:13px 40px 13px 15px;margin-bottom:10px;background:var(--surface-alt);position:relative;}
.note-card .nc-del{position:absolute;top:10px;right:10px;}
.note-card:last-child{margin-bottom:0;}
.note-card .nc-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;}
.note-card .nc-author{font-size:11.3px;color:var(--text-faint);}
.note-card .nc-body{font-size:12.8px;color:var(--text);line-height:1.5;}

.msg-thread{display:flex;flex-direction:column;gap:13px;padding:16px 18px;}
.msg-bubble{max-width:72%;padding:10px 13px;border-radius:12px;font-size:12.8px;line-height:1.45;}
.msg-bubble .who{font-size:10.8px;font-weight:700;margin-bottom:3px;display:block;opacity:.7;}
.msg-bubble .time{font-size:10.3px;color:var(--text-faint);margin-top:5px;display:block;}
.msg-in{align-self:flex-start;background:var(--surface-alt);border:1px solid var(--border);border-bottom-left-radius:3px;}
.msg-out{align-self:flex-end;background:var(--primary-light);border:1px solid var(--primary-line);border-bottom-right-radius:3px;}
.msg-internal-flag{align-self:center;background:var(--purple-light);color:var(--purple);border-radius:20px;font-size:10.8px;font-weight:700;padding:5px 13px;}
.msg-input-row{display:flex;gap:8px;padding:14px 18px;border-top:1px solid var(--border-soft);}
.msg-input-row input{flex:1;border:1px solid var(--border);border-radius:20px;padding:9px 16px;background:var(--surface);}

.portal-preview-frame{border:1.5px dashed var(--primary-line);border-radius:var(--radius);padding:18px 20px;background:var(--primary-light);}
.portal-preview-frame .ppf-tag{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;color:var(--primary-dark);background:var(--surface);border:1px solid var(--primary-line);padding:4px 11px;border-radius:20px;margin-bottom:14px;}
.portal-preview-frame .ppf-tag .ic{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2;}

.perm-yes{color:var(--green);font-weight:700;}
.perm-no{color:var(--red);font-weight:700;}
.perm-ltd{color:var(--amber);font-weight:700;}

/* ==========================================================================
   5. MÜŞTERİ PORTALI (DEMO) — TAM EKRAN KATMAN
   ========================================================================== */
.portal-overlay{position:fixed;inset:0;background:rgba(20,30,42,0.55);z-index:100;display:none;align-items:center;justify-content:center;padding:22px;}
.portal-overlay.open{display:flex;}
.portal-window{background:var(--bg);width:100%;max-width:1180px;height:92vh;border-radius:var(--radius-lg);overflow:hidden;display:flex;flex-direction:column;box-shadow:0 24px 70px rgba(20,30,42,0.4);}
.portal-topbar{background:var(--surface);border-bottom:1px solid var(--border);height:58px;display:flex;align-items:center;padding:0 20px;gap:14px;flex-shrink:0;}
.portal-brand{display:flex;align-items:center;gap:9px;font-weight:700;font-size:13.3px;}
.portal-brand .brand-mark{width:28px;height:28px;font-size:11px;border-radius:7px;}
.portal-topbar .who{margin-left:6px;font-size:12px;color:var(--text-muted);}
.close-portal{margin-left:auto;background:none;border:1px solid var(--border);border-radius:var(--radius-sm);width:32px;height:32px;display:flex;align-items:center;justify-content:center;color:var(--slate);flex-shrink:0;}
.close-portal .ic{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;}
.portal-nav{display:none;gap:2px;padding:0 20px;background:var(--surface);border-bottom:1px solid var(--border);flex-shrink:0;overflow-x:auto;}
.portal-nav.show{display:flex;}
.portal-nav-item{padding:12px 13px;font-size:12.8px;font-weight:600;color:var(--text-muted);border-bottom:2px solid transparent;cursor:pointer;white-space:nowrap;}
.portal-nav-item.active{color:var(--primary);border-bottom-color:var(--primary);}
.portal-body{flex:1;overflow-y:auto;padding:0;display:flex;flex-direction:column;}
.portal-login-wrap{flex:1;display:none;align-items:center;justify-content:center;background:var(--bg);}
.portal-login-wrap.show{display:flex;}
.portal-main-wrap{flex:1;display:none;flex-direction:column;overflow:hidden;}
.portal-main-wrap.show{display:flex;}
.portal-content{flex:1;overflow-y:auto;padding:22px 26px;}
.login-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:32px;width:100%;max-width:360px;box-shadow:var(--shadow);text-align:center;}
.login-card .brand-mark{margin:0 auto 14px;}
.login-card h3{font-size:16px;margin-bottom:4px;}
.login-card p{font-size:12.3px;color:var(--text-muted);margin-bottom:22px;}
.login-field{margin-bottom:13px;text-align:left;}
.login-field label{display:block;font-size:11.8px;font-weight:600;margin-bottom:6px;}
.login-field input{width:100%;border:1px solid var(--border);border-radius:var(--radius-sm);padding:10px 12px;background:var(--surface);}
.login-note{font-size:10.8px;color:var(--text-faint);margin-top:14px;}
.portal-subview{display:none;}
.portal-subview.active{display:block;}
.portal-project-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:19px 21px;margin-bottom:16px;}
.portal-project-card .ph{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;margin-bottom:14px;}
.portal-action-item{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--border-soft);font-size:12.6px;}
.portal-action-item:last-child{border-bottom:none;}

/* ==========================================================================
   7. ÜRÜN FİKİRLERİ / ÜRÜN HAVUZU — kart ızgarası
   ========================================================================== */
.idea-pipeline{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;margin-bottom:20px;}
@media(max-width:1200px){.idea-pipeline{grid-template-columns:repeat(4,1fr);}}
@media(max-width:640px){.idea-pipeline{grid-template-columns:repeat(2,1fr);}}
.idea-stage{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:11px 12px;cursor:pointer;transition:border-color .15s ease;}
.idea-stage:hover{border-color:var(--primary-line);}
.idea-stage.active-filter{border-color:var(--primary);background:var(--primary-light);}
.idea-stage .is-title{font-size:11px;font-weight:600;color:var(--text-muted);line-height:1.3;}
.idea-stage .is-count{font-size:19px;font-weight:700;margin-top:4px;}

.idea-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:14px;}
.idea-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px 17px;display:flex;flex-direction:column;gap:9px;}
.idea-card.is-converted{opacity:.72;}
.idea-card.is-rejected{opacity:.6;}
.idea-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;}
.idea-card-title{font-size:14px;font-weight:600;line-height:1.3;}
.idea-card-code{font-size:11px;color:var(--text-faint);margin-top:2px;}
.idea-badges{display:flex;flex-wrap:wrap;gap:5px;}
.idea-meta{font-size:11.5px;color:var(--text-faint);}
.idea-problem{font-size:12.3px;color:var(--text);line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.idea-stats{display:flex;gap:14px;font-size:11.5px;color:var(--text-muted);}
.idea-foot{display:flex;gap:8px;margin-top:auto;padding-top:10px;border-top:1px solid var(--border-soft);}
.idea-foot select{flex:1;border:1px solid var(--border);border-radius:var(--radius-sm);padding:7px 9px;background:var(--surface);font-size:12px;color:var(--text-muted);}


/* ==========================================================================
   9. KOMPONENT STOKLARI — görsel destekli kart listesi
   ========================================================================== */
.comp-list{display:flex;flex-direction:column;gap:12px;}
.comp-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:15px 16px;}
.comp-card-top{display:flex;gap:13px;align-items:flex-start;margin-bottom:12px;}
.comp-thumb{width:56px;height:56px;border-radius:var(--radius-sm);background:var(--surface-alt);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--text-faint);position:relative;overflow:hidden;}
.comp-thumb .ic{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.4;}
.comp-thumb .comp-no{position:absolute;top:2px;left:3px;font-size:9px;font-weight:700;color:var(--text-faint);background:var(--surface);border-radius:4px;padding:0 3px;}
.comp-head{flex:1;min-width:0;}
.comp-name{font-size:14px;font-weight:600;color:var(--text);}
.comp-desc{font-size:12px;color:var(--text-muted);margin-top:3px;line-height:1.4;}
.comp-top-badges{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex-shrink:0;}
.comp-info-strip{margin-bottom:0;}
.comp-foot{display:flex;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border-soft);flex-wrap:wrap;}


/* ==========================================================================
   9b. KİT LİSTESİ
   ========================================================================== */
.kit-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:14px;}
.kit-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px 17px;}
.kit-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:8px;}
.kit-title{font-size:14.5px;font-weight:600;}
.kit-code{font-size:11px;color:var(--text-faint);margin-top:2px;}
.kit-desc{font-size:12.3px;color:var(--text-muted);line-height:1.5;margin-bottom:10px;}
.kit-meta{font-size:11.3px;color:var(--text-faint);margin-bottom:10px;}
.kit-stats{display:flex;gap:14px;font-size:11.8px;color:var(--text-muted);margin-bottom:12px;}
.kit-foot{display:flex;gap:8px;padding-top:10px;border-top:1px solid var(--border-soft);flex-wrap:wrap;}
.kit-content{display:none;margin-top:14px;padding-top:14px;border-top:1px solid var(--border-soft);}
.kit-content.open{display:block;}
.kit-content table{font-size:12.3px;}
.kit-content-foot{margin-top:10px;}

.shortage-row{background:var(--red-light);}

.view-toggle{display:inline-flex;background:var(--surface-alt);border:1px solid var(--border);border-radius:20px;padding:3px;gap:2px;}
.view-toggle-btn{padding:7px 14px;border-radius:16px;font-size:12px;font-weight:600;color:var(--text-muted);border:none;background:none;display:flex;align-items:center;gap:6px;cursor:pointer;}
.view-toggle-btn .ic{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;}
.view-toggle-btn.active{background:var(--surface);color:var(--primary-dark);box-shadow:var(--shadow-sm);}
.comp-card-simple .comp-info-strip{grid-template-columns:repeat(auto-fit,minmax(110px,1fr));}
.detail-modal-body dl{margin:0;display:grid;grid-template-columns:1fr 1fr;gap:10px 16px;}
.detail-modal-body .dl-item{border-bottom:1px solid var(--border-soft);padding-bottom:8px;}
.detail-modal-body .dl-item .k{font-size:10.8px;color:var(--text-faint);text-transform:uppercase;letter-spacing:.03em;margin-bottom:3px;}
.detail-modal-body .dl-item .v{font-size:13px;color:var(--text);font-weight:500;}
.detail-modal-body .dl-full{grid-column:1/-1;}


.supplier-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px;}
.supplier-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px 17px;}
.supplier-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:6px;}
.supplier-name{font-size:14.5px;font-weight:600;}
.supplier-code{font-size:11px;color:var(--text-faint);margin-top:2px;}
.supplier-meta{font-size:12px;color:var(--text-muted);margin-bottom:10px;line-height:1.5;}
.approval-item{display:flex;gap:10px;padding:9px 0;border-bottom:1px solid var(--border-soft);font-size:12.5px;}
.approval-item:last-child{border-bottom:none;}
.approval-item .who{font-weight:600;min-width:90px;}
.approval-item .when{color:var(--text-faint);min-width:80px;}
.strategic-tag{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;padding:3px 9px;border-radius:12px;margin:2px 4px 2px 0;}


.chk-inline{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;color:var(--text-muted);cursor:pointer;}
.chk-inline input{margin:0;}
.tutanak-line{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid var(--border-soft);gap:12px;}
.tutanak-line .k{color:var(--text-faint);font-size:12px;}
.tutanak-line .v{font-weight:600;text-align:right;}

.skill-cell{text-align:center;}
.skill-level{display:inline-block;font-size:10.5px;font-weight:700;padding:3px 8px;border-radius:10px;}
.org-box{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;text-align:center;}
.org-box .role{font-size:11px;color:var(--text-faint);margin-bottom:2px;}
.org-box .name{font-weight:700;font-size:13.5px;}
.org-connector{width:2px;height:18px;background:var(--border);margin:0 auto;}
.privacy-note{background:var(--amber-light);border:1px solid var(--amber);border-radius:var(--radius-sm);padding:10px 14px;font-size:12px;color:var(--text);margin-bottom:16px;display:flex;gap:8px;align-items:flex-start;}

/* ==========================================================================
   10. KÜÇÜK MODAL PENCERELER (Doküman Ekle vb.) VE TOAST BİLDİRİMLERİ
   ========================================================================== */
.modal-overlay{position:fixed;inset:0;background:rgba(20,30,42,0.5);z-index:110;display:none;align-items:center;justify-content:center;padding:20px;}
.modal-overlay.open{display:flex;}
.modal-card{background:var(--surface);border-radius:var(--radius-lg);width:100%;max-width:460px;box-shadow:0 20px 60px rgba(20,30,42,0.35);overflow:hidden;}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border);}
.modal-head h3{font-size:15px;}
.modal-close{background:none;border:1px solid var(--border);border-radius:var(--radius-sm);width:30px;height:30px;display:flex;align-items:center;justify-content:center;color:var(--slate);flex-shrink:0;}
.modal-close .ic{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;}
.modal-body{padding:20px;display:flex;flex-direction:column;gap:14px;max-height:64vh;overflow-y:auto;}
.modal-foot{display:flex;justify-content:flex-end;gap:10px;padding:14px 20px;border-top:1px solid var(--border-soft);}
.modal-hint{font-size:11.3px;color:var(--text-faint);margin-top:-6px;}

.empty-doc-note{padding:26px 18px;text-align:center;color:var(--text-faint);font-size:12.8px;}
.cycle-status{cursor:pointer;user-select:none;}
.cycle-status:hover{filter:brightness(0.94);box-shadow:0 0 0 2px rgba(0,0,0,0.04) inset;}
.cycle-review-status{cursor:pointer;user-select:none;}
.cycle-review-status:hover{filter:brightness(0.94);box-shadow:0 0 0 2px rgba(0,0,0,0.04) inset;}

.toast{position:fixed;bottom:26px;right:26px;background:var(--text);color:#fff;padding:11px 18px;border-radius:9px;font-size:13px;font-weight:600;box-shadow:0 10px 28px rgba(20,30,42,0.28);z-index:200;opacity:0;transform:translateY(10px);transition:opacity .2s ease, transform .2s ease;pointer-events:none;display:flex;align-items:center;gap:9px;}
.toast.show{opacity:1;transform:translateY(0);}
.toast .ic{width:15px;height:15px;stroke:#7DD3A8;fill:none;stroke-width:2;flex-shrink:0;}

@media(max-width:960px){
  .sidebar{transform:translateX(-100%);}
  .sidebar.open{transform:translateX(0);box-shadow:0 0 0 999px rgba(15,23,42,0.35);}
  .main{margin-left:0;}
  .menu-toggle{display:flex;}
  .search-box{width:150px;}
  .user-chip .who{display:none;}
  .content{padding:18px 16px 40px;}
  .stage-track{grid-template-columns:repeat(2,1fr);}
}

/* ==========================================================================
   RESPONSIVE İYİLEŞTİRMELER (v93) — ek breakpoint katmanları
   ========================================================================== */
body.sidebar-open{overflow:hidden;}

.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.table-wrap table{min-width:580px;}

.modal-card{max-height:92vh;overflow-y:auto;}

#dashModulePanels{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
@media(max-width:960px){
  #dashModulePanels{grid-template-columns:1fr;}
}

@media(max-width:1280px){
  /* Geniş tablet / küçük laptop */
  .stat-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));}
  .grid-2{grid-template-columns:1fr 1fr;}
}

@media(max-width:960px){
  /* Tablet — mevcut sidebar kuralları korunuyor, aşağıdakiler ek */
  .stat-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));}
  .grid-2,.grid-3{grid-template-columns:1fr;}
  .page-head{flex-direction:column;align-items:flex-start;gap:10px;}
  .filter-bar{flex-wrap:wrap;gap:8px;}
  .filter-bar input,.filter-bar select{min-width:0;flex:1 1 140px;}
  .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
  table{min-width:640px;}
  .detail-tabs{overflow-x:auto;white-space:nowrap;}
  .modal-card{width:95vw;max-width:95vw;max-height:90vh;overflow-y:auto;}
  .form-grid{grid-template-columns:1fr;}
}

@media(max-width:600px){
  /* Mobil */
  .stat-grid{grid-template-columns:1fr 1fr;}
  .stat-card{padding:13px 14px;min-height:auto;}
  .stat-card .value{font-size:20px;}
  .mini-stat{min-height:auto;}
  .page-head h2{font-size:18px;}
  .btn{font-size:12.5px;padding:7px 12px;}
  .topbar{padding:0 14px;}
  .content{padding:14px 12px 40px;}
  .panel{padding:14px;}
  .panel-head{flex-wrap:wrap;gap:6px;}
  .modal-card{padding:16px;}
  .detail-tab{font-size:12px;padding:7px 10px;}
  .mini-stat-grid{grid-template-columns:repeat(2,1fr);}
}

@media(max-width:400px){
  /* Küçük mobil */
  .stat-grid{grid-template-columns:1fr;}
  .mini-stat-grid{grid-template-columns:1fr;}
}

#dashCharts{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;margin-bottom:22px;}
@media(max-width:1100px){ #dashCharts{grid-template-columns:1fr 1fr;} }
@media(max-width:700px){ #dashCharts{grid-template-columns:1fr;} }

/* Yazdırma / PDF dostu görünüm (v101) */
@media print{
  .sidebar,.topbar,.menu-toggle,.btn,.row-actions,.row-actions-inline,.modal-overlay,.cmdk-overlay,.toast,.filter-bar,.detail-tabs,.page-head button{display:none !important;}
  .content{padding:0 !important;margin:0 !important;}
  .app,.content{display:block !important;}
  .panel,.stat-card,.action-card{box-shadow:none !important;border:1px solid #ccc !important;break-inside:avoid;}
  body{background:#fff !important;}
}
