/* ===== VARIABLES ===== */
:root {
  --primary: #FF6B00;
  --primary-dark: #E55E00;
  --primary-light: #FFF3E8;
  --primary-gradient: linear-gradient(135deg, #FF6B00, #FF8E3C);
  --primary-gradient-hover: linear-gradient(135deg, #E55E00, #FF7A2D);
  --primary-alpha-10: rgba(255, 107, 0, 0.1);
  --primary-alpha-15: rgba(255, 107, 0, 0.15);
  --primary-alpha-25: rgba(255, 107, 0, 0.25);
  --secondary: #FF9E58;
  --success: #27AE60;
  --warning: #F39C12;
  --danger: #E74C3C;
  --dark: #2D3436;
  --dark: #2D3436;
  --light: #F8F9FA;
  --gray: #95A5A6;
  --gray-light: #E0E0E0;
  --border: #E0E0E0;
  --card-bg: #FFFFFF;
  --bg: #FDF8F3;
  --text: #2D3436;
  --text-light: #7F8C8D;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
}

/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

#app-container {
  max-width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding: 0 7px;
}

/* ===== HEADER STYLES ===== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--gray-light);
}

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

.profile-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-light);
  margin-left: 5px;
}

.greeting-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 1px;
  color: #000;
}

.user-token-info {
  font-size: 13px;
  color: var(--dark);
}

.user-token-info strong {
  color: var(--primary);
  font-weight: 600;
}

.header-right {
  display: flex;
  gap: 16px;
}

.header-icon {
  width: 22px;
  height: 22px;
  opacity: 0.8;
  transition: var(--transition);
  filter: brightness(0.8);
  margin-right: 6px;
}

.header-icon:hover {
  opacity: 1;
  transform: scale(1.1);
  filter: brightness(1);
}
/* Notification */
.notification-badge {
    position: absolute;
    top: 0.0rem;
    right: 1rem;
    background: #FF7043; /* Oranye untuk notifikasi */
    color: white;
    font-size: 8px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 9999px;
    min-width: 16px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}


/* ===== MAIN CONTENT STYLES ===== */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 20px;
}

/* ===== BALANCE CARD ===== */
.balance-card {
  background: var(--primary-gradient);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 9px;
  color: white;
  box-shadow: 
    0 4px 12px rgba(255, 107, 0, 0.25),
    0 2px 6px rgba(255, 107, 0, 0.15);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* Efek glossy modern */
.balance-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center, 
    rgba(255, 255, 255, 0.3) 0%, 
    rgba(255, 255, 255, 0) 70%
  );
  transform: rotate(30deg);
  pointer-events: none;
}

.balance-card:hover {
  box-shadow: 
    0 6px 16px rgba(255, 107, 0, 0.35),
    0 4px 10px rgba(255, 107, 0, 0.2);
  animation: float 3s ease-in-out infinite;
}

.label {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.value {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.balance-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.action-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--primary-alpha-15);
  border-radius: var(--radius-sm);
  padding: 1px 1px;
  width: 100%;
  text-decoration: none;
  color: white;
  transition: var(--transition);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.action-button:hover {
  background: var(--primary-alpha-25);
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.action-button img {
  width: 20px;
  height: 20px;
  margin-bottom: 6px;
  margin-top: 6px;
  filter: brightness(0) invert(1);
}

.action-button span {
  font-size: 12px;
  font-weight: 500;
}

/* ===== NOTIFICATION BANNER ===== */
.notification-banner {
  background: #FFFFFF; 
  color: #F06262;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(243, 156, 18, 0); }
  100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0); }
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

.notification-banner p {
  flex: 1;
}

/* ===== MENU GRID ===== */
.menu-grid-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 13px 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 12px;
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
}

.menu-item:hover {
  transform: translateY(-3px);
  color: var(--primary);
}

