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

:root {
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  
  /* Warning & UI Colors */
  --accent-red: #dc2626;
  --accent-red-light: #fef2f2;
  --accent-red-border: #fca5a5;
  
  --accent-green: #16a34a;
  --accent-green-light: #f0fdf4;
  
  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  /* Borders and Shadows */
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  
  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* --- HEADER --- */
header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-title {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-icon {
  color: var(--accent-red);
  font-size: 1.5rem;
  font-weight: 900;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: var(--accent-red-light);
  border: 1px solid var(--accent-red-border);
  color: var(--accent-red);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-red);
  border-radius: 50%;
}

/* --- MAIN CONTAINER --- */
main {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* --- ALERT PANEL --- */
.alert-banner {
  background-color: var(--accent-red-light);
  border: 1px solid var(--accent-red-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.alert-icon-wrap {
  background: var(--accent-red);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.alert-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-red);
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.alert-text {
  font-size: 0.9rem;
  color: #7f1d1d;
  line-height: 1.5;
}

/* --- INVOICE CARD --- */
.invoice-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-bottom: 2rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

/* Details List */
.details-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.details-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.92rem;
}

.details-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.details-value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.details-value.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.details-value.highlight {
  color: var(--accent-red);
}

/* Total Box */
.total-box {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.total-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-red);
}

/* --- PAYMENT CHANNELS --- */
.payment-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-bottom: 2rem;
}

.payment-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  margin-top: 1rem;
}

.bank-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bank-item {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bank-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.bank-account {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.bank-owner {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-copy {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-copy:hover {
  background-color: var(--accent-red-light);
  border-color: var(--accent-red-border);
  color: var(--accent-red);
}

/* QRIS Code */
.qris-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border-color);
  padding-left: 2rem;
}

.qris-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.qris-image {
  max-width: 150px;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.qris-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.4;
}

/* Retail Outlets */
.retail-section {
  background-color: #fefaf6;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.retail-text {
  font-size: 0.85rem;
  color: #7c2d12;
  max-width: 60%;
}

.retail-code-wrap {
  text-align: right;
}

.retail-code-lbl {
  font-size: 0.7rem;
  color: #ea580c;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.retail-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 800;
  color: #9a3412;
}

/* --- WHATSAPP ACTION --- */
.action-card {
  text-align: center;
}

.btn-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background-color: var(--accent-green);
  color: #ffffff;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  padding: 1rem 2.25rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2);
  transition: all 0.2s;
  width: 100%;
}

.btn-confirm:hover {
  background-color: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(22, 163, 74, 0.3);
}

.action-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* --- FOOTER --- */
footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  margin-top: auto;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.footer-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-contacts {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.contact-item i {
  color: var(--accent-red);
}

/* --- LOGIN PORTAL (ADMIN) --- */
.admin-login-body {
  background-color: #f1f5f9;
  justify-content: center;
  align-items: center;
}

.admin-login-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  position: relative;
}

.admin-login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-red);
  border-radius: 12px 12px 0 0;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.login-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.btn-admin-login {
  width: 100%;
  padding: 0.85rem;
  background-color: var(--text-primary);
  color: #ffffff;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.92rem;
  margin-top: 0.5rem;
}

.btn-admin-login:hover {
  background-color: #1e293b;
}

/* --- TOAST CLIP NOTIFICATION --- */
.toast-clip {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.toast-clip.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 640px) {
  main {
    padding: 1.5rem 1rem;
  }
  .payment-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .qris-section {
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding-left: 0;
    padding-top: 1.5rem;
  }
  .retail-section {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .retail-text {
    max-width: 100%;
  }
  .retail-code-wrap {
    text-align: center;
  }
}
