/* ============================================================
   DLVR Custody Form — style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --surface2: #F5F3F0;
  --border: #E8E3DB;
  --border-hover: #D4C9BB;
  --orange: #FF6B00;
  --orange-light: #FF9A3C;
  --orange-pale: #FFF3E8;
  --orange-glow: rgba(255, 107, 0, 0.15);
  --dark: #1A1208;
  --dark2: #2C2010;
  --text: #1A1208;
  --text-muted: #7A6E62;
  --text-light: #A8A09A;
  --success: #22C55E;
  --error: #EF4444;
  --negative: #EF4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(26,18,8,0.08);
  --shadow-md: 0 8px 40px rgba(26,18,8,0.12);
  --shadow-lg: 0 16px 64px rgba(26,18,8,0.16);
  --topbar: 68px;
}

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

html, body {
  min-height: 100vh;
  background: var(--bg);
  font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar);
  background: rgba(250,250,249,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-badge {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255,107,0,0.4),
    0 0 12px rgba(255,107,0,0.5),
    0 0 28px rgba(255,107,0,0.25);
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255,107,0,0.4),
      0 0 12px rgba(255,107,0,0.5),
      0 0 28px rgba(255,107,0,0.25);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(255,107,0,0.6),
      0 0 20px rgba(255,107,0,0.7),
      0 0 48px rgba(255,107,0,0.35),
      0 0 72px rgba(255,154,60,0.15);
  }
}

.logo-b {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 12px rgba(255,255,255,0.6);
  font-family: 'Tajawal', sans-serif;
}

.logo-glow-ring {
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  border: 1.5px solid rgba(255,107,0,0.35);
  animation: ringExpand 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ringExpand {
  0%, 100% { inset: -4px; opacity: 0.5; }
  50% { inset: -8px; opacity: 0; }
}

.logo-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
}

.logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.lang-switcher {
  display: flex;
  gap: 4px;
  background: var(--surface2);
  border-radius: 10px;
  padding: 4px;
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: inherit;
}

.lang-btn.active {
  background: #fff;
  color: var(--orange);
  box-shadow: 0 1px 6px rgba(26,18,8,0.1);
}

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.page-wrapper {
  padding-top: calc(var(--topbar) + 32px);
  padding-bottom: 60px;
  min-height: 100vh;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   HERO CARD
   ============================================================ */
.hero-card {
  background: var(--dark);
  border-radius: 24px;
  padding: 36px 32px 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,107,0,0.2);
  box-shadow:
    0 0 0 1px rgba(255,107,0,0.08),
    0 8px 32px rgba(26,18,8,0.3),
    0 0 60px rgba(255,107,0,0.08),
    0 0 120px rgba(255,107,0,0.04);
  animation: heroGlowPulse 5s ease-in-out infinite;
}

@keyframes heroGlowPulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255,107,0,0.08),
      0 8px 32px rgba(26,18,8,0.3),
      0 0 60px rgba(255,107,0,0.08),
      0 0 120px rgba(255,107,0,0.04);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255,107,0,0.18),
      0 8px 40px rgba(26,18,8,0.35),
      0 0 80px rgba(255,107,0,0.18),
      0 0 160px rgba(255,107,0,0.09);
  }
}

.hero-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 25px;
  padding: 1px;
  background: linear-gradient(135deg, var(--orange), transparent 40%, var(--orange-light) 70%, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateGradient 6s linear infinite;
  pointer-events: none;
}

@keyframes rotateGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Primary blob — large warm glow top corner */
.blob-main {
  position: absolute;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(255,107,0,0.28) 0%, rgba(255,107,0,0.08) 45%, transparent 70%);
  border-radius: 50%;
  top: -120px;
  pointer-events: none;
  animation: blobFloat 8s ease-in-out infinite;
}

[dir="rtl"] .blob-main { right: -80px; }
[dir="ltr"] .blob-main { left: -80px; }

/* Secondary blob — soft amber mid */
.blob-secondary {
  position: absolute;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,154,60,0.15) 0%, transparent 70%);
  border-radius: 50%;
  top: 40px;
  pointer-events: none;
  animation: blobFloat2 11s ease-in-out infinite;
}

[dir="rtl"] .blob-secondary { left: 20px; }
[dir="ltr"] .blob-secondary { right: 20px; }

/* Bottom glow strip */
.hero-glow-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), var(--orange-light), transparent);
  opacity: 0.7;
  animation: glowScan 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowScan {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; box-shadow: 0 0 16px rgba(255,107,0,0.8); }
}

@keyframes blobFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-24px) scale(1.12); }
}

