/* =========================================
   LA Fish – Uygulama Panel Stilleri
   ========================================= */

/* ----- App Layout ----- */
:root {
  --header-h: 52px;
  /* Marka teali: style.css'teki --color-accent. Tanımsızdı → var(--color-teal)
     kullanan her yer (btn-teal, Aylık/Yıllık active pill) arka plansız/görünmez kalıyordu. */
  --color-teal: var(--color-accent, #1ab69d);
}

/* panel başlığı pazarlama sitesinden daha ince */
html {
  background: var(--color-bg);
  overscroll-behavior: none;
  height: 100%;
}

.app-body {
  min-height: 100vh;
  background: var(--color-bg);
  overscroll-behavior: none;
  /* en üstte/altta rubber-band beyazlığını engelle */
}

/* ----- App Header ----- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: var(--color-primary);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  box-shadow: var(--shadow-md);
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-inline: 24px;
  max-width: 100%;
}

.app-logo {
  display: inline-flex;
  align-items: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
  text-decoration: none;
}

.app-logo span {
  color: var(--color-accent);
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-user-info {
  font-size: .85rem;
  color: rgba(255, 255, 255, .75);
  font-weight: 500;
}

.btn-logout {
  font-size: .82rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255, 255, 255, .25);
  background: transparent;
  color: rgba(255, 255, 255, .85);
  transition: background .2s, border-color .2s;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .5);
  color: #fff;
}

/* ----- Dashboard Layout ----- */
.dashboard-layout {
  display: flex;
  min-height: calc(100vh - var(--header-h));
}

/* ----- Sidebar Nav ----- */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 24px 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-nav-item svg {
  flex-shrink: 0;
}

.sidebar-nav-item:hover {
  background: var(--color-bg);
  color: var(--color-secondary);
}

.sidebar-nav-item.active {
  background: rgba(14, 124, 134, .1);
  color: var(--color-secondary);
  font-weight: 600;
}

/* ----- Main Content ----- */
.dashboard-main {
  flex: 1;
  min-width: 0;
  padding: 10px 32px 48px;
}

/* ----- Section Panels ----- */
.panel-section {
  display: none;
  padding: 32px;
  /* pazarlama style.css'teki "section { padding:72px 0 }" kuralını EZER (asıl boşluk buydu) */
}

.panel-section.active {
  display: block;
}

/* ----- Page Title ----- */
.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-top: 0;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: .9rem;
  color: var(--color-text-muted);
  margin-bottom: 28px;
}

/* ----- Cards ----- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.card-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ----- Info Rows ----- */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: .9rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--color-text-muted);
  font-weight: 500;
}

.info-value {
  font-weight: 600;
  color: var(--color-text);
}

/* ----- Badges ----- */
.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: .2px;
  text-transform: uppercase;
}

.badge-green {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-blue {
  background: #e3f2fd;
  color: #1565c0;
}

.badge-orange {
  background: #fff3e0;
  color: #e65100;
}

.badge-red {
  background: #fdecea;
  color: #c0392b;
}

.badge-gray {
  background: #f1f3f5;
  color: #5a6a7a;
}

.badge-teal {
  background: rgba(14, 124, 134, .1);
  color: var(--color-secondary);
}

/* ----- Alerts / Warnings ----- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  line-height: 1.55;
  margin-bottom: 16px;
}

.alert-warning {
  background: var(--color-warning-bg);
  border: 1.5px solid var(--color-warning-border);
  color: #7a5c00;
}

.alert-info {
  background: #e3f2fd;
  border: 1.5px solid #90caf9;
  color: #1565c0;
}

.alert-danger {
  background: #fdecea;
  border: 1.5px solid #ef9a9a;
  color: #c0392b;
}

.alert-success {
  background: #e8f5e9;
  border: 1.5px solid #a5d6a7;
  color: #2e7d32;
}

.alert strong {
  font-weight: 700;
}

/* ----- Progress Bars ----- */
.progress-item {
  margin-bottom: 20px;
}

.progress-item:last-child {
  margin-bottom: 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.progress-label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text);
}

.progress-value {
  font-size: .82rem;
  color: var(--color-text-muted);
}

.progress-bar-wrap {
  height: 8px;
  background: var(--color-bg);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.progress-bar-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 100px;
  transition: width .4s ease;
}

.progress-bar-fill.warn {
  background: #f0b429;
}

.progress-bar-fill.danger {
  background: var(--color-danger);
}

