/* ═══════════════════════════════════════════════════════
   Garanti BBVA Open Banking Demo - Stil Dosyası
   Renk paleti: Garanti yeşili #00823B
   ═══════════════════════════════════════════════════════ */

:root {
  --garanti-green: #00823B;
  --garanti-green-dark: #006630;
  --garanti-green-light: #e6f4ec;
  --garanti-yellow: #FFD700;
  --text-primary: #1a1a2e;
  --text-secondary: #555;
  --text-muted: #888;
  --bg-page: #f4f6f9;
  --bg-white: #ffffff;
  --border: #e0e5eb;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --radius: 12px;
  --red: #e53935;
  --green: #2e7d32;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
}

/* ── LOGO ─────────────────────────────────────────────── */
.garanti-logo, .garanti-logo-sm {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--garanti-green);
  color: white;
  font-size: 22px;
  font-weight: 900;
  border-radius: 8px;
  font-style: italic;
}

.garanti-logo-sm .logo-g { width: 32px; height: 32px; font-size: 18px; }

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--garanti-green);
  letter-spacing: -0.3px;
}

.garanti-logo-sm .logo-text { font-size: 17px; }

/* ── LOGIN PAGE ───────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #00823B 0%, #004d23 100%);
  padding: 20px;
}

.login-container { width: 100%; max-width: 480px; }

.login-card {
  background: var(--bg-white);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .garanti-logo { justify-content: center; }

.login-subtitle {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.error-banner {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--red);
  font-size: 14px;
  margin-bottom: 20px;
}
.error-banner.hidden { display: none; }

.login-info h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.login-info p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.feature-icon { font-size: 18px; }

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.btn-garanti {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--garanti-green);
  color: white;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
  border: none;
  cursor: pointer;
}

.btn-garanti:hover { background: var(--garanti-green-dark); transform: translateY(-1px); }
.btn-garanti:active { transform: translateY(0); }

.btn-demo {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-secondary);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-demo:hover { border-color: var(--garanti-green); color: var(--garanti-green); }
.btn-demo:disabled { opacity: 0.6; cursor: not-allowed; }

.login-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
.login-footer a { color: var(--garanti-green); text-decoration: none; }
.login-footer a:hover { text-decoration: underline; }

/* ── DASHBOARD ────────────────────────────────────────── */
.dashboard-page { display: flex; flex-direction: column; }

.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-logout {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

.dashboard-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  width: 100%;
}

/* ── KARTLAR ──────────────────────────────────────────── */
.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.credit-card {
  background: linear-gradient(135deg, #00823B 0%, #005a28 100%);
  border-radius: 16px;
  padding: 24px;
  color: white;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,130,59,0.35);
}

.credit-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.credit-card::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.credit-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,130,59,0.45); }
.credit-card.active { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,130,59,0.5), 0 0 0 3px var(--garanti-yellow); }

.card-brand { font-size: 12px; opacity: 0.8; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.card-number { font-size: 18px; font-weight: 600; letter-spacing: 3px; margin-bottom: 16px; font-family: 'Courier New', monospace; }
.card-name { font-size: 13px; font-weight: 600; opacity: 0.9; margin-bottom: 16px; }

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 8px;
}

.card-info-item { display: flex; flex-direction: column; gap: 2px; }
.card-info-label { font-size: 10px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.5px; }
.card-info-value { font-size: 14px; font-weight: 700; }

.limit-bar {
  margin-top: 12px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  height: 4px;
  overflow: hidden;
}
.limit-bar-fill {
  height: 100%;
  background: var(--garanti-yellow);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Skeleton */
.skeleton-card {
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 16px;
  height: 180px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── TRANSACTIONS ─────────────────────────────────────── */
.transactions-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.selected-card-info { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.date-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.date-filter label {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-input {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.date-input:focus { border-color: var(--garanti-green); }

.btn-filter {
  background: var(--garanti-green);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  align-self: flex-end;
}
.btn-filter:hover { background: var(--garanti-green-dark); }

/* ── SUMMARY ──────────────────────────────────────────── */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.summary-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.summary-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.summary-value { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.summary-value.green { color: var(--green); }

/* ── CATEGORY ─────────────────────────────────────────── */
.category-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.category-badge {
  background: var(--garanti-green-light);
  color: var(--garanti-green-dark);
  border: 1px solid #c3dfc9;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
}

/* ── TABLE ────────────────────────────────────────────── */
.table-wrapper {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.transactions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.transactions-table thead {
  background: #f8fafb;
  border-bottom: 2px solid var(--border);
}

.transactions-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.transactions-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.transactions-table tr:last-child td { border-bottom: none; }

.transactions-table tr:hover td { background: #fafbfc; }

.text-right { text-align: right !important; }

.amount-negative { color: var(--red); font-weight: 700; }
.amount-positive { color: var(--green); font-weight: 700; }

.txn-category {
  display: inline-block;
  background: var(--garanti-green-light);
  color: var(--garanti-green-dark);
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}

.txn-category.payment {
  background: #e8f5e9;
  color: var(--green);
}

/* ── LOADING & EMPTY ──────────────────────────────────── */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

.loading-spinner.hidden { display: none; }

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--garanti-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.no-transactions {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}
.no-transactions.hidden { display: none; }

.select-card-prompt {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.prompt-icon { font-size: 48px; margin-bottom: 16px; }
.select-card-prompt p { font-size: 16px; }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 640px) {
  .login-card { padding: 28px 20px; }
  .dashboard-main { padding: 20px 16px; }
  .transactions-header { flex-direction: column; }
  .date-filter { width: 100%; }
  .transactions-table { font-size: 12px; }
  .transactions-table th, .transactions-table td { padding: 10px 12px; }
}
