/* ============================================================
   shared/sharpe-ui.css — ShaRPE UI Bileşen Sistemi v2
   Tüm uygulamaların ortak bileşen kütüphanesi.

   Bağımlılık: /shared/tokens.css önce yüklenmeli.
   Kullanım:
     rpe775 → <link rel="stylesheet" href="/shared/sharpe-ui.css">
   ============================================================ */

/* ══════════════════════════════════════
   ANİMASYONLAR
══════════════════════════════════════ */
@keyframes su-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes su-slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes su-slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes su-scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes su-spin {
  to { transform: rotate(360deg); }
}
@keyframes su-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
@keyframes su-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ══════════════════════════════════════════════════
   BUTONLAR
   Hiyerarşi: primary > secondary > ghost > danger
   Boyut: (default 44px) sm 36px | lg 52px | full | icon
══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-4);
  height: var(--btn-h, 44px);
  min-height: var(--btn-h, 44px);
  border-radius: var(--r-md);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  font-family: var(--font-ui);
  border: 1px solid transparent;
  transition:
    background  0.15s var(--ease-standard),
    border-color 0.15s var(--ease-standard),
    box-shadow  0.18s var(--ease-standard),
    transform   0.12s var(--ease-standard),
    filter      0.15s var(--ease-standard),
    opacity     0.15s var(--ease-standard);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

/* Tıklama ripple katmanı */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.18s ease;
  border-radius: inherit;
}
.btn:active::after {
  background: rgba(255,255,255,0.06);
}

