@import 'variables.css';

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* --- Layout --- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.sidebar-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-inverse);
  line-height: 1.2;
}

.sidebar-logo-sub {
  font-size: 11px;
  color: var(--text-light);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 16px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}

.nav-item:hover, .nav-item.active {
  background: var(--bg-sidebar-hover);
  color: #fff;
}

.nav-item.active {
  border-right: 3px solid var(--primary);
}

.nav-item-icon {
  width: 20px; height: 20px;
  opacity: 0.8;
  flex-shrink: 0;
}

.nav-item.active .nav-item-icon { opacity: 1; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
}

.topbar-title {
  font-size: 18px;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 14px;
  cursor: pointer;
}

.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.page-content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
}

.card-body { padding: 20px; }

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-value.income { color: var(--success); }
.stat-value.expense { color: var(--danger); }
.stat-value.balance { color: var(--primary); }
.stat-value.vat { color: var(--warning); }

.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.stat-icon.income { background: var(--success-light); }
.stat-icon.expense { background: var(--danger-light); }
.stat-icon.balance { background: var(--primary-light); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover:not(:disabled) { background: #16a34a; }

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover:not(:disabled) { background: #dc2626; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover:not(:disabled) { background: var(--bg); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg);
  color: var(--text);
}

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* --- Forms --- */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.form-control::placeholder { color: var(--text-light); }

select.form-control { cursor: pointer; }

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

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-control {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group-text {
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* --- Table --- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead tr {
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover {
  color: var(--text);
}

th.sort-asc::after  { content: ' ▲'; font-size: 10px; }
th.sort-desc::after { content: ' ▼'; font-size: 10px; }

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover { background: var(--bg); }

.amount-income { color: var(--success); font-weight: 600; }
.amount-expense { color: var(--danger); font-weight: 600; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-income  { background: var(--success-light); color: #15803d; }
.badge-expense { background: var(--danger-light); color: #dc2626; }
.badge-success { background: var(--success-light); color: #15803d; }
.badge-danger  { background: var(--danger-light);  color: #dc2626; }
.badge-secondary { background: #e2e8f0; color: #475569; }

.category-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--bg-card);
  z-index: 1;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: background var(--transition);
}

.modal-close:hover { background: var(--danger-light); color: var(--danger); }

.modal-body { padding: 20px 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* --- Toggle --- */
.type-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.type-toggle-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
}

.type-toggle-btn.active-income {
  background: var(--success-light);
  color: #15803d;
}

.type-toggle-btn.active-expense {
  background: var(--danger-light);
  color: #dc2626;
}

/* --- Filter bar --- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.period-btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.period-btn.active, .period-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  padding: 16px 0 0;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  color: var(--text);
}

.page-btn:hover { background: var(--bg); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- Toast --- */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--border);
  animation: toast-in 0.3s ease;
  font-size: 14px;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- Chart area --- */
.chart-container {
  position: relative;
  height: 260px;
}

canvas { max-width: 100%; }

/* --- File upload --- */
.file-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
}

.file-drop:hover, .file-drop.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.file-drop-icon { font-size: 36px; margin-bottom: 8px; }

/* --- Login page --- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 16px;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 60px; height: 60px;
  background: var(--primary);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 30px;
  margin-bottom: 12px;
}

.login-logo h1 {
  font-size: 22px;
  font-weight: 700;
}

.login-logo p {
  font-size: 14px;
  color: var(--text-muted);
}

/* --- Responsive --- */
/* --- Mobil Menü Overlay --- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99;
}
.sidebar-overlay.active {
  display: block;
}

/* --- Hamburger Butonu --- */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  margin-right: 8px;
  color: var(--text);
  flex-shrink: 0;
}
.hamburger-btn svg {
  display: block;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    z-index: 100;
  }

  .main-content {
    margin-left: 0;
  }

  .hamburger-btn {
    display: flex;
    align-items: center;
  }

  .topbar {
    padding: 0 14px;
    gap: 4px;
  }

  .topbar-title {
    font-size: 15px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar .btn {
    font-size: 12px;
    padding: 6px 10px;
    white-space: nowrap;
  }

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

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Tablo yatay kaydırma */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Filtre butonları sarma */
  .filter-bar {
    flex-wrap: wrap;
  }

  .period-btn {
    font-size: 12px;
    padding: 4px 10px;
  }

  /* Page content padding küçült */
  .page-content {
    padding: 14px;
  }
}

/* --- Utilities --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-text { font-size: 15px; }
.empty-state-sub { font-size: 13px; margin-top: 4px; color: var(--text-light); }

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* Receipt preview */
.receipt-img {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius);
  object-fit: contain;
}

/* Tab nav */
.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  gap: 0;
}

.tab-btn {
  padding: 10px 18px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════
   Hesaplar & Kartlar — account-card, credit-card, widgets
   ═══════════════════════════════════════════════════════════ */

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.account-grid .section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 8px 0 0 2px;
}

.account-card {
  --account-color: #4F46E5;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.account-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--account-color);
}

.account-card.credit {
  background: linear-gradient(135deg, var(--account-color), color-mix(in srgb, var(--account-color) 65%, #000));
  color: #fff;
  border-color: transparent;
  min-height: 190px;
}

.account-card.credit::before {
  display: none;
}

.account-card.credit .account-card-label,
.account-card.credit .account-card-type,
.account-card.credit .account-card-bank,
.account-card.credit .account-card-submeta {
  color: rgba(255, 255, 255, 0.82);
}

.account-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.account-card.inactive {
  opacity: 0.55;
  filter: grayscale(0.3);
}

.account-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.account-card-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.account-card-type {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
  white-space: nowrap;
}

.account-card.credit .account-card-type {
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
}

.account-card-bank {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.account-card-main {
  margin-top: 4px;
}

.account-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.account-card-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--primary);
}

.account-card.credit .account-card-value {
  color: #fff;
}

.account-card-value.negative {
  color: var(--danger);
}

.account-card.credit .account-card-value.negative {
  color: #fecaca;
}

.account-card-submeta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.account-card-status {
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
}

.account-card-status.ok {
  background: var(--success-light);
  color: #15803d;
}

.account-card-status.upcoming {
  background: #fef3c7;
  color: #92400e;
}

.account-card-status.overdue {
  background: var(--danger-light);
  color: #991b1b;
}

.account-card.credit .account-card-status {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.account-card.credit .account-card-actions {
  border-top-color: rgba(255, 255, 255, 0.2);
}

.account-card.credit .btn-ghost {
  color: rgba(255, 255, 255, 0.92);
}

.account-card.credit .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Hesap kartı header bandı ── */
.account-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.account-card-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--account-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-card.credit .account-card-icon {
  background: rgba(255, 255, 255, 0.22);
}

/* ── Kredi kartı limit çubuğu ── */
.account-limit-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-top: 8px;
}

.account-card.credit .account-limit-bar {
  background: rgba(255, 255, 255, 0.2);
}

.account-limit-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--success, #059669);
  transition: width 0.4s ease;
}

.account-limit-fill.warning {
  background: var(--warning, #f59e0b);
}

.account-limit-fill.danger {
  background: var(--danger, #dc2626);
}

/* ── Sıfır borç rengi ── */
.account-card-value.zero {
  color: var(--success, #059669);
}

.account-card.credit .account-card-value.zero {
  color: #bbf7d0;
}

/* ── Hesap numarası (monospace) ── */
.account-card-number {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Birincil aksiyon butonu (tam genişlik) ── */
.account-action-primary {
  width: 100%;
  justify-content: center;
}

/* ── İkincil aksiyon satırı ── */
.account-card-secondary {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.account-card.credit .account-card-secondary .btn-ghost {
  color: rgba(255, 255, 255, 0.85);
}

.account-card.credit .account-card-secondary .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Actions: birincil + ikincil dikey düzen ── */
.account-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Renk seçici */
.color-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  padding: 0;
}

.color-swatch:hover {
  transform: scale(1.1);
}

/* İşlem satırı ödeme kaynağı rozeti */
.payment-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-muted);
  max-width: 200px;
}

.payment-source-badge .swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.payment-source-badge.cash {
  background: #fef3c7;
  color: #92400e;
}

.payment-source-badge.unset {
  background: #f3f4f6;
  color: #9ca3af;
  font-style: italic;
}

/* Dashboard account widgets */
.dash-account-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.simple-table th,
.simple-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.simple-table th {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
