:root{
  --bg:#F5F4F0; --surface:#FFFFFF; --ink:#22271F; --ink-muted:#5B6156;
  --border:#D8D5CC; --accent:#2F6F62; --accent-ink:#1F4B41; --accent-soft:#E4EEEA;
  --warn:#9C6B2E; --warn-soft:#F3E7D6; --danger:#A23B3B; --danger-soft:#F5E3E1;
  --ok:#2F6F62; --ok-soft:#E4EEEA;
}
*{box-sizing:border-box;}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  line-height:1.5;
}
a{ color:var(--accent-ink); }
.container{ max-width:1000px; margin:0 auto; padding:0 20px 60px; }

/* Top nav */
.topbar{
  background:var(--surface); border-bottom:1px solid var(--border);
  margin-bottom:28px;
}
.topbar-inner{
  max-width:1000px; margin:0 auto; padding:14px 20px;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px;
}
.brand{ font-weight:700; font-size:16px; }
.brand span{ color:var(--accent-ink); }
.nav{ display:flex; gap:18px; align-items:center; font-size:14px; }
.nav a{ color:var(--ink-muted); text-decoration:none; }
.nav a:hover, .nav a.active{ color:var(--accent-ink); }
.nav .who{ color:var(--ink-muted); font-size:13px; }

/* Login */
.login-wrap{ display:flex; min-height:100vh; align-items:center; justify-content:center; padding:24px; }
.login-box{
  background:var(--surface); border:1px solid var(--border); border-radius:12px;
  padding:38px 34px; width:100%; max-width:380px;
  box-shadow:0 2px 10px rgba(20,30,20,.07);
}
.login-box h1{ font-size:19px; margin:0 0 6px; font-weight:800; }
.login-sub{ font-size:13px; color:var(--ink-muted); margin:0 0 24px; }
.login-icon{
  width:42px; height:42px; border-radius:10px; background:var(--accent-soft); color:var(--accent-ink);
  display:flex; align-items:center; justify-content:center; margin-bottom:16px;
}
.back-link{
  display:inline-flex; align-items:center; gap:5px; font-size:12.5px; color:var(--ink-muted);
  text-decoration:none; margin-bottom:20px;
}
.back-link:hover{ color:var(--accent-ink); }