/* ─── Birincil: Gradient kırmızı ─── */
.btn--primary {
  background: var(--gradient-accent);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--btn-shadow-accent);
  letter-spacing: var(--ls-tight);
}
.btn--primary:hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 4px 16px rgba(var(--accent-rgb), 0.45);
  transform: translateY(-1px);
}
.btn--primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 1px 4px rgba(var(--accent-rgb), 0.20);
}
.btn--primary:disabled,
.btn--primary[disabled] {
  background: var(--c-elev);
  color: var(--c-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ─── İkincil: Yüzey ─── */
.btn--secondary {
  background: var(--c-elev);
  color: var(--c-text);
  border-color: var(--c-border);
  box-shadow: var(--btn-shadow);
}
.btn--secondary:hover {
  background: var(--c-elev2);
  border-color: var(--c-border3, var(--c-border));
}
.btn--secondary:active {
  transform: scale(0.98);
  box-shadow: none;
}
.btn--secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ─── Hayalet: Şeffaf ─── */
.btn--ghost {
  background: transparent;
  color: var(--c-muted);
  border-color: var(--c-border);
}
.btn--ghost:hover {
  background: var(--c-elev);
  color: var(--c-text);
}
.btn--ghost:active {
  transform: scale(0.97);
}

/* ─── Tehlike: Kırmızı ─── */
.btn--danger {
  background: var(--c-red-dim);
  color: var(--c-red);
  border-color: var(--c-red-border);
}
.btn--danger:hover {
  background: rgba(var(--c-red-rgb, 221, 92, 75), 0.20);
  border-color: rgba(var(--c-red-rgb, 221, 92, 75), 0.50);
}
.btn--danger:active {
  transform: scale(0.98);
}

/* ─── Onay: Gradient yeşil (antrenman konfirm) ─── */
.btn--confirm {
  background: var(--gradient-confirm);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--btn-shadow-confirm);
  letter-spacing: var(--ls-tight);
}
.btn--confirm:hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 4px 14px rgba(var(--c-green-rgb, 61,186,122), 0.40);
  transform: translateY(-1px);
}
.btn--confirm:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 1px 4px rgba(var(--c-green-rgb, 61,186,122), 0.20);
}
.btn--confirm:disabled {
  background: var(--c-elev);
  color: var(--c-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ─── Accent hayalet: Kesik accent kenarlık ─── */
.btn--accent-ghost {
  background: var(--c-accent-dim);
  color: var(--c-accent);
  border-color: var(--c-accent-border);
  border-style: dashed;
}
.btn--accent-ghost:hover {
  background: rgba(var(--c-accent-rgb), 0.16);
  border-style: solid;
}

/* ─── Boyutlar ─── */
.btn--sm {
  height: var(--btn-h-sm, 36px);
  min-height: var(--btn-h-sm, 36px);
  padding: 0 var(--sp-3);
  font-size: var(--text-sm);
  border-radius: var(--r-sm);
}
.btn--lg {
  height: var(--btn-h-lg, 52px);
  min-height: var(--btn-h-lg, 52px);
  padding: 0 var(--sp-6);
  font-size: var(--text-md);
  border-radius: var(--r-lg);
}
.btn--full { width: 100%; }
.btn--icon {
  width: var(--btn-h, 44px);
  min-height: var(--btn-h, 44px);
  padding: 0;
}
.btn--icon.btn--sm {
  width: var(--btn-h-sm, 36px);
  min-height: var(--btn-h-sm, 36px);
}
.btn--pill { border-radius: var(--r-full); }

/* ─── Yükleniyor durumu ─── */
.btn--loading {
  pointer-events: none;
  opacity: 0.75;
}
.btn--loading::before {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: su-spin 0.65s linear infinite;
  margin-right: var(--sp-2);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   KARTLAR
   .card → base
   .card--interactive → tıklanabilir
   .card--elevated → daha güçlü gölge
   .card--accent, --green, --red, --blue, --yellow → renk şerit
   .card--dashed → kesik kenarlık
══════════════════════════════════════════════════ */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  transition:
    background    0.15s var(--ease-standard),
    border-color  0.15s var(--ease-standard),
    box-shadow    0.20s var(--ease-standard),
    transform     0.15s var(--ease-standard);
}

.card--lg { padding: var(--sp-5); }
.card--sm { padding: var(--sp-3); }

.card--elevated {
  box-shadow: var(--shadow-md);
  border-color: var(--c-border2);
}

.card--interactive {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.card--interactive:hover {
  background: var(--c-elev);
  border-color: var(--c-border3, var(--c-border));
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.card--interactive:active {
  transform: translateY(0) scale(0.995);
  box-shadow: var(--shadow-sm);
}

/* Renk aksanı — sol şerit */
.card--accent  { border-left: 3px solid var(--c-accent);  padding-left: calc(var(--sp-4) - 2px); }
.card--green   { border-left: 3px solid var(--c-green);   padding-left: calc(var(--sp-4) - 2px); }
.card--red     { border-left: 3px solid var(--c-red);     padding-left: calc(var(--sp-4) - 2px); }
.card--blue    { border-left: 3px solid var(--c-blue);    padding-left: calc(var(--sp-4) - 2px); }
.card--yellow  { border-left: 3px solid var(--c-yellow);  padding-left: calc(var(--sp-4) - 2px); }
.card--purple  { border-left: 3px solid var(--c-purple);  padding-left: calc(var(--sp-4) - 2px); }

/* Büyük kartlarda şerit padding'i ayarla */
.card--lg.card--accent,
.card--lg.card--green,
.card--lg.card--red,
.card--lg.card--blue  { padding-left: calc(var(--sp-5) - 2px); }

.card--dashed { border-style: dashed; }

/* ══════════════════════════════════════════════════
   STAT KARTI
   .stat-card → küçük metrik kutu
══════════════════════════════════════════════════ */
.stat-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}

.stat-card__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--c-muted);
  letter-spacing: var(--ls-caps-sm);
  text-transform: uppercase;
}

.stat-card__value {
  font-size: var(--text-display-sm);
  font-weight: var(--weight-bold);
  color: var(--c-text);
  line-height: var(--lh-tight);
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.stat-card__unit {
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: var(--c-muted);
}

.stat-card__sub {
  font-size: var(--text-xs);
  color: var(--c-muted);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.stat-card__delta         { font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.stat-card__delta--pos    { color: var(--c-green); }
.stat-card__delta--neg    { color: var(--c-red); }

/* ══════════════════════════════════════════════════
   GİRİŞLER — input, select, textarea
══════════════════════════════════════════════════ */
.input,
.select,
.textarea {
  width: 100%;
  background: var(--c-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 0 var(--sp-3);
  height: var(--input-h, 44px);
  font-size: var(--text-md);
  font-family: var(--font-ui);
  color: var(--c-text);
  transition:
    border-color 0.15s var(--ease-standard),
    box-shadow   0.15s var(--ease-standard),
    background   0.15s var(--ease-standard);
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.input:hover:not(:focus),
.select:hover:not(:focus) {
  border-color: var(--c-border3, var(--c-muted2));
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--c-accent);
  box-shadow: var(--glow-accent);
  background: var(--c-elev);
  outline: none;
}

.input::placeholder,
.textarea::placeholder { color: var(--c-muted); }

.input--sm  { height: var(--input-h-sm, 36px); font-size: var(--text-sm); border-radius: var(--r-xs); }
.input--error,
.select--error {
  border-color: var(--c-red);
  box-shadow: var(--glow-red);
}
.input--success {
  border-color: var(--c-green);
  box-shadow: var(--glow-green);
}

.textarea {
  height: auto;
  min-height: 80px;
  padding: var(--sp-3);
  line-height: var(--lh-open);
  resize: vertical;
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8a9a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.select option { background: var(--c-card); color: var(--c-text); }

/* ── Form Alan Sarıcı ── */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.field__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--c-muted);
  user-select: none;
}

.field__label--required::after {
  content: ' *';
  color: var(--c-red);
}

.field__note {
  font-size: var(--text-xs);
  color: var(--c-muted);
  line-height: var(--lh-loose);
}

.field__error {
  font-size: var(--text-xs);
  color: var(--c-red);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

/* ── Form satır grid ── */
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.form-row--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }

/* ── Segment Kontrol ── */
.segment {
  display: flex;
  background: var(--c-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 3px;
  gap: 2px;
}

.segment__btn {
  flex: 1;
  height: 34px;
  border: none;
  border-radius: calc(var(--r-sm) - 2px);
  background: transparent;
  color: var(--c-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: var(--font-ui);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.segment__btn:hover { color: var(--c-text); background: var(--c-elev2); }
.segment__btn--active,
.segment__btn.active {
  background: var(--c-card);
  color: var(--c-text);
  font-weight: var(--weight-semibold);
  box-shadow: var(--shadow-sm);
}

/* ══════════════════════════════════════════════════
   BÖLÜM BAŞLIĞI
══════════════════════════════════════════════════ */
.section-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--ls-caps-lg);
  text-transform: uppercase;
  color: var(--c-muted);
  padding-bottom: var(--sp-2);
}

.section-title--accent {
  color: var(--c-accent);
  letter-spacing: var(--ls-caps-sm);
}

/* ── Bölüm Sarıcı ── */
.section { display: flex; flex-direction: column; gap: var(--sp-3); }
.section + .section { margin-top: var(--sp-5); }

/* ══════════════════════════════════════════════════
   AYIRICI
   <div class="divider"><span>Ya da</span></div>
══════════════════════════════════════════════════ */
.divider {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--c-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--ls-caps-md);
  margin: var(--sp-1) 0;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}
.divider--bare::before,
.divider--bare::after {
  background: var(--c-border);
}

/* ══════════════════════════════════════════════════
   ROZET (BADGE)
   <span class="badge badge--green">Aktif</span>
══════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: var(--lh-normal);
}

.badge--green   { background: var(--c-green-dim);   color: var(--c-green);   border-color: var(--c-green-border);  }
.badge--red     { background: var(--c-red-dim);     color: var(--c-red);     border-color: var(--c-red-border);    }
.badge--blue    { background: var(--c-blue-dim);    color: var(--c-blue);    border-color: var(--c-blue-border);   }
.badge--yellow  { background: var(--c-yellow-dim);  color: var(--c-yellow);  border-color: var(--c-yellow-border); }
.badge--purple  { background: var(--c-purple-dim);  color: var(--c-purple);  border-color: var(--c-purple-border); }
.badge--accent  { background: var(--c-accent-dim);  color: var(--c-accent);  border-color: var(--c-accent-border); }
.badge--muted   { background: var(--c-elev);        color: var(--c-muted);   border-color: var(--c-border);        }

/* ══════════════════════════════════════════════════
   ETİKET (TAG) — filtre seçici
   <span class="tag tag--active">Filtre</span>
══════════════════════════════════════════════════ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  background: var(--c-elev);
  border: 1px solid var(--c-border);
  color: var(--c-muted);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.tag:hover { border-color: var(--c-border3, var(--c-muted2)); color: var(--c-text); }
.tag--active {
  background: var(--c-accent-dim);
  border-color: var(--c-accent-border);
  color: var(--c-accent);
}

/* ══════════════════════════════════════════════════
   AVATAR
   <div class="avatar">A</div>
══════════════════════════════════════════════════ */
.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--c-elev);
  border: 2px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--c-muted);
  flex-shrink: 0;
  overflow: hidden;
  transition: border-color 0.15s;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--active {
  background: var(--c-accent-dim);
  border-color: var(--c-accent-border);
  color: var(--c-accent);
}
.avatar--sm { width: 34px; height: 34px; font-size: var(--text-base); }
.avatar--lg { width: 56px; height: 56px; font-size: var(--text-xl); }
.avatar--xl { width: 72px; height: 72px; font-size: var(--text-2xl); }

/* ══════════════════════════════════════════════════
   AÇILIŞ KATMANı + MODAL
   .overlay > .modal
══════════════════════════════════════════════════ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  animation: su-fadeIn 0.18s var(--ease-standard) both;
}

.modal {
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  animation: su-scaleIn 0.22s var(--ease-standard) both;
}

.modal--sm   { max-width: 400px; }
.modal--lg   { max-width: 680px; }
.modal--full { max-width: 100%; height: 90vh; height: 90dvh; }

.modal__handle {
  width: 36px; height: 4px;
  background: var(--c-border);
  border-radius: var(--r-full);
  margin: var(--sp-3) auto var(--sp-1);
  flex-shrink: 0;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-border2);
  flex-shrink: 0;
  gap: var(--sp-3);
}

.modal__title {
  font-family: var(--font-head);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--c-text);
}

/* ─── Kapat Butonu — tüm uygulamalar için standart ─── */
.modal__close {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: none;
  border: 1px solid transparent;
  color: var(--c-muted);
  font-size: var(--text-title);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  line-height: var(--lh-tight);
}
.modal__close:hover {
  background: var(--c-elev);
  border-color: var(--c-border);
  color: var(--c-text);
}

.modal__body {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  overflow-y: auto;
  flex: 1;
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--c-border2);
  flex-shrink: 0;
  gap: var(--sp-3);
}

.modal__footer-actions {
  display: flex;
  gap: var(--sp-2);
  margin-left: auto;
}

/* ── Mobil modal → bottom sheet ── */
@media (max-width: 767px) {
  .overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    border-bottom: none;
    animation: su-slideUp 0.25s var(--ease-decel) both;
  }
}

