:root{
  --bg: #f6f8fc;
  --panel: #ffffff;
  --panel2:#ffffff;
  --card: #ffffff;

  --line: rgba(15, 23, 42, .10);
  --line2: rgba(15, 23, 42, .06);

  --text: #0f172a;
  --muted: #64748b;

  --primary: #635bff;   /* mor-mavi */
  --primary2:#3b82f6;   /* mavi */
  --ok:#16a34a;
  --warn:#f59e0b;
  --danger:#ef4444;

  --radius: 14px;
  --shadow: 0 18px 60px rgba(15,23,42,.10);
  --shadow2: 0 10px 24px rgba(15,23,42,.08);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:
    radial-gradient(900px 520px at 15% -10%, rgba(99,91,255,.18), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(59,130,246,.14), transparent 55%),
    var(--bg);
  color:var(--text);
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial;
}

/* Layout */
.app-body{overflow:hidden}
.sidebar{
  position:fixed; left:0; top:0; bottom:0;
  width:280px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  border-right:1px solid var(--line);
  display:flex; flex-direction:column;
  box-shadow: var(--shadow);
  z-index:20;
}
.main{
  position:fixed; left:280px; right:0; top:0; bottom:0;
  display:flex; flex-direction:column;
  overflow:hidden;
}
.topbar{
  height:64px;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 16px;
  border-bottom:1px solid var(--line);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
}
.content{
  padding:16px;
  overflow:auto;
  height: calc(100% - 64px);
}

/* Sidebar blocks */
.sidebar-top{padding:16px 14px 10px}
.brand{display:flex; align-items:center; gap:12px}
.brand-logo{
  width:44px; height:44px;
  border-radius:14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg,var(--primary),var(--primary2));
  font-weight:900;
  color:white;
  box-shadow: 0 10px 24px rgba(99,91,255,.25);
}
.brand-name{font-weight:900; letter-spacing:.2px}
.brand-sub{font-size:12px;color:var(--muted); margin-top:2px}

.userbox{
  margin-top:14px;
  display:flex; gap:10px; align-items:center;
  padding:10px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.75);
  border-radius: var(--radius);
}
.userbox-avatar{
  width:36px; height:36px;
  border-radius:12px;
  display:grid; place-items:center;
  background: rgba(99,91,255,.10);
  border:1px solid rgba(99,91,255,.20);
  font-weight:900;
  color:#1f2a44;
}
.userbox-email{font-size:13px; font-weight:800}
.userbox-role{font-size:12px; color:var(--muted)}

.menu{padding:6px 10px; overflow:auto}
.menu-section{
  margin:10px 8px 6px;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color: rgba(100,116,139,.95);
}
.menu-item{
  width:100%;
  display:flex; align-items:center; gap:10px;
  padding:11px 12px;
  margin:6px 6px;
  border-radius: 12px;
  border:1px solid transparent;
  color: rgba(15,23,42,.92);
  background: transparent;
  cursor:pointer;
  text-decoration:none;
}
.menu-item:hover{
  background: rgba(99,91,255,.06);
  border-color: rgba(99,91,255,.18);
}
.menu-item.active{
  background: linear-gradient(135deg, rgba(99,91,255,.14), rgba(59,130,246,.10));
  border-color: rgba(99,91,255,.25);
}
.menu-item.danger:hover{
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.18);
}
.mi-ico{width:22px; text-align:center; opacity:.95}
.mi-txt{font-weight:900; font-size:13px}

.sidebar-bottom{
  padding:12px 14px;
  border-top:1px solid var(--line);
  color:rgba(100,116,139,.95);
  font-size:12px;
}

/* Topbar */
.top-left{display:flex; align-items:center; gap:12px}
.icon-btn{
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.9);
  color:var(--text);
  cursor:pointer;
  box-shadow: var(--shadow2);
}
.icon-btn:hover{background: rgba(99,91,255,.06); border-color: rgba(99,91,255,.22)}
.page-title{display:flex; flex-direction:column; gap:2px}
.pt-main{font-size:15px; font-weight:1000}
.pt-sub{font-size:12px; color:var(--muted)}

