/* ==========================================================================
   PayHelp v2 Design System (Vanilla HTML/CSS)
   Theme: Laranja (#ff8c00) & Abóbora (#e94e1b) - Mobile Responsive Fix
   ========================================================================== */

:root {
  /* Brand Colors */
  --primary-orange: #ff8c00;
  --pumpkin-orange: #e94e1b;
  --orange-light: #ffaa33;
  --orange-glow: rgba(255, 140, 0, 0.25);
  --pumpkin-glow: rgba(233, 78, 27, 0.2);

  /* Functional Colors */
  --emerald-success: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.2);
  --amber-warning: #f59e0b;
  --rose-danger: #f43f5e;

  /* Neutral Dark Theme */
  --bg-body: #090a0e;
  --bg-card: #11131b;
  --bg-card-hover: #171a26;
  --bg-card-glass: rgba(17, 19, 27, 0.8);
  --bg-surface: #1e2230;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(255, 140, 0, 0.3);
  --border-orange-strong: #ff8c00;

  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout Radius & Transitions */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

pre, code, textarea {
  max-width: 100% !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-x: auto !important;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--pumpkin-orange);
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.025em;
  color: var(--text-main);
  line-height: 1.25;
  word-break: break-word;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--pumpkin-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-orange { color: var(--primary-orange); }
.text-pumpkin { color: var(--pumpkin-orange); }
.text-emerald { color: var(--emerald-success); }
.text-muted { color: var(--text-muted); }
.font-mono { font-family: var(--font-mono); }

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 5rem 0;
  position: relative;
  overflow: hidden; /* Clips background glows */
}

@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .section { padding: 3rem 0; }
}

/* Glow Elements */
.bg-glow-orange {
  position: absolute;
  width: 500px;
  height: 500px;
  max-width: 100vw;
  background: radial-gradient(circle, var(--orange-glow) 0%, rgba(0,0,0,0) 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-pumpkin {
  position: absolute;
  width: 500px;
  height: 500px;
  max-width: 100vw;
  background: radial-gradient(circle, var(--pumpkin-glow) 0%, rgba(0,0,0,0) 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 768px) {
  .bg-glow-orange, .bg-glow-pumpkin {
    width: 250px;
    height: 250px;
    opacity: 0.5;
  }
}

/* Cards & Glassmorphism */
.card-glass {
  background: var(--bg-card-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition-fast);
  position: relative;
  max-width: 100%;
}

@media (max-width: 768px) {
  .card-glass {
    padding: 1.25rem;
  }
}

.card-glass:hover {
  border-color: var(--border-accent);
  box-shadow: 0 12px 30px -10px var(--orange-glow);
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1rem 0;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 100vw;
}

header.scrolled {
  background: rgba(9, 10, 14, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 140, 0, 0.2);
  padding: 0.6rem 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  max-width: 60%;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-orange), var(--pumpkin-orange));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 15px var(--orange-glow);
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(17, 19, 27, 0.8);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}

@media (max-width: 992px) {
  .nav-menu { display: none; }
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary-orange);
  background: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--pumpkin-orange) 100%);
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--orange-glow);
  transition: all var(--transition-fast);
  text-decoration: none;
  max-width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 140, 0, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  max-width: 100%;
}

.btn-secondary:hover {
  border-color: var(--primary-orange);
  color: var(--primary-orange);
}

/* Badges */
.badge-orange {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 140, 0, 0.12);
  border: 1px solid rgba(255, 140, 0, 0.3);
  color: var(--primary-orange);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-heading);
  max-width: 100%;
}

.badge-emerald {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-success);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  max-width: 100%;
}

.badge-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--rose-danger);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  max-width: 100%;
}

/* Inputs & Range Sliders */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-surface);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-orange), var(--pumpkin-orange));
  cursor: pointer;
  box-shadow: 0 0 10px var(--orange-glow);
}

/* Responsive CSS Grid System */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem; }

/* Grid Spans for Desktop */
@media (min-width: 993px) {
  .col-span-4 { grid-column: span 4; }
  .col-span-5 { grid-column: span 5; }
  .col-span-6 { grid-column: span 6; }
  .col-span-7 { grid-column: span 7; }
  .col-span-8 { grid-column: span 8; }
  .col-span-12 { grid-column: span 12; }
}

/* Reset Spans for Mobile & Tablet */
@media (max-width: 992px) {
  .grid-2, .grid-3, .grid-4, .grid-12 {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  .col-span-4, .col-span-5, .col-span-6, .col-span-7, .col-span-8, .col-span-12 {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }
}

/* Table Responsive Wrapper */
.table-responsive-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1rem;
}

.table-custom {
  width: 100%;
  min-width: 600px; /* Minimum width inside scrollable wrapper */
  border-collapse: separate;
  border-spacing: 0;
}

.table-custom th {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem;
  text-align: left;
}

.table-custom td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
  font-size: 0.9rem;
}