/* Dil secici */
.lang-switch{ display:flex; gap:4px; }
.lang-btn{
  font-size:11.5px; font-weight:700; padding:4px 8px; border-radius:5px;
  color:var(--ink-muted); text-decoration:none; letter-spacing:.02em;
}
.lang-btn:hover{ background:var(--accent-soft); color:var(--accent-ink); }
.lang-btn.active{ background:var(--accent); color:#fff; }

/* Forms */
label{ display:block; font-size:13px; font-weight:600; margin-bottom:5px; color:var(--ink-muted); }
input[type=text], input[type=password], input[type=email], input[type=file], select, textarea{
  width:100%; padding:9px 11px; border:1px solid var(--border); border-radius:4px;
  font-size:14px; background:var(--surface); color:var(--ink); margin-bottom:16px;
}
input:focus, select:focus, textarea:focus{ outline:2px solid var(--accent); outline-offset:-1px; }

.btn{
  display:inline-block; padding:9px 16px; border-radius:4px; border:1px solid transparent;
  font-size:14px; font-weight:600; cursor:pointer; text-decoration:none;
}
.btn-primary{ background:var(--accent); color:#fff; }
.btn-primary:hover{ background:var(--accent-ink); }
.btn-secondary{ background:var(--surface); color:var(--ink); border-color:var(--border); }
.btn-secondary:hover{ background:var(--accent-soft); }
.btn-danger{ background:var(--surface); color:var(--danger); border-color:var(--danger); }
.btn-danger:hover{ background:var(--danger-soft); }
.btn-sm{ padding:5px 10px; font-size:12.5px; }

.error{ background:var(--danger-soft); color:var(--danger); padding:10px 14px; border-radius:4px; font-size:13.5px; margin-bottom:16px; }
.success{ background:var(--ok-soft); color:var(--accent-ink); padding:10px 14px; border-radius:4px; font-size:13.5px; margin-bottom:16px; }
.note{ background:var(--accent-soft); border:1px solid var(--accent); border-radius:4px; padding:12px 14px; font-size:13.5px; margin-bottom:20px; }
.warn-note{ background:var(--warn-soft); border-left:3px solid var(--warn); border-radius:0 4px 4px 0; padding:10px 14px; font-size:13.5px; margin-bottom:20px; }

/* Cards */
.card{
  background:var(--surface); border:1px solid var(--border); border-radius:10px;
  padding:22px 24px; margin-bottom:22px; box-shadow:0 1px 2px rgba(20,30,20,.045);
}
.card h2{ font-size:15px; margin:0 0 16px; font-weight:700; }
.page-title{ display:flex; align-items:center; justify-content:space-between; margin:2px 0 22px; flex-wrap:wrap; gap:10px; }
.page-title h1{ font-size:23px; margin:0; font-weight:800; letter-spacing:-.01em; }

/* Tables */
table{ width:100%; border-collapse:collapse; font-size:13.5px; }
th{ text-align:left; font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-muted); border-bottom:1px solid var(--border); padding:10px 12px; }
th a{ color:inherit; text-decoration:none; white-space:nowrap; }
th a:hover{ color:var(--accent-ink); }
td{ padding:12px; border-bottom:1px solid var(--border); vertical-align:middle; }
tbody tr:hover td{ background:color-mix(in srgb, var(--accent-soft) 45%, transparent); }
tr:last-child td{ border-bottom:none; }
.table-wrap{ overflow-x:auto; }

/* Badges */
.badge{ display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:99px; font-size:11.5px; font-weight:700; }
.badge-beklemede{ background:var(--warn-soft); color:var(--warn); }
.badge-kuyrukta{ background:#DCE7F5; color:#2C5A8C; }
.badge-gonderildi{ background:var(--ok-soft); color:var(--accent-ink); }
.badge-hata{ background:var(--danger-soft); color:var(--danger); }

.stat-row{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:20px; }
.stat{ background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:14px 18px; min-width:120px; }
.stat .num{ font-size:24px; font-weight:700; font-variant-numeric:tabular-nums; }
.stat .lbl{ font-size:12px; color:var(--ink-muted); text-transform:uppercase; letter-spacing:.04em; }

.empty{ color:var(--ink-muted); font-size:14px; padding:20px 0; text-align:center; }

.form-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:0 20px; }
.form-grid .full{ grid-column:1 / -1; }
.checkbox-row{ display:flex; align-items:center; gap:8px; font-weight:400; margin-bottom:16px; }
.checkbox-row input{ width:auto; margin:0; }

/* ===== Admin sidebar shell ===== */
.app-shell{ display:flex; min-height:100vh; align-items:stretch; }
.sidebar{
  width:232px; flex:none; background:var(--surface); border-right:1px solid var(--border);
  display:flex; flex-direction:column; padding:22px 0 16px;
}
.sidebar .brand{ padding:0 22px 22px; font-size:15.5px; }
.sidebar-nav{ display:flex; flex-direction:column; gap:2px; padding:0 12px; flex:1; }
.sidebar-nav a{
  display:flex; align-items:center; gap:11px; padding:9px 12px; border-radius:7px;
  color:var(--ink-muted); text-decoration:none; font-size:13.5px; font-weight:600;
}
.sidebar-nav a svg{ flex:none; opacity:.8; }
.sidebar-nav a:hover{ background:var(--accent-soft); color:var(--accent-ink); }
.sidebar-nav a.active{ background:var(--accent-soft); color:var(--accent-ink); }
.sidebar-nav a.active svg{ opacity:1; }
.sidebar-foot{
  padding:16px 22px 0; margin-top:10px; border-top:1px solid var(--border);
  font-size:12.5px; color:var(--ink-muted); line-height:1.6;
}
.sidebar-foot a{ color:var(--ink-muted); }
.sidebar-foot a:hover{ color:var(--accent-ink); }

.main-area{ flex:1; min-width:0; }
.main-inner{ max-width:1120px; margin:0 auto; padding:30px 30px 70px; }

@media (max-width:880px){
  .app-shell{ flex-direction:column; }
  .sidebar{
    width:100%; flex-direction:row; align-items:center; padding:12px 16px;
    overflow-x:auto; border-right:none; border-bottom:1px solid var(--border);
  }
  .sidebar .brand{ padding:0 16px 0 0; white-space:nowrap; }
  .sidebar-nav{ flex-direction:row; padding:0; }
  .sidebar-nav a{ white-space:nowrap; }
  .sidebar-foot{ display:none; }
  .main-inner{ padding:22px 18px 50px; }
}

/* KPI kartlari (dashboard) */
.kpi-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:14px; margin-bottom:26px; }
.kpi-card{
  background:var(--surface); border:1px solid var(--border); border-radius:10px;
  padding:18px 20px; display:flex; flex-direction:column; gap:10px;
  box-shadow:0 1px 2px rgba(20,30,20,.045);
}
.kpi-card .kpi-icon{
  width:34px; height:34px; border-radius:8px; display:flex; align-items:center;
  justify-content:center; background:var(--accent-soft); color:var(--accent-ink);
}
.kpi-card.warn .kpi-icon{ background:var(--warn-soft); color:var(--warn); }
.kpi-card .kpi-num{ font-size:27px; font-weight:800; font-variant-numeric:tabular-nums; letter-spacing:-.01em; }
.kpi-card .kpi-lbl{ font-size:12.5px; color:var(--ink-muted); }

