/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue: #2563eb;
  --blue-dark: #1e40af;
  --red: #dc2626;
  --gray: #6b7280;
  --gray-light: #9ca3af;
  --white: #ffffff;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 30%, #fef9c3 60%, #fef3c7 100%);
  min-height: 100vh;
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 0;
}

/* ========== Header ========== */
.header {
  position: relative;
  padding: 28px 20px 20px;
  overflow: hidden;
}

.header-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.5) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(245, 158, 11, 0.35) 0%, transparent 45%),
              radial-gradient(circle at 50% 80%, rgba(252, 211, 77, 0.4) 0%, transparent 40%);
  pointer-events: none;
}

.greeting {
  position: relative;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}

.profile-btn {
  position: absolute;
  top: 24px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--gray);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* ========== Thẻ số dư ========== */
.balance-card {
  margin: 0 20px 20px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.balance-amount {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 8px;
}

.payment-term {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--gray);
}

.payment-term i {
  color: var(--gray-light);
  font-size: 0.9rem;
}

/* ========== Lưới chức năng ========== */
.nav-section {
  position: relative;
  padding: 0 20px 24px;
}

.nav-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(251, 191, 36, 0.25) 0%, transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(252, 211, 77, 0.2) 0%, transparent 40%);
  pointer-events: none;
}

.year-watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 6rem;
  font-weight: 800;
  color: rgba(251, 191, 36, 0.15);
  letter-spacing: 0.02em;
  user-select: none;
}

.nav-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: #1f2937;
  transition: transform 0.15s, box-shadow 0.15s;
}

.nav-item:active {
  transform: scale(0.98);
}

.nav-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.nav-icon--blue {
  background: var(--blue);
  color: var(--white);
}

.nav-icon--red {
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius-sm);
}

.nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

/* ========== Banner ========== */
.banner {
  position: relative;
  margin: 0;
  min-height: 200px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.banner-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e3a5f 0%, #312e81 40%, #1e3a5f 100%);
}

.banner-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(transparent 60%, rgba(0,0,0,0.3) 100%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(59, 130, 246, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

/* Silhouette skyline giả */
.banner-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.25) 100%);
  clip-path: polygon(
    0% 100%, 2% 70%, 5% 85%, 8% 60%, 12% 90%, 18% 55%, 22% 75%, 28% 65%, 35% 95%, 42% 70%, 50% 88%, 58% 62%, 65% 80%, 72% 68%, 80% 92%, 88% 58%, 94% 78%, 98% 65%, 100% 100%
  );
  pointer-events: none;
}

.banner-content {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 24px 20px 28px;
  min-height: 200px;
}

.banner-text {
  flex: 1;
  z-index: 2;
}

.banner-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.banner-subtitle {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.banner-cta {
  display: inline-block;
  padding: 8px 14px;
  background: rgba(59, 130, 246, 0.9);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.banner-year {
  position: absolute;
  left: 16px;
  bottom: 20px;
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(251, 191, 36, 0.9);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: -2px;
  z-index: 1;
}

.banner-figure {
  position: absolute;
  right: 10px;
  bottom: 0;
  width: 120px;
  height: 180px;
  z-index: 2;
}

.banner-figure-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.25) 100%);
  border-radius: 60px 60px 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 20px;
}

.banner-figure-placeholder i {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.5);
}

.banner-figure-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
}

/* Banner dạng ảnh (img/aa.png) */
.banner-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Responsive: màn hình rộng hơn */
@media (min-width: 421px) {
  .app {
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
  }
}