.progress-note {
  font-size: .78rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ----- Buttons (app-specific) ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .1s;
  text-decoration: none;
}

.btn:active {
  transform: scale(.97);
}

/* Pasif buton: geçersiz/değişiklik yok → tıklanamaz ve soluk */
.btn:disabled,
.btn[disabled],
button:disabled {
  opacity: .5;
  cursor: not-allowed;
  filter: grayscale(35%);
}
.btn:disabled:active,
button:disabled:active {
  transform: none;
}

/* Alan altı satır-içi doğrulama uyarısı (kırmızı) */
.field-hint {
  display: none;
  color: var(--color-danger, #c0392b);
  font-size: .78rem;
  margin-top: 5px;
  line-height: 1.3;
}

.btn-sm {
  font-size: .8rem;
  padding: 6px 14px;
}

.btn-lg {
  font-size: .95rem;
  padding: 12px 28px;
}

.btn-full {
  width: 100%;
}

.btn-teal {
  background: var(--color-accent);
  color: #fff;
}

.btn-teal:hover {
  background: var(--color-accent-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-danger:hover {
  background: #a93226;
  color: #fff;
}

.btn-danger-outline {
  background: transparent;
  border: 1.5px solid var(--color-danger);
  color: var(--color-danger);
}

.btn-danger-outline:hover {
  background: var(--color-danger);
  color: #fff;
}

.btn-secondary-outline {
  background: transparent;
  border: 1.5px solid var(--color-secondary);
  color: var(--color-secondary);
}

.btn-secondary-outline:hover {
  background: var(--color-secondary);
  color: #fff;
}

/* ----- Forms ----- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-group .hint {
  font-size: .78rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .9rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color .2s, background .2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-secondary);
  background: var(--color-surface);
}

.form-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
  cursor: pointer;
  accent-color: var(--color-accent);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .875rem;
  color: var(--color-text);
  line-height: 1.5;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.form-note {
  font-size: .78rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.form-note strong {
  color: var(--color-text);
}

/* ----- Plan Cards in Dashboard ----- */
.plan-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.plan-dash-card {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  background: var(--color-surface);
  transition: box-shadow .2s;
  position: relative;
  display: flex;               /* kartlar eşit boy; düğme altta hizalı (Yıllık'ta "2 ay bedava" satırı kaydırıyordu) */
  flex-direction: column;
}
.plan-dash-card .plan-dash-features { flex: 1; }
.plan-dash-card > .btn-full, .plan-dash-card > div:last-child { margin-top: auto; }

.plan-dash-card.current {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(26, 182, 157, .12);
}

.plan-dash-card:hover {
  box-shadow: var(--shadow-md);
}

.plan-dash-name {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.plan-dash-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 12px;
  white-space: nowrap;            /* "₺100 /ay" tek satırda kalsın */
}

/* "/ay" artık fiyatın yanında inline span */
.plan-dash-price .plan-dash-period {
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-left: 3px;
}

.plan-dash-save {
  font-size: .72rem;
  font-weight: 600;
  color: var(--color-teal);
  margin: -8px 0 10px;
}

/* Aylık / Yıllık seçici */
.period-toggle {
  display: inline-flex;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}
.period-toggle .period-opt {
  background: transparent;
  border: none;
  padding: 7px 18px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text);              /* muted → okunmuyordu; normal metin rengi */
  transition: background .15s, color .15s;
}
.period-toggle .period-opt:not(.active):hover {
  background: var(--color-bg);
}
.period-toggle .period-opt.active {
  background: var(--color-teal);
  color: #fff;
}

/* Süresi dolmuş kayıtlı kart: soluk + tehlike rozeti */
.card-method.card-expired { opacity: .55; }
.badge-danger { background: #fdecea; color: #c0392b; }

.plan-dash-features {
  font-size: .8rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.plan-current-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ----- Table ----- */
.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.data-table th {
  text-align: left;
  padding: 11px 14px;
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1.5px solid var(--color-border);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--color-bg);
}

.data-table .amount-col {
  font-weight: 600;
}

/* ----- Payment Method Cards ----- */
.card-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--color-surface);
  gap: 12px;
}

.card-method.default-card {
  border-color: var(--color-accent);
}

.card-method-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-brand-icon {
  width: 44px;
  height: 28px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.card-method-text .card-number {
  font-weight: 600;
  font-size: .9rem;
  color: var(--color-text);
}

.card-method-text .card-expiry {
  font-size: .78rem;
  color: var(--color-text-muted);
}

.card-method-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ----- Toast Notifications ----- */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: all;
  min-width: 280px;
  max-width: 380px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: toastIn .25s ease forwards;
}

.toast.removing {
  animation: toastOut .2s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(12px);
  }
}