/* Panels */
.card{
  background: rgba(255,255,255,.92);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
}
.card-pad{padding:14px}
.row{display:flex; align-items:center; justify-content:space-between; gap:12px}
.gap{gap:12px}
.muted{color:var(--muted)}
.h1{margin:0; font-size:20px; font-weight:1000}
.h2{margin:0; font-size:14px; font-weight:1000}

/* Buttons */
.btn{
  border:0;
  border-radius:12px;
  padding:10px 12px;
  background: linear-gradient(135deg,var(--primary),var(--primary2));
  color:white;
  font-weight:1000;
  cursor:pointer;
  box-shadow: 0 10px 20px rgba(99,91,255,.22);
}
.btn:hover{filter:brightness(1.03)}
.btn-ghost{
  background: rgba(255,255,255,.95);
  border:1px solid var(--line);
  color:var(--text);
  font-weight:900;
}
.btn-ghost:hover{
  background: rgba(99,91,255,.06);
  border-color: rgba(99,91,255,.22);
}
.btn-danger{
  background: rgba(239,68,68,.10);
  border:1px solid rgba(239,68,68,.22);
  color:#991b1b;
}
.btn-danger:hover{background: rgba(239,68,68,.14)}

/* Inputs */
.input{
  height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.95);
  color:var(--text);
  padding:0 12px;
  outline:none;
  width:100%;
}
.input::placeholder{color: rgba(100,116,139,.9)}
.input:focus{
  border-color: rgba(99,91,255,.45);
  box-shadow: 0 0 0 4px rgba(99,91,255,.12);
}
.select{appearance:none}

