/* ==========================================================================
   BPlus Online - Kart Bakiye Sorgulama Design System
   Modern architectural fintech interface entirely in Turkish
   ========================================================================== */

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Palette */
  --bg-page-gradient-start: #dbe7fc;
  --bg-page-gradient-mid: #eaf1fd;
  --bg-page-gradient-end: #d6e4fb;

  --color-navy: #131c38;
  --color-navy-hover: #1f2b52;
  --color-blue-primary: #2563eb;
  --color-blue-secondary: #3b82f6;
  --color-blue-light: #eff5ff;
  --color-blue-border: #bfdbfe;

  --color-text-title: #131c38;
  --color-text-body: #475569;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;

  --card-bg: #ffffff;
  --card-radius: 36px;
  --card-shadow: 0 24px 64px -16px rgba(45, 75, 160, 0.16), 0 2px 6px rgba(0, 0, 0, 0.02);
  --card-border: 1px solid rgba(255, 255, 255, 0.85);

  --capsule-radius: 9999px;
  --capsule-shadow: 0 10px 32px rgba(30, 58, 138, 0.08);
  --capsule-border: 1px solid #e2e8f0;

  --color-success: #10b981;
  --color-success-bg: #ecfdf5;
  --color-success-border: #a7f3d0;

  --color-error: #ef4444;
  --color-error-bg: #fef2f2;
  --color-error-border: #fecaca;
}

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

body {
  font-family: var(--font-main);
  background: linear-gradient(135deg, var(--bg-page-gradient-start) 0%, var(--bg-page-gradient-mid) 50%, var(--bg-page-gradient-end) 100%);
  color: var(--color-text-body);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmospheric Glows & Dot Grids */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-glow-top-left {
  position: absolute;
  top: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(165, 196, 252, 0.6) 0%, rgba(220, 233, 253, 0) 70%);
  filter: blur(40px);
}

.bg-glow-bottom-right {
  position: absolute;
  bottom: -150px;
  right: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(175, 205, 253, 0.6) 0%, rgba(220, 233, 253, 0) 70%);
  filter: blur(50px);
}