.toast-success {
  background: #2e7d32;
  color: #fff;
}

.toast-error {
  background: var(--color-danger);
  color: #fff;
}

.toast-info {
  background: var(--color-secondary);
  color: #fff;
}

.toast-warning {
  background: #e65100;
  color: #fff;
}

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  opacity: .7;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.toast-close:hover {
  opacity: 1;
}

/* ----- Modal ----- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 45, 74, .5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-box {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: slideUp .2s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.modal-body {
  font-size: .9rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ----- Auth Pages ----- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--color-bg);
}

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px 40px 36px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-md);
}

.auth-logo {
  display: block;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -.5px;
  margin-bottom: 8px;
  text-decoration: none;
}

.auth-logo span {
  color: var(--color-accent);
}

/* Login kartı: ikon yazının ÜSTÜNDE, ortalı ve daha büyük */
.auth-logo .logo-mark {
  display: block;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
}

.auth-tagline {
  text-align: center;
  font-size: .85rem;
  color: var(--color-text-muted);
  margin-bottom: 28px;
}

.auth-tabs {
  display: flex;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 28px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 9px 0;
  text-align: center;
  font-size: .9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-radius: 6px;
  border: none;
  background: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.auth-tab.active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-divider {
  text-align: center;
  font-size: .8rem;
  color: var(--color-text-muted);
  margin: 16px 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-border);
}

.auth-divider span {
  background: var(--color-surface);
  padding: 0 12px;
  position: relative;
}

.auth-forgot {
  text-align: right;
  font-size: .8rem;
  margin-top: -10px;
  margin-bottom: 16px;
}

.auth-footer-note {
  text-align: center;
  font-size: .8rem;
  color: var(--color-text-muted);
  margin-top: 20px;
}

.trial-note {
  background: rgba(26, 182, 157, .08);
  border: 1.5px solid rgba(26, 182, 157, .25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .82rem;
  color: var(--color-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: center;
}

.trial-note strong {
  font-weight: 700;
}

/* ----- Simple token pages ----- */
.token-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--color-bg);
}

.token-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.token-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.token-icon-success {
  background: #e8f5e9;
  color: #2e7d32;
}

.token-icon-error {
  background: #fdecea;
  color: #c0392b;
}

.token-icon-loading {
  background: rgba(14, 124, 134, .1);
  color: var(--color-secondary);
}

.token-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.token-message {
  font-size: .9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ----- Loading spinner ----- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}

.spinner-dark {
  border: 2.5px solid var(--color-border);
  border-top-color: var(--color-secondary);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-loading {
  pointer-events: none;
  opacity: .8;
}

/* ----- Empty state ----- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-muted);
}

.empty-state svg {
  margin: 0 auto 12px;
  opacity: .4;
}

.empty-state p {
  font-size: .9rem;
}

/* ----- Separator ----- */
.section-sep {
  height: 1px;
  background: var(--color-border);
  margin: 24px 0;
}

/* ----- Stat Mini Cards ----- */
.stat-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-mini-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.stat-mini-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}

.stat-mini-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.stat-mini-sub {
  font-size: .78rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .sidebar {
    width: 200px;
  }

  .dashboard-main {
    padding: 24px 20px 40px;
  }

  .card-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .sidebar {
    display: none;
  }

  .sidebar.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: var(--header-h);
    bottom: 0;
    z-index: 300;
    width: 260px;
    box-shadow: var(--shadow-lg);
  }

  .mobile-sidebar-toggle {
    display: flex;
  }

  .dashboard-main {
    padding: 20px 16px 40px;
  }

  .card-grid-2,
  .card-grid-3 {
    grid-template-columns: 1fr;
  }

  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 28px 20px 24px;
  }

  .modal-box {
    padding: 22px 20px;
  }

  #toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }

  .toast {
    min-width: unset;
    max-width: 100%;
  }
}

/* =========================================================
   KARANLIK TEMA (panel) — mevcut renkleri bozmadan eklenmiştir.
   --color-primary çoğunlukla METİN olarak kullanıldığı için dark'ta açığa
   çekilir; tek DOLGU kullanımı olan başlık barı ayrıca navy bırakılır.
   ========================================================= */
