/* ==========================================================================
   AMANI BANK - MINIMALIST FINTECH CLEAN DESIGN SYSTEM
   ========================================================================== */

:root {
  --primary-blue: #0D4B8A;
  --primary-blue-dark: #072F57;
  --secondary-cyan: #26B9F3;
  --secondary-cyan-soft: #EBF7FD;
  
  --bg-app: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F5F9;

  --text-main: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  --border-subtle: #E2E8F0;
  --border-focus: #26B9F3;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 4px 14px -2px rgba(13, 75, 138, 0.06);
  --shadow-dark: 0 8px 24px -4px rgba(13, 75, 138, 0.22);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: #061A30;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Outer Viewport (Desktop Centering) */
.app-viewport {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 50% 10%, #0d4b8a 0%, #041224 100%);
}

.mobile-device {
  width: 100%;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-app);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

@media (min-width: 480px) {
  .app-viewport {
    padding: 20px 0;
  }
  .mobile-device {
    height: 90vh;
    max-height: 880px;
    border-radius: 32px;
  }
}

/* Header */
.app-header {
  flex-shrink: 0;
  background: #FFFFFF;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo-img {
  height: 22px;
  object-fit: contain;
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-badge-reg {
  background: #F1F5F9;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.header-icon-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Scroll Area */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 20px;
  scroll-behavior: smooth;
}

/* Tabs */
.tab-screen {
  display: none;
}
.tab-screen.active {
  display: block;
}

/* Hero */
.hero-card {
  background: linear-gradient(145deg, #0D4B8A 0%, #083460 100%);
  border-radius: var(--radius-lg);
  color: #FFFFFF;
  padding: 20px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-dark);
}

.hero-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  color: #E2F3FD;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-title {
  font-size: 17.5px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 6px;
}

.hero-title span {
  color: var(--secondary-cyan);
}

.hero-desc {
  font-size: 12px;
  color: #CBD5E1;
  line-height: 1.5;
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: opacity 0.15s;
}

.btn-primary {
  background: var(--secondary-cyan);
  color: #FFFFFF;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-block {
  width: 100%;
}

/* Action Grid */
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.action-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.action-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: var(--secondary-cyan-soft);
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.action-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-main);
}

/* Sections */
.clean-section {
  margin-bottom: 18px;
}

.section-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.section-heading {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
}

.section-link-more {
  font-size: 11px;
  font-weight: 700;
  color: var(--secondary-cyan);
  cursor: pointer;
}

/* 4 Pasti Box */
.four-pasti-box {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 14px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.four-pasti-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--primary-blue);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.four-pasti-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.pasti-single-item {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pasti-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  flex-shrink: 0;
}

.pasti-text-wrap h4 {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1px;
}

.pasti-text-wrap p {
  font-size: 9.5px;
  color: var(--text-muted);
}

/* Benefit Cards */
.benefit-row-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 8px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.benefit-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.benefit-tag {
  background: var(--secondary-cyan-soft);
  color: var(--primary-blue);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.benefit-num {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-muted);
}

.benefit-row-card h3 {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}

.benefit-row-card p {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Clean Form Card */
.clean-form-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.field-group {
  margin-bottom: 14px;
}

.field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 5px;
}

.field-input, .field-select {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-subtle);
}

.field-input:focus, .field-select:focus {
  outline: none;
  border-color: var(--border-focus);
  background: #FFFFFF;
}

.tenor-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.tenor-btn {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 4px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.tenor-btn.active {
  border-color: var(--primary-blue);
  background: var(--primary-blue);
  color: #FFFFFF;
}

/* Statement Box (Clean & Minimal) */
.result-statement-box {
  background: linear-gradient(145deg, #0D4B8A 0%, #083460 100%);
  border-radius: var(--radius-md);
  padding: 16px;
  color: #FFFFFF;
  margin-top: 14px;
  box-shadow: var(--shadow-dark);
}

.statement-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

.statement-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.statement-label {
  color: #CBD5E1;
  font-size: 11.5px;
}

.statement-val {
  font-weight: 700;
  color: #FFFFFF;
  text-align: right;
  max-width: 60%;
}

.statement-val.highlight-cyan {
  color: var(--secondary-cyan);
  font-size: 14.5px;
}

/* Bottom Nav - Fixed & Clean */
.bottom-nav {
  flex-shrink: 0;
  width: 100%;
  background: #FFFFFF;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-around;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}

.nav-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 10px;
  border: none;
  background: none;
  flex: 1;
}

.nav-tab-item.active {
  color: var(--primary-blue);
  font-weight: 800;
}

.nav-tab-item.active .nav-icon {
  color: var(--secondary-cyan);
}

/* Modal Bottom Sheet */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  justify-content: center;
  align-items: flex-end;
}

.modal-overlay.active {
  display: flex;
}

.bottom-sheet {
  background: #FFFFFF;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  border-radius: 20px 20px 0 0;
  padding: 20px 18px 28px;
  overflow-y: auto;
}

.sheet-handle {
  width: 32px;
  height: 4px;
  background: #CBD5E1;
  border-radius: var(--radius-pill);
  margin: -8px auto 14px;
}

.sheet-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.sheet-heading {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-main);
}

.sheet-close {
  background: var(--bg-subtle);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

/* Toast */
.toast-msg {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-50px);
  background: #0D4B8A;
  color: #FFFFFF;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-dark);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
}

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