/* =========================================================
   Rakibul Services | Modern Payment Portal Stylesheet
   Designed to match the Homepage Theme & Aesthetic
   ========================================================= */

:root {
  --primary-color: #FF9000;
  --primary-hover: #ff9b1a;
  --accent-coral: #F35F55;
  --dark-bg: #18191c;
  --dark-surface: #24272d;
  --dark-header: #1e2229;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg-page: #f8fafc;
  --card-bg: #ffffff;
  --border-light: #e2e8f0;
  --border-focus: #FF9000;
  --success-green: #10b981;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 50px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-page);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   Top Navigation Bar
   ========================================================= */
.portal-navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.portal-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--dark-header);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.3px;
}

.portal-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

.portal-brand span {
  font-family: "Space Mono", monospace, sans-serif;
}

.portal-brand span .dot {
  color: var(--primary-color);
}

.portal-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.portal-nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.portal-nav-links a:hover {
  color: var(--primary-color);
}

.portal-nav-links a.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
}

.portal-nav-links a.btn-back-home:hover {
  background: var(--dark-header);
  color: #ffffff;
  border-color: var(--dark-header);
}

/* =========================================================
   Hero Banner Section
   ========================================================= */
.portal-hero {
  background: linear-gradient(135deg, rgba(24, 28, 36, 0.95) 0%, rgba(35, 41, 52, 0.92) 100%),
              url('../images/cover_bg_1.jpg');
  background-size: cover;
  background-position: center;
  color: #ffffff;
  padding: 55px 24px 65px;
  text-align: center;
  position: relative;
  border-bottom: 3px solid var(--primary-color);
}

.portal-hero-container {
  max-width: 800px;
  margin: 0 auto;
}

.portal-badge-shield {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 144, 0, 0.15);
  border: 1px solid rgba(255, 144, 0, 0.35);
  color: #ffb74d;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.pulse-circle {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.portal-hero h1 {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.portal-hero p {
  font-size: 16px;
  color: #cbd5e1;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* =========================================================
   Main Payment Dashboard Container
   ========================================================= */
.portal-main {
  flex: 1;
  max-width: 1160px;
  width: 100%;
  margin: -35px auto 60px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.payment-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 28px;
  align-items: start;
}

/* =========================================================
   Left Card: Merchant & Order Summary
   ========================================================= */
.merchant-summary-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.merchant-header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.merchant-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  box-shadow: 0 2px 8px rgba(255, 144, 0, 0.2);
}

.merchant-info h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark-header);
  margin-bottom: 3px;
}

.merchant-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.verified-tag {
  color: #10b981;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Live Amount Preview Box */
.live-summary-box {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 25px;
  text-align: center;
}

.live-summary-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
}

.live-summary-amount {
  font-size: 34px;
  font-weight: 800;
  color: var(--dark-header);
  font-family: "Space Mono", monospace, sans-serif;
  letter-spacing: -1px;
}

.live-summary-amount .currency {
  font-size: 24px;
  color: var(--primary-color);
  margin-right: 4px;
}

.live-summary-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  word-break: break-word;
}

/* Summary Line Items */
.summary-line-items {
  list-style: none;
  padding: 0;
  margin: 0 0 25px;
}

.summary-line-items li {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.summary-line-items li strong {
  color: var(--dark-header);
}

.summary-line-items li.total-line {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark-header);
  border-bottom: none;
  padding-top: 12px;
}

/* Security Guarantee Highlights */
.security-features-list {
  background: #fdfdfd;
  border: 1px solid #eef2f6;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 22px;
}

.security-features-list h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--dark-header);
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.security-features-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.security-features-list li {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.security-features-list li:last-child {
  margin-bottom: 0;
}

.security-features-list li i {
  color: #10b981;
  font-size: 13px;
}

/* Direct Support Strip */
.support-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-secondary);
}

.support-strip a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.support-strip a:hover {
  text-decoration: underline;
}

/* =========================================================
   Right Card: Interactive Payment Terminal
   ========================================================= */
.payment-terminal-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.terminal-header {
  margin-bottom: 22px;
}

.terminal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark-header);
  margin-bottom: 4px;
}

.terminal-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Segmented Method Switcher */
.method-segmented-bar {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-pill);
  gap: 6px;
  margin-bottom: 26px;
  border: 1px solid #e2e8f0;
}

.method-tab-btn {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  outline: none;
}

.method-tab-btn.active {
  background: #ffffff;
  color: var(--dark-header);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.method-tab-btn .badge-rec {
  background: var(--primary-color);
  color: #ffffff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
}

/* Form Groups & Inputs */
.form-field-group {
  margin-bottom: 20px;
}

.form-field-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--dark-header);
  margin-bottom: 6px;
}

.form-field-group label .required {
  color: var(--accent-coral);
}

/* Currency Input Wrapper */
.amount-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-affix {
  position: absolute;
  left: 18px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
  pointer-events: none;
}