/* Ay kartlari (personel paneli) */
.month-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:14px; }
.month-card{
  background:var(--surface); border:1px solid var(--border); border-radius:10px;
  padding:18px; text-decoration:none; color:var(--ink); display:flex; flex-direction:column;
  gap:10px; transition:border-color .15s;
}
.month-card:hover{ border-color:var(--accent); }
.month-card .m-icon{
  width:32px; height:32px; border-radius:8px; background:var(--accent-soft); color:var(--accent-ink);
  display:flex; align-items:center; justify-content:center;
}
.month-card .m-title{ font-size:14.5px; font-weight:700; }
.month-card .m-date{ font-size:11.5px; color:var(--ink-muted); }
.month-card.latest{ border-color:var(--accent); background:color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.month-card.latest .m-icon{ background:var(--accent); color:#fff; }
.m-badge{
  background:var(--accent); color:#fff; font-size:10px; padding:2px 8px; border-radius:99px;
  font-weight:700; letter-spacing:.03em; align-self:flex-start; text-transform:uppercase;
}

/* PDF gorunumu */
.pdf-viewer{ border:1px solid var(--border); border-radius:10px; overflow:hidden; background:var(--surface); margin-top:22px; }
.pdf-toolbar{ display:flex; justify-content:space-between; align-items:center; padding:12px 18px; border-bottom:1px solid var(--border); gap:10px; flex-wrap:wrap; }
.pdf-toolbar strong{ font-size:14px; }
.pdf-viewer iframe{ width:100%; height:78vh; border:0; display:block; }

/* Genel giris ana sayfasi (anasayfa.php) */
body.landing-page{
  min-height:100vh; display:flex; flex-direction:column;
}
.landing-header{
  display:flex; justify-content:space-between; align-items:center;
  padding:22px 5vw; max-width:1200px; margin:0 auto; width:100%; flex:none;
}
.landing-hero{
  max-width:1200px; margin:0 auto; padding:28px 5vw 64px; width:100%;
  display:grid; grid-template-columns:1.15fr 0.85fr; gap:56px; align-items:start;
  flex:1; align-content:center;
}
@media (max-width:860px){ .landing-hero{ grid-template-columns:1fr; gap:36px; } }
.hero-eyebrow{
  font-size:12.5px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--accent-ink); font-weight:700; margin:0 0 14px;
}
.hero-title{
  font-size:clamp(30px,4.4vw,46px); line-height:1.14; margin:0 0 18px;
  text-wrap:balance; font-weight:800; letter-spacing:-.01em;
}
.hero-title em{ font-style:normal; color:var(--accent-ink); }
.hero-sub{ font-size:16px; color:var(--ink-muted); max-width:48ch; margin:0 0 30px; line-height:1.65; }
.hero-ctas{ display:flex; gap:12px; flex-wrap:wrap; }
.btn-lg{ padding:13px 26px; font-size:15px; border-radius:6px; }
.announce-col{ display:flex; flex-direction:column; gap:12px; }
.announce-card{ background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:18px 20px; }
.announce-date{
  font-size:11px; color:var(--ink-muted); text-transform:uppercase;
  letter-spacing:.05em; margin-bottom:6px; display:block; font-variant-numeric:tabular-nums;
}
.announce-card h3{ font-size:15px; margin:0 0 6px; }
.announce-card p{ font-size:13.5px; color:var(--ink); margin:0; line-height:1.6; white-space:pre-line; }
.landing-footer{
  text-align:center; padding:22px 20px; font-size:12px; color:var(--ink-muted);
  border-top:1px solid var(--border); background:var(--surface); flex:none; width:100%;
}

/* Destek talepleri (ticket/chat) */
.chat-thread{
  display:flex; flex-direction:column; gap:14px; margin-bottom:18px;
  max-height:480px; overflow-y:auto; padding:4px 6px; scroll-behavior:smooth;
}
.chat-bubble{
  max-width:72%; padding:12px 15px; border-radius:12px; background:var(--surface);
  border:1px solid var(--border); align-self:flex-start;
}
.chat-bubble.mine{ align-self:flex-end; background:var(--accent-soft); border-color:var(--accent-soft); }
.chat-bubble.sistem{
  align-self:center; max-width:88%; background:var(--warn-soft); color:var(--warn);
  font-size:12.5px; border:none; text-align:center;
}
.chat-meta{ font-size:11px; color:var(--ink-muted); margin-bottom:4px; display:flex; gap:8px; }
.chat-bubble p{ margin:0; font-size:13.5px; line-height:1.55; white-space:pre-line; color:var(--ink); }
.chat-bubble.sistem p{ color:var(--warn); font-size:12.5px; }
.chat-attachment{ max-width:220px; max-height:220px; border-radius:8px; margin-top:8px; display:block; border:1px solid var(--border); }
.sla-badge{ font-size:11.5px; color:var(--ink-muted); }
.survey-card{
  background:var(--accent-soft); border:1px solid var(--accent); border-radius:10px;
  padding:20px 22px; margin-top:20px;
}
.survey-card h3{ margin:0 0 4px; font-size:15px; color:var(--accent-ink); }
.survey-card p{ margin:0 0 14px; font-size:13px; color:var(--ink-muted); }
.star-row{ display:flex; gap:6px; margin-bottom:14px; }
.star-row label{ display:inline; margin:0; }
.star-row input[type="radio"]{ width:auto; margin:0 3px 0 0; display:inline-block; }

/* Sayfalama */
.pagination{ display:flex; align-items:center; gap:4px; flex-wrap:wrap; margin-top:16px; }
.page-link{
  display:inline-flex; align-items:center; justify-content:center; min-width:32px; height:32px;
  padding:0 9px; border:1px solid var(--border); border-radius:6px; font-size:13px;
  color:var(--ink); text-decoration:none; background:var(--surface);
}
.page-link:hover{ background:var(--accent-soft); border-color:var(--accent); }
.page-link.active{ background:var(--accent); color:#fff; border-color:var(--accent); font-weight:700; }
.page-link.disabled{ color:var(--ink-muted); opacity:.5; cursor:default; }
.page-info{ font-size:13px; color:var(--ink-muted); padding:0 6px; }

/* Arama kutusu + buton birlikte */
.search-row{ display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; align-items:center; }
.search-row input[type="text"]{ margin:0; max-width:300px; }

/* Logo */
.brand-logo{ height:36px; max-width:200px; width:auto; display:block; object-fit:contain; }
.sidebar .brand-logo{ height:46px; max-width:210px; }
.landing-header .brand-logo{ height:50px; max-width:240px; }
.logo-preview{
  width:160px; height:90px; border:1px dashed var(--border); border-radius:10px;
  display:flex; align-items:center; justify-content:center; padding:10px; background:var(--surface);
  flex:none;
}
.logo-preview img{ max-width:100%; max-height:100%; object-fit:contain; }
.logo-preview-empty{ font-size:12.5px; color:var(--ink-muted); text-align:center; }
