/* Kolay PDKS paneli: Kolay Elements (kolay-elements.css) üstüne sayfa iskeleti.
   Komponent görünümleri Kolay Elements'ten gelir; buradaki sınıflar pdks- önekiyle
   yalnızca yerleşim ve Kolay Elements'te statik karşılığı olmayan parçalar içindir. */

@font-face {
  font-family: 'kolayik';
  src: url('../assets/fonts/kolayik.woff') format('woff'), url('../assets/fonts/kolayik.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: block;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; padding: 0; background: #fff; color: rgba(22, 42, 76, .9);
  font: 13px/20px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }

/* ---------- iskelet ---------- */
.pdks-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.pdks-side { background: #f0f2f5; padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; }
.pdks-logo { display: flex; align-items: center; gap: 10px; padding: 4px 12px 20px; text-decoration: none; }
.pdks-logo img { height: 24px; width: auto; display: block; }
.pdks-logo span {
  font-size: 11px; font-weight: 600; letter-spacing: .04em; color: #376bfb;
  background: #e1e5fe; padding: 1px 8px; border-radius: 10px;
}
.pdks-nav {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 4px;
  background: transparent; color: rgba(22, 42, 76, .7); font-size: 14px; font-weight: 500; text-align: left;
  cursor: pointer; text-decoration: none;
}
.pdks-nav:hover { background: rgba(22, 42, 76, .06); color: rgba(22, 42, 76, .9); }
.pdks-nav.is-active { background: #e1e5fe; color: #305ed8; }
.pdks-nav:focus-visible { outline: 2px solid #376bfb; outline-offset: 1px; }
.pdks-side-foot { margin-top: auto; padding: 12px; font-size: 12px; line-height: 16px; color: rgba(22, 42, 76, .5); }

.pdks-main { min-width: 0; display: flex; flex-direction: column; }
.pdks-main .kolay-navigation-bar { position: sticky; top: 0; z-index: 5; }
.pdks-user { display: inline-flex; align-items: center; gap: 12px; direction: ltr; vertical-align: middle; }
.pdks-user .kolay-avatar { display: inline-block; }
.pdks-user-mail { font-size: 13px; color: rgba(22, 42, 76, .7); max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdks-content { padding: 24px; display: grid; gap: 20px; align-content: start; }

/* ---------- kart içi ---------- */
.pdks-card-body { padding: 4px 20px 20px; }
.pdks-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.pdks-toolbar > * { flex: 0 1 180px; min-width: 140px; }
.pdks-toolbar > .pdks-grow { flex: 1 1 auto; }
.pdks-toolbar > .pdks-fit { flex: 0 0 auto; min-width: 0; }
.pdks-toolbar .kolay-element-wrapper { margin: 0; }
/* KolayDatepicker react-day-picker'a bağlı; statik karşılığı: KolayInput görünümünde yerel tarih alanı */
.pdks-date {
  display: block; width: 100%; min-height: 44px; padding: 0 10px; margin: 0; font: inherit; font-size: 13px; color: #162a4c;
  background: #f0f2f5; border: 0; border-bottom: 1px solid rgba(22, 42, 76, .5); border-radius: 4px 4px 0 0;
  outline: none; -webkit-appearance: none; appearance: none; caret-color: #376bfb;
}
.kolay-element-wrapper.focused .pdks-date { border-bottom: 2px solid #376bfb; }
.pdks-date::-webkit-datetime-edit { color: #162a4c; }
.pdks-date:not(:focus):invalid::-webkit-datetime-edit, .pdks-date[value=""]::-webkit-datetime-edit { color: rgba(22, 42, 76, .5); }
.kolay-filter-root .kolay-filter:focus-visible { outline: 2px solid #376bfb; outline-offset: 1px; }
.kolay-filter-modal .kolay-checkbox-wrapper { margin-bottom: 8px; }
.kolay-filter-modal .filter-category label { margin-bottom: 10px; }
.pdks-label { display: block; font-size: 13px; line-height: 20px; font-weight: 500; margin-bottom: 8px; color: rgba(22, 42, 76, .9); }
.pdks-table-scroll { overflow-x: auto; }
.pdks-table-scroll table { width: 100%; min-width: 760px; border-collapse: collapse; }
.kolay-datatable th { text-align: left; white-space: nowrap; }
.kolay-datatable td { vertical-align: middle; }
.pdks-muted { color: rgba(22, 42, 76, .5); }
.pdks-sub { display: block; font-size: 12px; line-height: 16px; color: rgba(22, 42, 76, .5); }
.pdks-mono { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pdks-right { text-align: right !important; }
.pdks-chips { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pdks-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(22, 42, 76, .5); }
.pdks-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3bc559; }
.pdks-live.is-paused::before { background: #c0cad9; }

.pdks-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pdks-actions .kolay-button { width: 100%; height: 64px; font-size: 15px; }
.kolay-button > span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pdks-ip { font-size: 20px; line-height: 28px; font-weight: 500; color: #162a4c; font-variant-numeric: tabular-nums; }
.pdks-toggle-cell .kolay-checkbox-wrapper { margin-bottom: 0; }
.pdks-toggle-cell .kolay-checkbox-wrapper.is-busy { opacity: .5; pointer-events: none; }
.pdks-note { font-size: 13px; color: rgba(22, 42, 76, .7); max-width: 70ch; }
.kolay-empty-state { margin: 8px 0; }

/* ---------- giriş ---------- */
.pdks-login { min-height: 100vh; display: grid; place-items: center; background: #f0f2f5; padding: 16px; }
.pdks-login-box {
  width: 100%; max-width: 400px; background: #fff; border: 1px solid rgba(22, 42, 76, .15); border-radius: 4px;
  padding: 40px 32px; text-align: center;
}
.pdks-login-box img { height: 32px; width: auto; margin: 0 auto 24px; display: block; }
.pdks-login-box h1 { font-size: 24px; line-height: 32px; font-weight: 500; margin: 0 0 8px; color: #162a4c; }
.pdks-login-box p { margin: 0 0 24px; font-size: 14px; color: rgba(22, 42, 76, .7); }
.pdks-login-box .kolay-button { width: 100%; }
.pdks-login-box .pdks-back { display: inline-block; margin-top: 16px; font-size: 13px; color: #376bfb; text-decoration: none; }
.pdks-alert { background: #fdefef; color: #b81d1f; border-radius: 4px; padding: 10px 12px; margin-bottom: 20px; font-size: 13px; text-align: left; }

/* ---------- KolayToastr (React'te çalışma anında eklenen stil; aynı değerler) ---------- */
.kolay-toastr-container { position: fixed; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: 380px; pointer-events: none; }
.kolay-toastr-container.top-right { top: 88px; right: 24px; }
.pdks-form { align-items: flex-start; }
.pdks-form > .pdks-fit { padding-top: 28px; }
.kolay-toastr {
  position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 10px; pointer-events: auto;
  border-radius: 6px; padding: 10px 12px; font-size: 13px; font-weight: 500; color: #fff;
  box-shadow: 0 4px 12px rgba(22, 42, 76, .2); animation: pdks-toast-in .25s ease-out;
}
.kolay-toastr.info { background: #21345d; }
.kolay-toastr.cheers { background: #2e7d32; }
.kolay-toastr.warn { background: #f4a300; color: #1a1a1a; }
.kolay-toastr.alert { background: #dc3545; }
.kolay-toastr.removing { animation: pdks-toast-out .25s ease-in forwards; }
.kolay-toastr-icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.kolay-toastr-body { flex: 1; min-width: 0; }
.kolay-toastr-message { font-weight: 400; opacity: .95; }
.kolay-toastr-close { flex: none; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 2px; opacity: .8; }
.kolay-toastr-close:hover { opacity: 1; }
.kolay-toastr-progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: .5; animation: pdks-toast-bar linear forwards; }
@keyframes pdks-toast-in { from { opacity: 0; transform: translateX(16px); } }
@keyframes pdks-toast-out { to { opacity: 0; transform: translateX(16px); } }
@keyframes pdks-toast-bar { to { width: 0; } }

@media (max-width: 860px) {
  .pdks-shell { grid-template-columns: minmax(0, 1fr); }
  .pdks-side { flex-direction: row; align-items: center; padding: 8px 12px; overflow-x: auto; }
  .pdks-logo { padding: 4px 8px 4px 4px; }
  .pdks-logo span, .pdks-side-foot { display: none; }
  .pdks-nav { width: auto; padding: 8px 12px; white-space: nowrap; }
  .pdks-user-mail { display: none; }
  .pdks-content { padding: 16px; }
  .pdks-card-body { padding: 4px 16px 16px; }
  .pdks-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kolay-toastr-container.top-right { left: 16px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .kolay-toastr, .kolay-toastr.removing { animation: none; }
}

/* Ayarlar: AWS ile karşılaştırma şeridi */
.pdks-warn, .pdks-sync-ok {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-radius: 4px; padding: 6px 8px 6px 12px; margin-bottom: 12px; font-size: 13px;
}
.pdks-warn { background: #feefe4; color: #82550d; }
.pdks-sync-ok { color: rgba(22, 42, 76, .5); padding-left: 0; }
.pdks-nowrap { flex-wrap: nowrap; white-space: nowrap; }