.amount-input-wrapper input {
  padding-left: 42px !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  font-family: "Space Mono", monospace, sans-serif !important;
  color: var(--dark-header) !important;
  height: 54px !important;
}

.custom-input,
.custom-select {
  width: 100%;
  height: 48px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--dark-header);
  background: #f8fafc;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  outline: none;
}

.custom-input:focus,
.custom-select:focus {
  background: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 144, 0, 0.16);
}

.custom-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-6-6h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Quick Select Amount Chips */
.quick-amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip-btn {
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: #e2e8f0;
  color: var(--dark-header);
}

.chip-btn.active {
  background: rgba(255, 144, 0, 0.15);
  border-color: var(--primary-color);
  color: #d97706;
}

/* Customer Details Optional Collapse */
.customer-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 5px;
}

/* Razorpay CTA Button */
.btn-pay-razorpay {
  width: 100%;
  height: 54px;
  background: linear-gradient(135deg, #FF9000 0%, #ff8000 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(255, 144, 0, 0.35);
  margin-top: 24px;
}

.btn-pay-razorpay:hover {
  background: linear-gradient(135deg, #ff9b1a 0%, #ff8c00 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 144, 0, 0.45);
}

.btn-pay-razorpay:active {
  transform: translateY(0);
}

.btn-pay-razorpay:disabled {
  background: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.gateway-accepted-bar {
  margin-top: 18px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

.network-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.network-tag {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

/* QR Code Section View */
.qr-view-container {
  display: none;
  text-align: center;
  padding: 10px 0;
}

.qr-card-box {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 24px 20px;
  display: inline-block;
  margin: 15px auto;
  box-shadow: var(--shadow-sm);
}

.qr-code-holder {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 15px;
}

.upi-id-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-header);
}

.btn-copy-upi {
  background: #007bff;
  color: #ffffff;
  border: none;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-upi:hover {
  background: #0056b3;
}

.btn-upi-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #10b981;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  margin-top: 15px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-upi-app:hover {
  background: #059669;
  transform: translateY(-2px);
}

/* =========================================================
   Receipt Card (Post-Payment Success Modal)
   ========================================================= */
.receipt-wrapper {
  display: none;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  box-shadow: var(--shadow-lg);
  border: 2px solid #10b981;
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  animation: fadeInReceipt 0.4s ease;
}

@keyframes fadeInReceipt {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.receipt-status-icon {
  width: 72px;
  height: 72px;
  background: #ecfdf5;
  border: 3px solid #10b981;
  color: #10b981;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin-bottom: 16px;
}

.receipt-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark-header);
  margin-bottom: 6px;
}

.receipt-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 25px;
}

.receipt-data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
  text-align: left;
  background: #f8fafc;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.receipt-data-table tr {
  border-bottom: 1px solid #eef2f6;
}

.receipt-data-table tr:last-child {
  border-bottom: none;
}

.receipt-data-table td {
  padding: 12px 18px;
  font-size: 13px;
}

.receipt-data-table td.label-cell {
  color: var(--text-secondary);
  font-weight: 500;
  width: 40%;
}

.receipt-data-table td.value-cell {
  color: var(--dark-header);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.receipt-action-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-receipt-action {
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-receipt-primary {
  background: var(--dark-header);
  color: #ffffff;
}

.btn-receipt-primary:hover {
  background: #000000;
}

.btn-receipt-secondary {
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.btn-receipt-secondary:hover {
  background: #e2e8f0;
}

/* Toast Notifications */
.portal-toast {
  display: none;
  position: fixed;
  top: 25px;
  right: 25px;
  z-index: 9999;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  background: #1e2229;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  animation: slideInToast 0.3s ease;
  max-width: 380px;
}

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

.portal-toast.success {
  background: #065f46;
  border-left: 5px solid #10b981;
}

.portal-toast.error {
  background: #991b1b;
  border-left: 5px solid #ef4444;
}

/* =========================================================
   Responsive Design Rules (Mobile & Tablet)
   ========================================================= */
@media screen and (max-width: 900px) {
  .payment-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .merchant-summary-card {
    order: 2;
  }

  .payment-terminal-card {
    order: 1;
  }
}

@media screen and (max-width: 600px) {
  .portal-nav-container {
    padding: 12px 16px;
  }

  .portal-hero {
    padding: 40px 18px 50px;
  }

  .portal-hero h1 {
    font-size: 26px;
  }

  .portal-hero p {
    font-size: 14px;
  }

  .portal-main {
    margin-top: -25px;
    padding: 0 14px;
  }

  .merchant-summary-card,
  .payment-terminal-card {
    padding: 24px 18px;
  }

  .customer-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .btn-pay-razorpay {
    font-size: 15px;
    height: 50px;
  }

  .portal-toast {
    left: 15px;
    right: 15px;
    max-width: none;
    top: 15px;
  }
}