/* V6 — ortak bileşenler (katman 3): düğme, alan, rozet, kart, boş durum, iskelet, toast, sayfalama */

/* ---- Düğme ---- */
.v6-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4); border: 1px solid transparent; border-radius: var(--r-md); background: var(--surface-sunken); color: var(--text); font-size: var(--fs-base); font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.v6-btn:hover { background: var(--border); }
.v6-btn:active { transform: scale(.98); }
.v6-btn:disabled, .v6-btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.v6-btn--primary { background: var(--primary); color: var(--primary-contrast); box-shadow: 0 1px 0 #ffffff26 inset, 0 6px 16px -8px var(--primary); }
.v6-btn--primary:hover { background: var(--primary-hover); }
.v6-btn--outline { background: transparent; border-color: var(--border-strong); }
.v6-btn--outline:hover { background: var(--surface-sunken); }
.v6-btn--ghost { background: transparent; color: var(--text-muted); }
.v6-btn--ghost:hover { background: var(--surface-sunken); color: var(--text); }
.v6-btn--danger { background: var(--danger-soft); color: var(--danger); }
.v6-btn--light { background: #fff; color: #101b35; }
.v6-btn--light:hover { background: #e6eefe; }
.v6-btn--line { background: transparent; border-color: #ffffff3d; color: #fff; }
.v6-btn--line:hover { background: #ffffff1a; }
.v6-btn--sm { min-height: 36px; padding: 0 var(--s-3); font-size: var(--fs-sm); border-radius: var(--r-sm); }
.v6-btn--block { width: 100%; }
.v6-iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text-muted); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.v6-iconbtn:hover { background: var(--surface-sunken); color: var(--text); }
.v6-icon { flex: none; width: var(--s, 20px); height: var(--s, 20px); fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Form alanı ---- */
.v6-field { display: grid; gap: var(--s-2); font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }
.v6-field input, .v6-field select, .v6-field textarea, .v6-input { width: 100%; min-height: 48px; padding: 0 var(--s-4); border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: 1rem; font-weight: 400; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.v6-field textarea { padding: var(--s-3) var(--s-4); resize: vertical; line-height: 1.55; }
.v6-field input::placeholder, .v6-field textarea::placeholder { color: var(--text-faint); }
.v6-field input:hover, .v6-field select:hover, .v6-field textarea:hover { border-color: var(--text-faint); }
.v6-field input:focus, .v6-field select:focus, .v6-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent); }
.v6-field.has-error input { border-color: var(--danger); }
.v6-field-error, .v6-error { color: var(--danger); font-size: var(--fs-sm); font-weight: 500; }
.v6-check { display: flex; align-items: flex-start; gap: var(--s-3); font-size: var(--fs-sm); color: var(--text-muted); font-weight: 400; cursor: pointer; }
.v6-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); }
.v6-link { color: var(--primary); font-weight: 600; text-underline-offset: 3px; }
.v6-link:hover { text-decoration: underline; }

.v6-field select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }

/* ---- Rozet / durum ---- */
.v6-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--surface-sunken); color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.v6-chip--primary { background: var(--primary-soft); color: var(--primary); }
.v6-chip--accent { background: var(--accent-soft); color: var(--accent); }
.v6-status { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.v6-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.v6-status--ok { background: var(--success-soft); color: var(--success); }
.v6-status--bad { background: var(--danger-soft); color: var(--danger); }
.v6-status--live { background: var(--primary-soft); color: var(--primary); }
.v6-status--live::before { animation: v6-blink 1.4s ease-in-out infinite; }
.v6-status--idle { background: var(--surface-sunken); color: var(--text-muted); }
@keyframes v6-blink { 50% { opacity: .25; } }

/* ---- Yüzey ---- */
.v6-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.v6-card--pad { padding: var(--s-5); }
.v6-panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.v6-panel-head h2 { font-size: var(--fs-md); }

/* ---- Uyarı ---- */
.v6-alert { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 500; background: var(--surface-sunken); color: var(--text); }
.v6-alert--ok { background: var(--success-soft); color: var(--success); }
.v6-alert--bad { background: var(--danger-soft); color: var(--danger); }
.v6-alert--warn { background: var(--warning-soft); color: var(--warning); }

/* ---- Boş durum ---- */
.v6-empty { display: grid; justify-items: center; gap: var(--s-3); padding: var(--s-7) var(--s-5); text-align: center; }
.v6-empty__mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-lg); background: var(--primary-soft); color: var(--primary); }
.v6-empty h3 { font-size: var(--fs-md); }
.v6-empty p { max-width: 42ch; color: var(--text-muted); font-size: var(--fs-sm); }
.v6-empty .v6-btn { margin-top: var(--s-2); }

/* ---- İskelet ---- */
.v6-skeleton { border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface-sunken) 25%, var(--border) 45%, var(--surface-sunken) 65%); background-size: 220% 100%; animation: v6-shimmer 1.4s linear infinite; }
@keyframes v6-shimmer { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) { .v6-skeleton { animation: none; } }

/* ---- Toast ---- */
.v6-toasts { position: fixed; z-index: 120; right: var(--s-4); bottom: calc(var(--s-4) + var(--safe-b)); display: grid; gap: var(--s-2); width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.v6-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--text); color: var(--bg); font-size: var(--fs-sm); font-weight: 500; box-shadow: var(--shadow-3); animation: v6-rise var(--t-base) var(--ease) both; }
.v6-toast--bad { background: var(--danger); color: #fff; }
.v6-toast button { margin-left: auto; border: 0; background: none; color: inherit; opacity: .7; padding: 0 4px; }

/* ---- Modal (yerel <dialog>) ---- */
.v6-modal { width: min(440px, calc(100vw - 32px)); padding: var(--s-5); border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface-elevated); color: var(--text); box-shadow: var(--shadow-3); }
.v6-modal::backdrop { background: var(--scrim); backdrop-filter: blur(2px); }
.v6-modal[open] { animation: v6-rise var(--t-base) var(--ease); }
.v6-modal h2 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.v6-modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-5); }

/* ---- Sayfalama ---- */
.v6-pager { display: flex; align-items: center; justify-content: center; gap: var(--s-3); margin-top: var(--s-5); }
.v6-pager__btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-4); border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); font-weight: 600; font-size: var(--fs-sm); }
.v6-pager__btn:hover { background: var(--surface-sunken); }
.v6-pager__btn.is-disabled { opacity: .45; }
.v6-pager__info { color: var(--text-muted); font-size: var(--fs-sm); }

/* ---- Sayfa başlığı ---- */
.v6-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.v6-pagehead h1 { font-size: var(--fs-2xl); margin-top: var(--s-1); }
.v6-pagehead p.v6-muted { margin-top: var(--s-2); max-width: 56ch; }