/* Badges */
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.95);
  font-size:12px;
  font-weight:1000;
}
.badge.ok{border-color: rgba(22,163,74,.25); background: rgba(22,163,74,.08); color:#14532d}
.badge.warn{border-color: rgba(245,158,11,.25); background: rgba(245,158,11,.10); color:#7c2d12}
.badge.gray{border-color: rgba(100,116,139,.18); background: rgba(100,116,139,.08); color:#334155}

/* Table area */
.table-shell{
  display:flex;
  flex-direction:column;
  height: calc(100vh - 64px - 32px);
  gap:12px;
}
.table-toolbar{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:12px;
}
.toolbar-left{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.toolbar-right{display:flex; align-items:center; gap:10px; flex-wrap:wrap}

.table-wrap{
  border-top:1px solid var(--line);
  height:100%;
  overflow:auto;
  background: rgba(255,255,255,.92);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width: 980px;
}
.table thead th{
  position:sticky;
  top:0;
  z-index:2;
  background: rgba(255,255,255,.95);
  border-bottom:1px solid var(--line);
  color: rgba(51,65,85,.92);
  font-size:12px;
  text-align:left;
  padding:11px 10px;
  white-space:nowrap;
}
.table tbody td{
  padding:11px 10px;
  border-bottom:1px solid var(--line2);
  font-size:13px;
  white-space:nowrap;
  color: rgba(15,23,42,.92);
}
.table tbody tr:hover{
  background: rgba(99,91,255,.05);
}

/* Login page */
.login-wrap{
  height:100vh;
  display:grid;
  place-items:center;
  padding:16px;
}
.login-card{
  width:min(520px, 100%);
  padding:18px;
}

/* Overlay for mobile */
.overlay{
  display:none;
  position:fixed; inset:0;
  background: rgba(15,23,42,.35);
  z-index:15;
}

/* Dashboard extras */
.kpi-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}
.kpi-card{
  border-radius: var(--radius);
  border:1px solid var(--line);
  padding:14px;
  box-shadow: var(--shadow2);
  background: rgba(255,255,255,.92);
}
.kpi-blue{background: linear-gradient(135deg, rgba(99,91,255,.18), rgba(255,255,255,.9)); border-color: rgba(99,91,255,.22);}
.kpi-amber{background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(255,255,255,.9)); border-color: rgba(245,158,11,.20);}
.kpi-green{background: linear-gradient(135deg, rgba(22,163,74,.16), rgba(255,255,255,.9)); border-color: rgba(22,163,74,.18);}

.kpi-head{display:flex; align-items:center; justify-content:space-between}
.kpi-title{font-size:12px; color: rgba(30,41,59,.9); font-weight:1000; letter-spacing:.02em}
.kpi-ico{width:34px; height:34px; display:grid; place-items:center; border-radius:12px; background: rgba(255,255,255,.9); border:1px solid var(--line)}
.kpi-value{margin-top:10px; font-size:28px; font-weight:1100}
.kpi-sub{margin-top:6px; font-size:12px; color:var(--muted)}

.filterbar{
  display:flex;
  gap:10px;
  align-items:flex-end;
  flex-wrap:wrap;
}
.filtergroup{min-width:160px}
.filtergroup.grow{flex:1; min-width:260px}
.filterlabel{font-size:11px; color: rgba(51,65,85,.85); margin-bottom:6px; letter-spacing:.06em; text-transform:uppercase}
.filteractions{display:flex; gap:10px}

.dash-grid{
  display:grid;
  grid-template-columns: 0.36fr 0.64fr;
  gap:14px;
}

.qa{margin-top:12px; display:grid; gap:10px}
.qa-btn{
  display:flex; gap:10px; align-items:center;
  padding:12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.92);
  text-decoration:none;
  color: var(--text);
}
.qa-btn:hover{
  background: rgba(99,91,255,.06);
  border-color: rgba(99,91,255,.22);
}
.qa-ico{
  width:44px; height:44px;
  border-radius:14px;
  display:grid; place-items:center;
  background: rgba(99,91,255,.10);
  border:1px solid rgba(99,91,255,.20);
  font-size:18px;
}
.qa-title{font-weight:1100}
.qa-sub{font-size:12px; color:var(--muted); margin-top:2px}
.qa-note{
  margin-top:6px;
  padding:12px;
  border-radius: 14px;
  border:1px dashed rgba(100,116,139,.30);
  background: rgba(255,255,255,.85);
  color: var(--muted);
  font-size:12px;
}

/* Responsive */
@media (max-width: 980px){
  .sidebar{
    transform: translateX(-100%);
    transition: transform .22s ease;
    width: 280px;
  }
  .sidebar.open{transform: translateX(0)}
  .main{left:0}
  .overlay.show{display:block}
  .table{min-width: 860px;}
  .kpi-grid{grid-template-columns:1fr}
  .dash-grid{grid-template-columns:1fr}
}
/* Mal Kabul: daha sıkı ama okunaklı tablo */
.table.dense thead th{
  padding: 9px 10px;
  font-size: 12px;
}
.table.dense tbody td{
  padding: 9px 10px;
  font-size: 12.5px;
  line-height: 1.15;
}
.table.dense tbody tr:nth-child(even){
  background: rgba(99,91,255,.03);
}

/* Filtre satırı */
.filter-row th{
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  padding: 8px 8px;
}
.tfi{
  width:100%;
  height:34px;
  border-radius:10px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.95);
  padding:0 10px;
  outline:none;
  color: var(--text);
  font-size: 12px;
}
.tfi:focus{
  border-color: rgba(99,91,255,.45);
  box-shadow: 0 0 0 3px rgba(99,91,255,.10);
}

/* Tablo alt bar */
.table-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-top:1px solid var(--line);
  background: rgba(255,255,255,.90);
}
.pager{display:flex; gap:8px; align-items:center; flex-wrap:wrap}

/* Üst form grid */
.form-grid{
  display:grid;
  grid-template-columns: 1.2fr 1.2fr 2.2fr 1fr 1fr 1.4fr 2.2fr auto;
  gap:10px;
  align-items:end;
}
.fg{min-width: 0;}
.fg-wide{grid-column: span 2;}
.fg-actions{display:flex; gap:10px; justify-content:flex-end;}
.fl{
  font-size:11px;
  color: rgba(51,65,85,.85);
  margin-bottom:6px;
  letter-spacing:.06em;
  text-transform:uppercase;
}

/* Mobil düzen */
@media (max-width: 1100px){
  .form-grid{
    grid-template-columns: 1fr 1fr;
  }
  .fg-wide{grid-column: span 2;}
  .fg-actions{grid-column: span 2; justify-content:stretch;}
  .fg-actions .btn{width:100%;}
}