.dot-grid-top-left {
  position: absolute;
  top: 40px;
  left: 40px;
  width: 140px;
  height: 140px;
  background-image: radial-gradient(#9bbcf5 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  opacity: 0.7;
}

.dot-grid-bottom-right {
  position: absolute;
  bottom: 40px;
  right: 40px;
  width: 140px;
  height: 140px;
  background-image: radial-gradient(#9bbcf5 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  opacity: 0.7;
}

/* ==================== MAIN FLOATING CARD ==================== */
.main-wrapper {
  width: 100%;
  max-width: 980px;
  position: relative;
  z-index: 1;
}

.card-container {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: var(--card-border);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ==================== HEADER ==================== */
.card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 48px 16px 48px;
  position: relative;
  z-index: 10;
}

.brand-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.brand-wrapper:hover {
  transform: scale(1.02);
}

.brand-logo-img {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

/* ==================== HERO SECTION ==================== */
.hero-section {
  position: relative;
  text-align: center;
  padding: 24px 36px 36px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}

.hero-arch-bg {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 820px;
  height: 480px;
  background: radial-gradient(ellipse 65% 55% at 50% 60%, #edf4fe 0%, rgba(255, 255, 255, 0) 80%);
  pointer-events: none;
  z-index: -1;
  border-radius: 50% 50% 0 0;
}

.hero-title {
  font-size: 40px;
  line-height: 1.15;
  font-weight: 500;
  color: var(--color-text-title);
  letter-spacing: -1.2px;
  max-width: 780px;
  margin-bottom: 12px;
}

.hero-title strong {
  font-weight: 800;
  color: var(--color-navy);
}

.hero-description {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 620px;
  margin-bottom: 26px;
}

/* ==================== INQUIRY FORM BOX ==================== */
.inquiry-box {
  width: 100%;
  max-width: 580px;
  position: relative;
  z-index: 10;
}

.inquiry-form {
  background: #ffffff;
  border-radius: 24px;
  border: var(--capsule-border);
  box-shadow: var(--capsule-shadow);
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: all 0.25s ease;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-title);
}

.char-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.input-shell {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 0 16px;
  height: 52px;
  gap: 12px;
  transition: all 0.2s ease;
}

.input-shell:focus-within {
  background: #ffffff;
  border-color: var(--color-blue-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field-icon {
  width: 20px;
  height: 20px;
  color: var(--color-text-light);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.input-shell:focus-within .field-icon {
  color: var(--color-blue-primary);
}

.form-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-navy);
  width: 100%;
}

.form-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.pan-input {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 1.5px;
}

.name-input {
  text-transform: uppercase;
}

.btn-input-clear {
  background: #e2e8f0;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s ease;
}

.btn-input-clear:hover {
  background: #cbd5e1;
  color: var(--color-navy);
}

/* Turnstile Wrapper */
.turnstile-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2px 0 4px 0;
  min-height: 65px;
}

/* Submit Button */
.btn-inquiry-submit {
  background: linear-gradient(135deg, var(--color-navy) 0%, #1e293b 100%);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 14px;
  border: none;
  height: 52px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(19, 28, 56, 0.16);
}

.btn-inquiry-submit:hover {
  background: linear-gradient(135deg, var(--color-blue-primary) 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.btn-inquiry-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-icon {
  width: 18px;
  height: 18px;
}

/* Spinner */
.animate-spin {
  animation: spin 1s linear infinite;
}

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

/* Alert Notification */
.form-alert {
  margin-top: 14px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  line-height: 1.45;
  background: var(--color-error-bg);
  border: 1px solid var(--color-error-border);
  color: #b91c1c;
  animation: fadeIn 0.25s ease-out;
}

.alert-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ==================== OTP VERIFICATION BOX ==================== */
.otp-box {
  width: 100%;
  max-width: 500px;
  margin-top: 8px;
  animation: fadeIn 0.3s ease-out;
}

.otp-card {
  background: #ffffff;
  border-radius: 24px;
  border: var(--capsule-border);
  box-shadow: var(--capsule-shadow);
  padding: 32px 28px;
  text-align: center;
}

.otp-icon-header {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px auto;
  background: #eff6ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-blue-primary);
}

.otp-icon-header svg {
  width: 26px;
  height: 26px;
}

.otp-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.otp-subtitle {
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.otp-input-group {
  margin-bottom: 16px;
}

.otp-input {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 12px;
  text-align: center;
  padding: 12px;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  width: 100%;
  max-width: 280px;
  outline: none;
  transition: all 0.2s ease;
  background: #f8fafc;
  color: var(--color-navy);
}

.otp-input:focus {
  border-color: var(--color-blue-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.otp-timer-row {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.otp-timer-row strong {
  font-family: var(--font-mono);
  color: var(--color-navy);
  font-size: 14px;
}

.otp-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-otp-verify {
  background: var(--color-navy);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  height: 48px;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-otp-verify:hover {
  background: var(--color-blue-primary);
}

.btn-otp-cancel {
  background: transparent;
  color: var(--color-text-muted);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
}

.btn-otp-cancel:hover {
  color: var(--color-navy);
}

/* ==================== RESULT SECTION ==================== */
.result-box {
  width: 100%;
  max-width: 720px;
  animation: slideUpFade 0.35s ease-out;
  position: relative;
  z-index: 10;
}

.result-card {
  background: #ffffff;
  border-radius: 28px;
  border: var(--capsule-border);
  box-shadow: var(--capsule-shadow);
  padding: 32px 36px;
  text-align: left;
}

.result-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.result-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-badge-active {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--capsule-radius);
  font-size: 12px;
  font-weight: 700;
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  color: #047857;
  letter-spacing: 0.5px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.result-type-tag {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: #f1f5f9;
  padding: 5px 12px;
  border-radius: var(--capsule-radius);
}

.btn-new-query {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--capsule-radius);
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-navy);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-new-query:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

/* Hero Balance Presentation */
.balance-hero {
  text-align: center;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 28px 24px;
  margin-bottom: 24px;
}

.balance-hero-lbl {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-blue-primary);
  margin-bottom: 8px;
}

.balance-hero-val {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 8px;
}

.balance-hero-time {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Information Grid (2x2 Clean Layout without limits) */
.result-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}

.info-cell {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-cell-lbl {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.4px;
}

.info-cell-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-navy);
}

.font-mono {
  font-family: var(--font-mono);
}

/* Recent Transactions */
.transactions-section {
  border-top: 1px solid #f1f5f9;
  padding-top: 20px;
}

.transactions-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 14px;
}

.transactions-header svg {
  color: var(--color-blue-primary);
}

.transactions-table-wrapper {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.transactions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.transactions-table th {
  background: #f8fafc;
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-text-muted);
  border-bottom: 1px solid #e2e8f0;
}

.transactions-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--color-text-body);
}

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

.text-right {
  text-align: right;
}

.tx-amount {
  font-family: var(--font-mono);
  font-weight: 700;
}

.tx-amount.negative {
  color: #dc2626;
}

.tx-amount.positive {
  color: #059669;
}

.tx-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 6px;
}

/* ==================== CITYSCAPE SVG ILLUSTRATION ==================== */
.cityscape-container {
  width: 100%;
  margin-top: auto;
  position: relative;
  line-height: 0;
  overflow: hidden;
  border-bottom-left-radius: var(--card-radius);
  border-bottom-right-radius: var(--card-radius);
  pointer-events: none;
}

.cityscape-svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 -4px 12px rgba(40, 70, 160, 0.03));
}

/* ==================== FOOTER ==================== */
.card-footer {
  background: #ffffff;
  padding: 16px 48px 24px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.footer-sep {
  color: #cbd5e1;
}

.footer-link {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--color-navy);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
  body {
    padding: 16px 12px;
  }
  .card-container {
    border-radius: 24px;
  }
  .card-header {
    padding: 24px 20px 12px 20px;
  }
  .hero-section {
    padding: 20px 16px 24px 16px;
  }
  .hero-title {
    font-size: 28px;
    letter-spacing: -0.6px;
  }
  .hero-description {
    font-size: 14px;
    margin-bottom: 20px;
  }
  .inquiry-form {
    padding: 20px 18px;
  }
  .result-card {
    padding: 24px 20px;
  }
  .result-info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .balance-hero-val {
    font-size: 32px;
  }
  .card-footer {
    padding: 16px 20px;
    flex-direction: column;
    text-align: center;
  }
}