.menu-item img {
  width: 30px;
  height: 30px;
  margin-bottom: 3px;
  transition: var(--transition);
  filter: brightness(0.9);
}

.menu-item:hover img {
  filter: brightness(1);
}

.menu-item div {
  font-size: 11px;
  font-weight: 00;
  text-align: center;
  color: #000;
}

/* ===== ACTIVE SERVICE CARD ===== */
.active-service-details-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 8px;
  margin-bottom: px;
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--dark);
  display: flex;
  align-items: center;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
  margin-right: 8px;
}

.active-service-details {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3px 3px;
}

.label {
  font-weight: 500;
  color: var(--text);
  font-size: 13px;
 
}

.value-item {
  font-weight: 400;
  color: var(--text);
  text-align: right;
  word-break: break-all;
  
}

.status-indicator {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
}

.status-active {
  background: rgba(39, 174, 96, 0.15);
  color: var(--success);
}

.status-inactive {
  background: rgba(149, 165, 166, 0.15);
  color: var(--gray);
}

.status-expired {
  background: rgba(231, 76, 60, 0.15);
  color: var(--danger);
}

.status-error {
  background: rgba(155, 89, 182, 0.15);
  color: #9b59b6;
}

.no-data-message {
  text-align: center;
  padding: 20px 0;
  color: var(--text-light);
  font-size: 14px;
}

/* Layanan Internet Tersedia (Package Grid Card) */
.package-grid-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #FAFAFA 100%); /* Putih ke off-white */
    padding: .7rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #E0E0E0; /* Border abu-abu lembut */
       margin-left: 0rem;
    margin-right: 0rem;
    margin-bottom: 0rem;
}
.package-grid-card h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: #333; /* Judul abu-abu gelap */
    font-weight: 700;
    font-size: 1.1rem;
}
.package-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Kembali ke 4 kolom */
    gap: 0.8rem;
}
.package-card {
    background: linear-gradient(145deg, #FFFFFF 0%, #FAFAFA 100%); /* Putih ke off-white */
    color: #000; /* Teks abu-abu gelap */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 1rem;
    text-align: center;
    border: 1px solid #E0E0E0; /* Border abu-abu lembut */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 140px;
}
.package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.card-nama {
    color: #333;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 0.3rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px dashed #E0E0E0; /* Garis abu-abu lembut */
    font-size: 20px;
}
.data-profile {color: #333;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 0.3rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px dashed #E0E0E0; /* Garis abu-abu lembut */
    font-size: 20px;}
    
.card-harga {
    font-weight: 800;
    color: #D32F2F; /* Merah kuat untuk harga (tetap untuk menarik perhatian) */
    display: block;
    font-size: 1.4rem !important;
    margin-top: 0.2rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed #E0E0E0;
}
.card-rate {
    color: #757575; /* Abu-abu medium */
    min-height: 20px;
    line-height: 1.3;
    margin-top: 0.6rem;
    font-size: 0.85rem;
}

/* Specific adjustments for mobile screens for package grid */
@media (max-width: 768px) {
    .package-grid {
        grid-template-columns: repeat(4, 1fr); /* Tetap 4 kolom untuk mobile */
        gap: 0.3rem; /* Mengurangi jarak antar kolom untuk 4 kolom */
        padding: 0.1rem; /* Mengurangi padding */
    }
    .package-card {
        padding: 0.4rem; /* Mengurangi padding kartu */
        border-radius: 8px; /* Lebih kecil */
        min-height: 90px; /* Tinggi minimum lebih rendah */
        box-shadow: 0 1px 6px rgba(0,0,0,0.1);
    }
    .card-nama {
        font-size: 12px !important; /* Ukuran teks lebih kecil */
        margin-bottom: 0.1rem;
        padding-bottom: 0rem;
    }
    .card-harga {
        font-size: .9rem !important; /* Ukuran harga lebih kecil */
        margin-top: 0.1rem;
        margin-bottom: 0.1rem;
        padding-bottom: 0.1rem;
    }
    .card-rate {
        font-size: 0.6rem !important; /* Ukuran rate limit lebih kecil */
        min-height: 10px; /* Tinggi minimum lebih rendah */
        margin-top: 0.1rem;
    }
}



/* ===== TRANSACTION HISTORY ===== */
.transaction-history-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-light);
}