@keyframes blobFloat2 {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  33% { transform: translateY(-14px) scale(1.08) rotate(6deg); }
  66% { transform: translateY(8px) scale(0.95) rotate(-4deg); }
}

.hero-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  position: relative;
  z-index: 1;
  margin-bottom: 28px;
}

/* Balance Display */
.balance-display {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 20px rgba(255,107,0,0.06);
  transition: box-shadow 0.4s;
}

.balance-display:hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 36px rgba(255,107,0,0.14);
}

.balance-label {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  margin-bottom: 4px;
}

.balance-amount {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  direction: ltr;
  display: inline-block;
}

.balance-currency {
  font-size: 15px;
  color: var(--orange-light);
  font-weight: 600;
  margin-inline-start: 6px;
}

.balance-display.negative-balance .balance-amount { color: var(--error); }

.balance-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 0 16px rgba(255,107,0,0.4), 0 0 32px rgba(255,107,0,0.2);
  animation: iconGlow 3s ease-in-out infinite;
}

@keyframes iconGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(255,107,0,0.4), 0 0 32px rgba(255,107,0,0.2); }
  50% { box-shadow: 0 0 24px rgba(255,107,0,0.6), 0 0 56px rgba(255,107,0,0.3); }
}

/* Progress */
.progress-wrap {
  position: relative;
  z-index: 1;
  margin-top: 20px;
}

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

.progress-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.progress-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
}

.progress-track {
  background: rgba(255,255,255,0.1);
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 8px rgba(255,107,0,0.7), 0 0 16px rgba(255,107,0,0.4);
}

/* ============================================================
   SECTION CARDS
   ============================================================ */
.section-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow 0.3s, border-color 0.3s, transform 0.25s;
  box-shadow: var(--shadow);
}

.section-card:hover {
  border-color: rgba(255,107,0,0.25);
  box-shadow:
    var(--shadow-md),
    0 0 20px rgba(255,107,0,0.06);
  transform: translateY(-1px);
}

.section-card::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  border-radius: 3px 3px 0 0;
}

.section-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-icon {
  width: 36px; height: 36px;
  background: var(--orange-pale);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
}

.section-body {
  padding: 24px;
}

/* ============================================================
   OPERATION CARDS
   ============================================================ */
.op-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.op-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.op-card:hover {
  border-color: var(--orange);
  background: var(--orange-pale);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,0,0.15), 0 0 16px rgba(255,107,0,0.08);
}

.op-card.selected {
  border-color: var(--orange);
  background: var(--orange-pale);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.15), 0 6px 24px rgba(255,107,0,0.18), 0 0 32px rgba(255,107,0,0.08);
}

.op-card.selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  color: var(--orange);
  font-weight: 700;
  font-size: 14px;
  animation: checkPop 0.3s cubic-bezier(.34,1.56,.64,1);
}

[dir="rtl"] .op-card.selected::after { left: 10px; }
[dir="ltr"] .op-card.selected::after { right: 10px; }

@keyframes checkPop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.op-emoji { font-size: 28px; margin-bottom: 8px; }
.op-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.op-hint {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface2);
  padding: 3px 8px;
  border-radius: 20px;
  display: inline-block;
}

.op-card.selected .op-hint {
  background: rgba(255,107,0,0.15);
  color: var(--orange);
}

/* Balance Preview */
.balance-preview-row {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--dark);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.balance-preview-label {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.balance-preview-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--orange-light);
  direction: ltr;
}

.balance-preview-val.negative { color: var(--error); }

/* ============================================================
   FORM FIELDS
   ============================================================ */
.field-group {
  margin-bottom: 20px;
}

.field-group:last-child { margin-bottom: 0; }
.field-group.hidden { display: none; }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}

[dir="rtl"] .input-icon { right: 14px; }
[dir="ltr"] .input-icon { left: 14px; }

.field-input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: all 0.2s;
  direction: inherit;
}

.field-input.has-icon {
  padding-inline-start: 42px;
}

.field-input:focus {
  border-color: var(--orange);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.12), 0 0 16px rgba(255,107,0,0.08);
}

.field-input::placeholder { color: var(--text-light); }

textarea.field-input {
  resize: vertical;
  min-height: 90px;
}

/* IBAN Prefix */
.iban-wrap {
  display: flex;
  align-items: center;
  gap: 0;
}

/* Date Field */
input[type="date"].field-input {
  direction: ltr;
  text-align: start;
}

/* ============================================================
   TOGGLE SWITCH
   ============================================================ */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.toggle-info {}
.toggle-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  display: block;
}

.toggle-switch {
  position: relative;
  width: 48px; height: 26px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-track::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .toggle-track {
  background: var(--orange);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(22px);
}

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-section.hidden { display: none; }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  background: var(--surface2);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--orange);
  background: var(--orange-pale);
}

