:root{
  --bg:#eef2f7;                 /* biraz daha koyu arka plan */
  --panel:#ffffff;
  --card:#ffffff;
  --text:#0d1b2a;               /* metin kontrast + */
  --muted:#52637b;
  --brand:#2563eb;              /* buton rengi daha dolu mavi */
  --brand-2:#1d4ed8;
  --ring: rgba(37,99,235,.28);
  --ok:#12b886;
  --warn:#f59f00;
  --radius:18px;                /* köşeler yumuşatıldı */
  --shadow:0 18px 40px rgba(13,27,42,.12); /* gölge + */
  --border:1px solid #dfe6f3;   /* sınır hafif koyu */
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font:15px/1.6 system-ui,-apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background:
    radial-gradient(700px 320px at 10% 0%, rgba(37,99,235,.08), transparent 40%),
    radial-gradient(700px 320px at 90% 0%, rgba(29,78,216,.06), transparent 42%),
    linear-gradient(180deg,#f6f8fc, var(--bg));
}

.container{max-width:1100px;margin:0 auto;padding:20px}
.header{
  position:sticky;top:0;z-index:10;
  backdrop-filter:saturate(1.05) blur(10px);
  background:rgba(255,255,255,.86);
  border-bottom:var(--border);
}
.brand{display:flex;align-items:center;gap:12px}
.brand img{width:36px;height:36px}
.brand .title{margin:0;font-size:clamp(20px,2.4vw,28px);font-weight:800;letter-spacing:.2px}
.small{font-size:12px;color:#6b7a94}

.card{
  background:var(--card);
  border:var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.card .hd{padding:14px 16px;border-bottom:var(--border);display:flex;justify-content:space-between;gap:10px;align-items:center}
.card .bd{padding:16px}

input,select,textarea,button{font:inherit}
.field{margin-bottom:12px}
.field label{display:block;margin-bottom:6px;font-size:13px;color:#41506b}
.field input,.field select,.field textarea{
  width:100%;padding:12px 14px;border-radius:12px;border:1px solid #cfd8ea;background:#fff;color:var(--text);outline:none;transition:.2s;
}
.field input:focus,.field select:focus,.field textarea:focus{box-shadow:0 0 0 3px var(--ring)}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 14px;border-radius:12px;border:none;
  background:linear-gradient(180deg,#3b82f6,#2563eb);
  color:#fff;cursor:pointer;transition:.2s;font-weight:700;
}
.btn:hover{filter:brightness(1.03);transform:translateY(-1px)}
.btn.primary{background:linear-gradient(180deg,#3b82f6,#2563eb)}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.btn.ghost:hover {
  background: #f5f5f5;
}
.btn.ghost.small {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1.2;
}
.btn.ghost.small .icon {
  opacity: 0.7;
  font-size: 14px;
}
.btn.ghost.small:hover .icon {
  opacity: 1;
}


.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  padding:6px 10px;border-radius:999px;border:var(--border);
  background:#f4f7fc;color:#41506b
}
.badge-pink { background:#e91e63; color:#fff; }
.badge-blue { background:#2196f3; color:#fff; }
.badge-purple { background:#9c27b0; color:#fff; }
.badge-brown { background:#795548; color:#fff; }
.badge-green { background:#4caf50; color:#fff; }
.badge-red { background:#f44336; color:#fff; }

.badge.danger {
  background: #ffecec;
  color:#d32f2f;
  font-weight:600;
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 12px;
}

.wrap{display:grid;gap:18px;grid-template-columns:1fr 360px;margin-top:18px}
@media (max-width:960px){ .wrap{grid-template-columns:1fr} }

/* tables */
table{width:100%;border-collapse:collapse;background:#fff}
thead th{font-size:12px;color:#60708d;font-weight:700;text-align:left;border-bottom:var(--border);padding:10px 8px;background:#f8fbff}
tbody td{border-bottom:var(--border);padding:10px 8px;vertical-align:top}
td.num{text-align:right;font-weight:700}

/* modal */
dialog{
  border:none;
  border-radius:20px;
  max-width:480px;
  width:calc(100% - 32px);
  max-height:90vh;
  padding:0;
  background:#fff;
  color:var(--text);
  box-shadow:0 20px 60px rgba(0,0,0,.2);
  position:fixed;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  overflow:hidden;
  animation:modalFadeIn 0.2s ease-out;
}
@keyframes modalFadeIn{
  from{opacity:0;transform:translate(-50%, -48%);}
  to{opacity:1;transform:translate(-50%, -50%);}
}
dialog::backdrop{
  background:rgba(0,0,0,.5);
  backdrop-filter:blur(4px);
  animation:backdropFadeIn 0.2s ease-out;
}
@keyframes backdropFadeIn{
  from{opacity:0;}
  to{opacity:1;}
}
.modal-hd{
  padding:20px 24px 16px;
  border-bottom:var(--border);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.modal-hd h3{
  margin:0;
  font-size:18px;
  font-weight:700;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:10px;
}
.modal-icon{
  width:24px;
  height:24px;
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  font-size:16px;
}
.modal-icon.success{
  background:#e8f5e9;
  color:#2e7d32;
}
.modal-icon.error{
  background:#ffebee;
  color:#c62828;
}
.modal-icon.info{
  background:#e3f2fd;
  color:#1976d2;
}
.modal-bd{
  padding:20px 24px;
  overflow-y:auto;
  max-height:calc(90vh - 120px);
}
.modal-bd p{
  margin:0;
  line-height:1.6;
  color:var(--text);
  font-size:14px;
}
.modal-footer{
  padding:16px 24px 20px;
  border-top:var(--border);
  display:flex;
  justify-content:flex-end;
  gap:10px;
}
.close{
  background:#fff;
  border:var(--border);
  color:var(--text);
  border-radius:10px;
  padding:8px 16px;
  cursor:pointer;
  font-size:14px;
  font-weight:500;
  transition:all 0.2s;
  min-width:80px;
}
.close:hover{
  background:#f5f5f5;
  border-color:#ccc;
}
.close:active{
  transform:scale(0.98);
}
/* Responsive modal */
@media (max-width:640px){
  dialog{
    width:calc(100% - 24px);
    max-width:none;
    border-radius:16px;
    margin:12px;
  }
  .modal-hd{
    padding:16px 20px 12px;
  }
  .modal-hd h3{
    font-size:16px;
  }
  .modal-bd{
    padding:16px 20px;
  }
  .modal-footer{
    padding:12px 20px 16px;
    flex-direction:column;
  }
  .close{
    width:100%;
  }
}

/* totals & checks */
.note{color:var(--muted);font-size:13px}
.totals{display:grid;gap:8px}
.row{display:flex;justify-content:space-between;align-items:center}
.row.total{border-top:var(--border);padding-top:10px;font-weight:800}
.checks{display:grid;gap:10px;margin-top:10px}
.check{display:flex;gap:10px;align-items:flex-start}
.check input{width:18px;height:18px;margin-top:3px}
.checks label.error { outline: 1px solid #b3261e; border-radius: 6px; padding: 4px; }

/* payment */
.payopt{display:flex;gap:10px;flex-wrap:wrap}
.opt{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;border:var(--border);background:#fff;cursor:pointer}
.opt input{width:18px;height:18px}
.iban{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:10px 12px;border-radius:12px;border:var(--border);background:#fff}
.summary .rowline{display:flex;justify-content:space-between;align-items:center;margin:6px 0}
.summary .total{border-top:var(--border);padding-top:10px;font-weight:800}
.okpanel{display:none;margin-top:10px;padding:12px;border-radius:12px;background:#f5f9ff;border:var(--border)}
.okpanel.ok{display:block}
.okpanel .title{font-weight:800;margin-bottom:4px}
.okpanel .desc{color:#51607a;font-size:13px}

/* yalnız login kartına min. ayar (varsa) */
.login-card{max-width:520px;padding:22px 20px}
.totals .discount-badge {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 6px;
  border-radius: 8px;
  font-size: 12px;
  background: #fff4f4;
  color: #8a1d1d;
  border: 1px solid #ffcccc;
}

#mTitle {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 8px;
  color: #0d1b2a;
}
#mDesc {
  font-size: 14px;
  line-height: 1.6;
  color: #34425a;
  margin-bottom: 10px;
}
#mFeats li {
  margin-bottom: 4px;
  font-size: 13px;
  color: #41506b;
}

/* ============================================
   UI/UX İYİLEŞTİRMELERİ
   ============================================ */

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.toast {
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease-out;
  background: #fff;
  border-left: 4px solid;
}

.toast.success {
  border-left-color: var(--ok);
  background: #f0fdf4;
  color: #166534;
}

.toast.error {
  border-left-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
}

.toast.info {
  border-left-color: var(--brand);
  background: #eff6ff;
  color: #1e40af;
}

.toast.warn {
  border-left-color: var(--warn);
  background: #fffbeb;
  color: #92400e;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.fade-out {
  animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Form Validation Feedback */
.field.error input,
.field.error select,
.field.error textarea {
  border-color: #ef4444;
  background: #fef2f2;
}

.field.error input:focus,
.field.error select:focus,
.field.error textarea:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.field .error-message {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  color: #ef4444;
}

.field.error .error-message {
  display: block;
}

.field.success input,
.field.success select,
.field.success textarea {
  border-color: var(--ok);
}

/* Better Button States */
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.success {
  background: linear-gradient(180deg, #10b981, #059669);
}

/* Mobile UX İyileştirmeleri */
@media (max-width: 640px) {
  .container {
    padding: 12px;
  }
  
  .card {
    border-radius: 12px;
  }
  
  .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px; /* iOS zoom önleme */
  }
  
  .field input,
  .field select,
  .field textarea {
    font-size: 16px; /* iOS zoom önleme */
    padding: 14px;
  }
  
  .header {
    padding: 12px 0;
  }
  
  .brand .title {
    font-size: 20px;
  }
  
  table {
    font-size: 13px;
  }
  
  .wrap {
    gap: 12px;
  }
  
  .toast-container {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* Smooth Transitions */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(13, 27, 42, 0.15);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
}