html[data-theme="dark"] {
  --color-bg: #0e141b;
  --color-surface: #171f29;
  --color-border: #29333f;
  --color-text: #e5ecf3;
  --color-text-muted: #93a2b3;
  --color-primary: #e7edf4;
  /* başlık/değer metinleri açık */
  --color-warning-bg: #2a2511;
  --color-warning-border: #5c4f1a;
}

html[data-theme="dark"] .app-header {
  background: #0b1622;
}

/* marka navy korunur (dolgu) */
html[data-theme="dark"] .sidebar {
  background: #121a23;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .plan-dash-card,
html[data-theme="dark"] .modal-box {
  background: var(--color-surface);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0f161e;
  color: var(--color-text);
  border-color: var(--color-border);
}

html[data-theme="dark"] .data-table th {
  background: #121a23;
  color: var(--color-text-muted);
}

html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .data-table th {
  border-color: var(--color-border);
}

html[data-theme="dark"] .progress-bar-wrap {
  background: #222b35;
}

html[data-theme="dark"] .badge-blue {
  background: #13314d;
  color: #9cc4ee;
}

html[data-theme="dark"] .badge-green {
  background: #12331d;
  color: #7fce97;
}

html[data-theme="dark"] .badge-gray {
  background: #222b35;
  color: #9aa7b4;
}

html[data-theme="dark"] .badge-teal {   /* DENEME/AI rozeti koyu zeminde ~3.3:1 idi → açık turkuaz (AA) */
  background: #0f3338;
  color: #7fd9dd;
}

html[data-theme="dark"] .btn-outline {
  border-color: var(--color-border);
  color: var(--color-text);
}

html[data-theme="dark"] .sidebar-nav-item:hover {
  background: rgba(255, 255, 255, .05);
}

/* tema değiştir butonu */
#theme-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  border-radius: 8px;
  padding: 5px 9px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

#theme-toggle:hover {
  background: rgba(255, 255, 255, .12);
}

.mobile-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: rgba(255, 255, 255, .85);
}

@media (max-width: 700px) {
  .mobile-sidebar-toggle {
    display: flex;
  }
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 299;
}

.sidebar-overlay.active {
  display: block;
}

/* ----- Test card hint ----- */
.test-card-hint {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .78rem;
  color: #1565c0;
  margin-bottom: 16px;
  line-height: 1.5;
}
/* Mobil üst çubuk (19 Eyl 2026 ölçüm, 375px): logo "LA / Fish" iki satıra kırılıyor, kullanıcı adı
   üstüne biniyordu. Logo tek satır; kullanıcı adı dar ekranda gizli; çıkış düğmesi kısa. */
.app-logo { white-space: nowrap; }
@media (max-width: 480px) {
  .app-user-info { display: none; }
  .app-logo { font-size: 1.2rem; }
  .btn-logout { padding: 6px 10px; white-space: nowrap; }
  .app-header-right { gap: 8px; }
}
.info-row .info-label { white-space: nowrap; }   /* "E-posta" mobilde "E- / posta" kırılıyordu */

/* Panel tarama 19 Eyl 2026 (375px): form alanlarının öz genişliği (~150px) flex/grid hücrelerini
   büyütüp kartı taşırıyordu (Fiş Detayı, kart formu Ay/Yıl/CVC, Yeni Kural). Hücre daralabilsin. */
.form-group { min-width: 0; }
.form-group input, .form-group select, .form-group textarea { width: 100%; min-width: 0; max-width: 100%; }
.form-group input[type="checkbox"], .form-group input[type="radio"] { width: 18px; }
.modal-box { position: relative; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal-close {
  position: absolute; top: 10px; right: 12px; border: 0; background: transparent; cursor: pointer;
  font-size: 1.3rem; line-height: 1; color: var(--color-text-muted); padding: 4px 8px; border-radius: 6px;
}
.modal-close:hover { background: var(--color-bg); color: var(--color-text); }
/* Fişlerim: Dışa Aktar + Muhasebeye Gönder satırı dar ekranda sarsın; sayaç "0 / 30" bölünmesin */
#rc-export-row { flex-wrap: wrap; }
.progress-value { white-space: nowrap; flex-shrink: 0; }
/* Yatay kaydırılan tabloda boş-durum metni görünür alanda kalsın (mobilde "Henüz iş yok. Masaüstü…" kesiliyordu) */
.table-empty-msg { display: block; position: sticky; left: 0; max-width: calc(100vw - 64px); padding: 24px 14px; text-align: center; color: var(--color-text-muted); }
