/* ========== GENEL ========== */
:root{
  --bg:#fafafa;
  --text:#222;
  --muted:#666;
  --card:#fff;
  --border:#ddd;
  --accent:#c57c1c;   /* altın ton */
  --err:#c62828;
}

*,
*::before,
*::after{ box-sizing:border-box }

html,body{ height:100%; }

body{
  margin:0;
  color:var(--text);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  background:var(--bg);
  padding:40px 0;
}

/* Kart konteyner */
.container{
  width:clamp(300px, 92vw, 720px);
  margin:0 auto;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  padding:40px 48px;
  box-shadow:0 6px 24px rgba(0,0,0,.06);
}


/* Logo */
.logo{ text-align:center; margin-bottom:16px; }
.logo img{
  width:180px;
  max-width:60vw;
  height:auto;
  display:inline-block;
}

.login {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
}
/* Başlık */
h2{
  margin:8px 0 24px 0;
  text-align:center;
  color:var(--accent);
  font-size:clamp(22px, 2.6vw, 28px);
  line-height:1.2;
}

/* Form alanları */
label{
  display:block;
  margin-top:14px;
  font-weight:600;
}
label span{ color:var(--err); }

input[type="text"],
input[type="email"],
input[type="tel"]{
  width:100%;
  padding:12px 14px;
  border:1px solid #ccc;
  border-radius:10px;
  font-size:16px;
  outline:none;
  transition:border-color .2s, box-shadow .2s;
  background:#fff;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus{
  border-color:color-mix(in oklab, var(--accent) 65%, #888 35%);
  box-shadow:0 0 0 4px color-mix(in oklab, var(--accent) 20%, transparent);
}

/* Radyo grubu */
.radio-group{ gap:18px; }
.radio-group label{ font-weight:500; }

/* Checkbox grubu */
.checkbox-group{
  margin-top:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.checkbox-group label{
  display:flex;
  align-items:flex-start;
  gap:10px;
  line-height:1.5;
  font-weight:500;
}
.checkbox-group input[type="checkbox"]{ margin-top:2px; }

/* Butonlar */
.buttons{
  margin-top:24px;
  display:flex;
  gap:10px;
  justify-content:flex-end;
}
button{
  padding:12px 18px;
  border:none;
  border-radius:10px;
  cursor:pointer;
  font-weight:700;
  font-size:15px;
}
.cancel{ background:#eee; color:#555; }
.cancel:hover{ filter:brightness(.97); }
.submit{ background:var(--accent); color:#fff; }
.submit:hover{ filter:brightness(1.05); }

/* Küçük alan hata metni istersen bunu kullan (form içinde) */
.field-error{ color:var(--err); font-size:13px; margin-top:6px; }

/* Cinsiyet sonrası ayraç */
.form-sep{
  border:none;
  border-top:1px dashed #e2e2e2;
  margin:24px 0 18px;
  height:0;
}
@media (max-width:768px){
  .form-sep{ margin:20px 0 16px; }
}

/* Link görünümleri */
.inline-link, .cp-link{
  text-decoration:underline;
  color:#c57c1c;
}
.inline-link:hover, .cp-link:hover{ opacity:.85; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px){
  body{ padding:24px 0; }
  .container{
    width:clamp(300px, 94vw, 680px);
    padding:24px 20px;
    border-radius:12px;
  }
  .buttons button{ padding:12px 16px; font-size:16px; }
}
@media (max-width: 480px){
  .container{
    width:94vw;
    padding:18px 14px;
    border:1px solid #eee;
  }
  .buttons{
    flex-direction:column;
    justify-content:stretch;
  }
  .buttons .cancel, .buttons .submit{
    width:100%;
    font-size:16px;
  }
}
@media (max-width: 360px){
  input[type="text"],
  input[type="email"],
  input[type="tel"]{ padding:11px 12px; }
  .checkbox-group label{ font-size:14px; }
}

/* ========== SAĞ-ÜST TOAST MESAJ ========== */
.toast{
  position:fixed; top:24px; right:24px; z-index:9999;
  display:flex; align-items:center; gap:10px;
  max-width:min(420px, 92vw);
  padding:12px 14px; border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.12);
  border:1px solid; animation:toastIn .18s ease-out;
  font-size:14px; line-height:1.4;
}
.toast.is-ok{ background:#e8f5e9; color:#1b5e20; border-color:#c8e6c9; }
.toast.is-err{ background:#ffebee; color:#b71c1c; border-color:#ffcdd2; }
.toast-close{
  background:transparent; border:none; font-size:20px; line-height:1; cursor:pointer;
  color:inherit; opacity:.7;
}
.toast-close:hover{ opacity:1; }
.toast.is-hide{ opacity:0; transform:translateY(-6px); transition:all .3s; }
@keyframes toastIn{ from{opacity:0; transform:translateY(-6px)} to{opacity:1; transform:none} }
@media (max-width:480px){
  .toast{ left:50%; right:auto; transform:translateX(-50%); }
}

/* ========== GELİŞMİŞ TABLO STİLLERİ ========== */
.table tr[data-id] {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.table tr[data-id]:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%) !important;
  box-shadow: 0 2px 8px rgba(197, 124, 28, 0.1);
}

.table tr[data-id].is-active {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

/* HIZALAMA DÜZELTMESİ */
.table th, .table td {
  padding: 10px 8px !important;
  box-sizing: border-box;
}
.table th:first-child, .table td:first-child {
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  padding: 10px 4px !important;
}

/* ========== DETAY PANELİ İYİLEŞTİRMELERİ ========== */
#detailCard {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  opacity: 1;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

#detailCard.loading {
  opacity: 0.7;
  transform: translateY(10px);
}

.kv {
  padding: 12px 16px;
  margin: 4px 0;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.kv:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-color: #dee2e6;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.kv b {
  min-width: 140px;
  color: #495057;
  font-weight: 600;
  display: inline-block;
  position: relative;
}

.kv b::after {
  content: ':';
  margin-left: 4px;
  color: #6c757d;
}

.kv span {
  color: #212529;
  font-weight: 500;
}

/* ========== BADGE İYİLEŞTİRMELERİ ========== */
.badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.badge:hover::before {
  left: 100%;
}

.k-yes {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.k-no {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  color: #b71c1c;
  border: 1px solid #ef9a9a;
}

.badge-gray {
  background: linear-gradient(135deg, #f1f1f1 0%, #e0e0e0 100%);
  color: #555;
  border: 1px solid #d0d0d0;
}

/* ========== BUTON İYİLEŞTİRMELERİ ========== */
.btn {
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-danger {
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.4);
}

.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ========== CHECKBOX İYİLEŞTİRMELERİ ========== */
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #c57c1c;
  transition: all 0.2s ease;
}

input[type="checkbox"]:hover {
  transform: scale(1.1);
}

/* ========== RESPONSIVE İYİLEŞTİRMELERİ ========== */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  #detailCard {
    position: static;
    max-height: none;
  }
  
  .table {
    font-size: 13px;
  }
  
  .table th, .table td {
    padding: 8px 6px;
  }
}

@media (max-width: 600px) {
  .table th, .table td {
    padding: 6px 4px;
    font-size: 12px;
  }
  
  .kv {
    padding: 8px 12px;
  }
  
  .kv b {
    min-width: 100px;
    font-size: 13px;
  }
}

/* ========== GELİŞMİŞ ANİMASYONLAR ========== */
* {
  scroll-behavior: smooth;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c57c1c;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0522d;
}