/* ══════════════════════════════════════════════════
   ALT SAYFA (SHEET)
   Tam sayfa modal'ın mobil versiyonu
══════════════════════════════════════════════════ */
.sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--c-card);
  border-top: 1px solid var(--c-border2);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  max-height: 92vh; max-height: 92dvh;
  overflow-y: auto;
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: su-slideUp 0.26s var(--ease-decel) both;
}

.sheet__handle {
  width: 36px; height: 4px;
  background: var(--c-border);
  border-radius: var(--r-full);
  margin: var(--sp-3) auto var(--sp-1);
  flex-shrink: 0;
}

.sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--c-border2);
  flex-shrink: 0;
  gap: var(--sp-3);
}

.sheet__title {
  font-family: var(--font-head);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--c-text);
  flex: 1;
  text-align: center;
}

.sheet__action {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--c-accent);
  background: none; border: none;
  cursor: pointer;
  padding: var(--sp-1) var(--sp-2);
  min-width: 56px;
  font-family: var(--font-ui);
  transition: opacity 0.15s;
}
.sheet__action--cancel {
  color: var(--c-muted);
  font-weight: var(--weight-regular);
  text-align: left;
}
.sheet__action:not(.sheet__action--cancel) { text-align: right; }
.sheet__action:disabled { opacity: 0.4; cursor: not-allowed; }
.sheet__action:hover:not(:disabled) { opacity: 0.75; }