.tx-item:last-child {
  border-bottom: none;
}

.tx-details {
  flex: 1;
  min-width: 0;
}

.tx-name {
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-date {
  font-size: 12px;
  color: var(--text-light);
}

.tx-amount-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 100px;
}

.tx-amount {
  font-weight: 600;
  margin-bottom: 4px;
}

.status-debit-text {
  color: var(--danger);
}

.status-success-text {
  color: var(--success);
}

.tx-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 16px;
  font-weight: 500;
}

.status-paid {
  background: rgba(39, 174, 96, 0.15);
  color: var(--success);
}

.status-active {
  background: rgba(39, 174, 96, 0.15);
  color: var(--success);
}

.status-debit {
  background: rgba(231, 76, 60, 0.15);
  color: var(--danger);
}

.status-expired {
  background: rgba(149, 165, 166, 0.15);
  color: var(--gray);
}

.status-pending {
  background: rgba(243, 156, 18, 0.15);
  color: var(--warning);
}

.status-failed {
  background: rgba(231, 76, 60, 0.15);
  color: var(--danger);
}

.status-success {
  background: rgba(39, 174, 96, 0.15);
  color: var(--success);
}

/* ===== BUTTONS & LINKS ===== */
.button-link {
  display: inline-block;
  background: var(--primary);
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 13px;
  text-align: center;
  transition: var(--transition);
  margin-top: 8px;
  border: none;
  cursor: pointer;
  width: 100%;
  max-width: 200px;
}

.button-link:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ===== FOOTER ===== */
footer {
 
  bottom: 0;       /* Menempel di bagian paling bawah */
  left: 0;
  text-align: center;
  padding: 10px 0;
  color: var(--text-light);
  font-size: 12px;
  margin-top: auto;
  border-top: 1px solid var(--gray-light);
  z-index: 1000;
}



/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 480px) {
  .menu-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 12px 8px;
  }
  
  .menu-item img {
    width: 24px;
    height: 24px;
  }
  
  .menu-item div {
    font-size: 11px;
  }
  
  .package-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .slideshow-container {
    height: 130px;
  }
  
  .prev, .next {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .menu-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 6px;
  }
  
  .menu-item img {
    width: 22px;
    height: 22px;
  }
  
  .menu-item div {
    font-size: 10px;
  }
  
  .balance-actions {
    gap: 6px;
  }
  
  .action-button {
    padding: 8px 6px;
  }
  
  .action-button span {
    font-size: 11px;
  }
  
  .package-grid {
    grid-template-columns: 1fr;
  }

.voucher-horizontal-card {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: white;
    border-radius: 12px;
    padding: 25px 30px;
    margin: ;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    max-width: 700px;
    overflow: hidden;
    margin-bottom: 8px;
}

.voucher-left h2 {
    font-size: 1.8rem;
    margin: 0 0 8px;
}

.voucher-left .status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-block;
}

.status-active {
    background-color: #28a745;
    color: white;
}

.status-expired {
    background-color: #dc3545;
    color: white;
}

.voucher-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.voucher-info span {
    font-size: 0.85rem;
    opacity: 0.85;
}

.voucher-info code,
.voucher-info strong {
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 5px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 4px;
}

/* === Watermark Style === */
.voucher-watermark {
    position: absolute;
    right: 15px;
    bottom: 30px;
    font-size: 2.8rem;
    color: rgba(255, 255, 255, 0.06);
    font-weight: bold;
    pointer-events: none;
    user-select: none;
    transform: rotate(-20deg);
}