.upload-icon { font-size: 36px; margin-bottom: 10px; }
.upload-hint {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.upload-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.no-photos-msg {
  text-align: center;
  padding: 20px;
  color: var(--text-light);
  font-size: 13px;
}

.no-photos-msg.hidden { display: none; }

/* Image List */
.image-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.img-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color 0.3s;
}

.img-item.done {
  border-color: var(--success);
  background: #f0fdf4;
}

.img-thumb {
  width: 54px; height: 54px;
  border-radius: 8px;
  background: var(--border);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.skeleton {
  animation: skeletonPulse 1.2s ease-in-out infinite;
}

@keyframes skeletonPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.img-info {
  flex: 1;
  min-width: 0;
}

.img-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  display: block;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.img-status {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.img-item.done .img-status { color: var(--success); }

.img-url-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.img-url-label {
  font-size: 11px;
  color: var(--text-muted);
}

.img-url-input {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--text-muted);
  direction: ltr;
  font-family: monospace;
  outline: none;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  background: var(--orange-pale);
  border: 1px solid rgba(255,107,0,0.3);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--orange);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.copy-btn:hover { background: rgba(255,107,0,0.15); }

.img-actions {
  flex-shrink: 0;
}

.icon-btn {
  width: 30px; height: 30px;
  border: none;
  background: rgba(239,68,68,0.1);
  color: var(--error);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}

.icon-btn:hover { background: rgba(239,68,68,0.2); }

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */
.submit-wrap {
  margin-top: 24px;
}

.submit-btn {
  width: 100%;
  padding: 16px 28px;
  background: var(--orange);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 4px 16px rgba(255,107,0,0.35),
    0 0 32px rgba(255,107,0,0.15);
}

.submit-btn:hover:not(:disabled) {
  background: #E55F00;
  transform: translateY(-2px);
  box-shadow:
    0 8px 28px rgba(255,107,0,0.45),
    0 0 56px rgba(255,107,0,0.25),
    0 0 80px rgba(255,107,0,0.1);
}

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

/* Shimmer */
.submit-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shimmer 2.5s linear infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* ============================================================
   SUCCESS SCREEN
   ============================================================ */
.success-screen {
  text-align: center;
  padding: 48px 24px;
  animation: fadeInUp 0.5s ease;
}

.success-screen.hidden { display: none; }

.success-icon-wrap {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  margin: 0 auto 24px;
  box-shadow:
    0 8px 32px rgba(255,107,0,0.4),
    0 0 60px rgba(255,107,0,0.25),
    0 0 100px rgba(255,107,0,0.12);
  animation: popIn 0.5s cubic-bezier(.34,1.56,.64,1), successIconGlow 2s ease-in-out 0.5s infinite;
}

@keyframes successIconGlow {
  0%, 100% {
    box-shadow:
      0 8px 32px rgba(255,107,0,0.4),
      0 0 60px rgba(255,107,0,0.25),
      0 0 100px rgba(255,107,0,0.12);
  }
  50% {
    box-shadow:
      0 8px 40px rgba(255,107,0,0.55),
      0 0 80px rgba(255,107,0,0.35),
      0 0 140px rgba(255,107,0,0.18);
  }
}

@keyframes popIn {
  0% { transform: scale(0) rotate(-20deg); }
  100% { transform: scale(1) rotate(0); }
}

.success-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}

.success-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.success-balance {
  background: var(--dark);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.success-balance-label {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  margin-bottom: 6px;
}

.final-balance {
  font-size: 32px;
  font-weight: 800;
  color: var(--orange-light);
  direction: ltr;
  display: inline-block;
}

.final-balance.negative { color: var(--error); }

.new-op-btn {
  background: transparent;
  border: 2px solid var(--orange);
  color: var(--orange);
  padding: 13px 32px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s;
}

.new-op-btn:hover {
  background: var(--orange);
  color: #fff;
}

/* ============================================================
   CONFETTI
   ============================================================ */
#confettiCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 999;
  display: none;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: #fff;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 200;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error { background: var(--error); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.hidden { display: none !important; }

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

.section-card {
  animation: fadeInUp 0.4s ease backwards;
}

.section-card:nth-child(1) { animation-delay: 0.05s; }
.section-card:nth-child(2) { animation-delay: 0.1s; }
.section-card:nth-child(3) { animation-delay: 0.15s; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.5s ease;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 520px) {
  .op-grid { grid-template-columns: 1fr; }
  .hero-card { padding: 24px 20px; }
  .hero-title { font-size: 22px; }
  .section-body { padding: 18px; }
  .topbar { padding: 0 16px; }
  .balance-amount { font-size: 26px; }
}