.sheet__body {
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  overflow-y: auto;
  flex: 1;
}

/* ══════════════════════════════════════════════════
   ONAY DİYALOĞU
══════════════════════════════════════════════════ */
.confirm {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  max-width: 360px; width: 100%;
  text-align: center;
  display: flex; flex-direction: column;
  gap: var(--sp-3);
  animation: su-scaleIn 0.20s var(--ease-standard) both;
}

.confirm__icon  { font-size: var(--icon-lg); }
.confirm__title {
  font-family: var(--font-head);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--c-text);
}
.confirm__text  {
  font-size: var(--text-base);
  color: var(--c-muted);
  line-height: var(--lh-relaxed);
}
.confirm__actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-1); }
.confirm__actions .btn { flex: 1; }

/* ══════════════════════════════════════════════════
   BİLDİRİM (TOAST)
   .toast-container > .toast .toast--success | --error | --info
══════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-h, 64px) + var(--sp-4));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - var(--sp-8));
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-full);
  background: var(--c-elev2);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--c-text);
  animation: su-slideUp 0.22s var(--ease-decel) both;
  pointer-events: all;
  white-space: nowrap;
}

.toast--success { border-color: var(--c-green-border);  background: var(--c-green-dim);  color: var(--c-green);  }
.toast--error   { border-color: var(--c-red-border);    background: var(--c-red-dim);    color: var(--c-red);    }
.toast--info    { border-color: var(--c-blue-border);   background: var(--c-blue-dim);   color: var(--c-blue);   }
.toast--warning { border-color: var(--c-yellow-border); background: var(--c-yellow-dim); color: var(--c-yellow); }

/* ══════════════════════════════════════════════════
   DÖNDÜRÜCÜ (SPINNER)
══════════════════════════════════════════════════ */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--c-border);
  border-top-color: var(--c-accent);
  border-radius: 50%;
  animation: su-spin 0.7s linear infinite;
  flex-shrink: 0;
  display: inline-block;
}
.spinner--sm { width: 14px; height: 14px; }
.spinner--lg { width: 32px; height: 32px; border-width: 3px; }
.spinner--xl { width: 48px; height: 48px; border-width: 3px; }
.spinner--green { border-top-color: var(--c-green); }

/* ── İskelet Yükleme ── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--c-elev) 25%,
    var(--c-elev2) 50%,
    var(--c-elev) 75%
  );
  background-size: 200% 100%;
  animation: su-shimmer 1.6s ease-in-out infinite;
  border-radius: var(--r-sm);
}

/* ══════════════════════════════════════════════════
   BOŞ DURUM
══════════════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-10) var(--sp-6);
  text-align: center;
  gap: var(--sp-3);
}
.empty-state__icon  { font-size: var(--icon-xl); line-height: var(--lh-tight); }
.empty-state__title {
  font-family: var(--font-head);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--c-text);
}
.empty-state__sub {
  font-size: var(--text-base);
  color: var(--c-muted);
  max-width: 320px;
  line-height: var(--lh-open);
}

/* ══════════════════════════════════════════════════
   İLERLEME ÇUBUĞU
══════════════════════════════════════════════════ */
.progress {
  height: 4px;
  background: var(--c-elev);
  border-radius: var(--r-full);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: var(--r-full);
  transition: width 0.4s var(--ease-decel);
}
.progress--green .progress__fill  { background: var(--gradient-confirm); }
.progress--blue  .progress__fill  { background: var(--c-blue); }
.progress--thick { height: 6px; }

/* ── Makro Çubuğu ── */
.macro-bar {
  height: 5px;
  border-radius: var(--r-full);
  display: flex;
  overflow: hidden;
  gap: 2px;
}
.macro-bar__protein { background: var(--c-blue);   border-radius: var(--r-full); }
.macro-bar__carb    { background: var(--c-green);  border-radius: var(--r-full); }
.macro-bar__fat     { background: var(--c-yellow); border-radius: var(--r-full); }

/* ══════════════════════════════════════════════════
   GEÇİŞ (TOGGLE) ANAHTARI
══════════════════════════════════════════════════ */
.toggle {
  position: relative;
  display: inline-block;
  width: 46px; height: 26px;
  flex-shrink: 0;
}
.toggle input {
  opacity: 0; width: 0; height: 0;
  position: absolute;
}
.toggle__track {
  position: absolute;
  inset: 0;
  background: var(--c-border);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.22s var(--ease-standard), box-shadow 0.22s;
}
.toggle__track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #e8e8ec;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  transition: transform 0.22s var(--ease-spring), background 0.15s;
}
.toggle input:checked + .toggle__track {
  background: var(--c-accent);
  box-shadow: 0 0 0 2px var(--c-accent-dim);
}
.toggle input:checked + .toggle__track::after {
  transform: translateX(20px);
  background: #fff;
}
.toggle input:focus-visible + .toggle__track {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* ══════════════════════════════════════════════════
   SENKRON NOKTASI
══════════════════════════════════════════════════ */
.sync-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--c-muted);
  transition: background 0.3s, box-shadow 0.3s;
}
.sync-dot--online  { background: var(--c-green); box-shadow: 0 0 0 3px var(--c-green-dim); }
.sync-dot--offline { background: var(--c-red);   box-shadow: 0 0 0 3px var(--c-red-dim);   }
.sync-dot--pending {
  background: var(--c-yellow);
  animation: su-pulse 1.3s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════
   ARAMA ÇUBUĞU
══════════════════════════════════════════════════ */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--c-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 0 var(--sp-3);
  gap: var(--sp-2);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-bar:focus-within {
  border-color: var(--c-accent);
  box-shadow: var(--glow-accent);
}
.search-bar__input {
  flex: 1;
  height: 42px;
  background: none;
  border: none;
  outline: none;
  font-size: var(--text-md);
  color: var(--c-text);
  font-family: var(--font-ui);
}
.search-bar__input::placeholder { color: var(--c-muted); }
.search-bar__icon  { color: var(--c-muted); font-size: var(--text-subtitle); flex-shrink: 0; }
.search-bar__clear {
  color: var(--c-muted); cursor: pointer;
  font-size: var(--text-body); padding: var(--sp-1);
  background: none; border: none; line-height: var(--lh-tight);
  border-radius: var(--r-xs);
  transition: color 0.12s, background 0.12s;
}
.search-bar__clear:hover { color: var(--c-text); background: var(--c-elev2); }

/* ══════════════════════════════════════════════════
   PROFIL BAĞLANTISI
══════════════════════════════════════════════════ */
.about-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--c-text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  width: 100%;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.about-link:hover:not(.about-link--static) {
  background: var(--c-elev);
  border-color: var(--c-accent-border);
  transform: translateY(-1px);
}
.about-link:active:not(.about-link--static) { transform: translateY(0); }
.about-link--static { cursor: default; opacity: 0.7; }
.about-link__icon {
  font-size: var(--text-stat);
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

/* ══════════════════════════════════════════════════
   DRAWER (DAHA FAZLA ÇEKMECE)
══════════════════════════════════════════════════ */
.more-drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.50);
  z-index: calc(var(--z-sticky) + 10);
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease;
}
.more-drawer-overlay.open { opacity: 1; pointer-events: all; }

.more-drawer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--c-card);
  border-top: 1px solid var(--c-border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  z-index: calc(var(--z-sticky) + 11);
  padding: var(--sp-2) 0 calc(var(--sp-4) + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.26s var(--ease-decel);
}
.more-drawer.open { transform: translateY(0); }

.more-drawer__handle {
  width: 36px; height: 4px;
  background: var(--c-border);
  border-radius: 2px;
  margin: var(--sp-2) auto var(--sp-3);
}
.more-drawer__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0 var(--sp-5);
  min-height: 52px;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--c-text);
  cursor: pointer;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.more-drawer__item:hover { background: var(--c-elev); }
.more-drawer__item-icon  { font-size: var(--text-stat); width: 28px; text-align: center; flex-shrink: 0; }
.more-drawer__item-label { flex: 1; }
.more-drawer__item--danger { color: var(--c-red); }

/* ══════════════════════════════════════════════════
   YUTİLİTY SINIFLAR
══════════════════════════════════════════════════ */
/* Grid */
.grid { display: grid; gap: var(--sp-3); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto    { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.grid--auto-lg { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.col-span-2    { grid-column: span 2; }
.col-span-full { grid-column: 1 / -1; }

/* Flex */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-start   { display: flex; align-items: center; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1; }
.min-w-0      { min-width: 0; }

/* Gap */
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); } .gap-6 { gap: var(--sp-6); }

/* Metin kısaltma */
.text-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Renk yardımcıları */
.text-muted   { color: var(--c-muted); }
.text-sub     { color: var(--c-sub); }
.text-accent  { color: var(--c-accent); }
.text-green   { color: var(--c-green); }
.text-red     { color: var(--c-red); }
.text-blue    { color: var(--c-blue); }
.text-yellow  { color: var(--c-yellow); }

/* ── Azaltılmış hareket: tüm animasyonları kapat ── */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .card--interactive,
  .toast,
  .modal,
  .sheet,
  .more-drawer { transition: none !important; animation: none !important; }
}
