/* Paybills Modern Design System - Vanilla CSS */
:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg-color: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --border-subtle: #cbd5e1;
  --border-focus: #1d4ed8;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-glow: rgba(29, 78, 216, 0.18);
  --accent: #047857;
  --accent-hover: #065f46;
  --accent-glow: rgba(4, 120, 87, 0.18);
  --text-primary: #090d16;
  --text-secondary: #1e293b;
  --text-muted: #475569;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --warning: #b45309;
  --success-bg: #ecfdf5;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05), 0 0 0 1px rgba(15, 23, 42, 0.05);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(16, 185, 129, 0.03) 0%, transparent 45%);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Header & Navbar */
.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #2563eb, #10b981);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.7rem;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.lang-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--primary);
  border-color: var(--primary);
}

.auth-slot-btn {
  background: transparent;
  border: 1px dashed var(--border-subtle);
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: not-allowed;
  transition: var(--transition);
}

.auth-slot-btn:hover {
  color: var(--text-primary);
}

/* Main Content */
main {
  flex: 1;
  padding: 40px 0 60px;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 35px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  color: #090d16;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* App Card */
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-card);
  margin-bottom: 40px;
}

/* Dropzone */
.dropzone {
  border: 2px dashed #94a3b8;
  border-radius: var(--radius-md);
  padding: 42px 20px;
  text-align: center;
  background: #ffffff;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: 0 0 20px var(--primary-glow);
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  color: var(--primary);
  margin-bottom: 12px;
}

.dropzone-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.dropzone-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 14px;
}

.btn-browse {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-browse:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
}

.dropzone-privacy {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #047857;
  background: rgba(16, 185, 129, 0.03);
  border: 1px solid #a7f3d0;
  padding: 5px 14px;
  border-radius: 20px;
  line-height: 1.4;
  max-width: 95%;
  margin-left: auto;
  margin-right: auto;
}

.dropzone-privacy svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

/* File List & Previews */
.file-list-wrap {
  margin-top: 24px;
}

.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.file-badge {
  font-size: 0.72rem;
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.file-size {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.file-remove-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 1.1rem;
  line-height: 1;
  transition: var(--transition);
}

.file-remove-btn:hover {
  color: var(--danger);
}

/* Debtor Details Accordion */
.accordion {
  margin-top: 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.accordion-summary {
  padding: 13px 18px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.accordion-summary:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.accordion-content {
  padding: 18px;
  background: var(--bg-card);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-group input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus {
  border-color: var(--border-focus);
}

/* Action Buttons Group (Dual actions: Add to Stack vs Generate XML directly) */
.action-wrap {
  margin-top: 28px;
}

.action-buttons-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
}

@media (max-width: 640px) {
  .action-buttons-group {
    grid-template-columns: 1fr;
  }
}

.btn-action-stack {
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.28);
}

.btn-action-stack:hover:not(:disabled) {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.38);
  transform: translateY(-1px);
}

.btn-action-stack:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-convert {
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-convert:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 22px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-convert:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Result Card */
.result-card {
  margin-top: 24px;
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 20px;
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.result-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.result-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #047857;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.btn-download {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-download:hover {
  background: #059669;
}

.btn-reset {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-reset:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Alert Box */
.alert-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: none;
  background: var(--danger-bg);
  border: 1px solid #fecaca;
  color: #b91c1c;
  background: #fef2f2;
  animation: fadeIn 0.3s ease-in-out;
}

/* Informational & SEO Section (3 Columns) */
.info-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
  margin-bottom: 48px;
}

@media (max-width: 992px) {
  .info-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.info-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

.info-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.35;
}

.info-card-lead {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.info-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
}

.info-feature-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.info-feature-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: -1px;
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 800;
}

.info-feature-list li strong {
  color: var(--text-primary);
  font-weight: 700;
  display: inline;
  margin-right: 4px;
}

.security-guarantee-box {
  margin-top: 14px;
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.security-guarantee-item strong {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
  font-weight: 700;
  display: inline;
  margin-right: 4px;
}

.bank-badges {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.bank-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bank-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.bank-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bank-tag {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
}

.bank-tag:hover {
  border-color: var(--border-focus);
  color: var(--text-primary);
}

.bank-tag-eu {
  border-color: rgba(59, 130, 246, 0.3);
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.bank-tag-nordic {
  border-color: rgba(16, 185, 129, 0.3);
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.bank-tag-std {
  border-color: rgba(245, 158, 11, 0.3);
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

/* Honeypot field (hidden for users, bots fill it) */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* User Pill in Header */
.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
}

.user-pill-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

.user-pill-email {
  color: var(--text-primary);
  font-weight: 500;
}

.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding-left: 6px;
  border-left: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.btn-logout:hover {
  color: var(--danger);
}

/* Workspace Tier Badge */
.workspace-tier-badge {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.workspace-tier-badge.tier-authenticated {
  background: linear-gradient(135deg, #eff6ff, #ecfdf5);
  border-color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}

.tier-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.tier-info strong {
  display: block;
  font-size: 0.98rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.tier-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Authenticated Action Selector */
.auth-action-selector {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}

.auth-action-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-primary);
}

.radio-label input[type="radio"] {
  accent-color: var(--primary);
  cursor: pointer;
}

/* Featured Email Aggregation Card */
.info-card-featured {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid #bfdbfe;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
  position: relative;
  overflow: hidden;
}

.info-card-featured::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #10b981);
}

.featured-badge {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(37, 99, 235, 0.5);
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
}

.email-flow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.step-num {
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.05);
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.modal-header h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.btn-primary-block {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary-block:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 16px var(--primary-glow);
}

.modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.modal-divider::before, .modal-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-divider span {
  padding: 0 10px;
}

.btn-google-block {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #1f2937;
  border: none;
  border-radius: var(--radius-md);
  padding: 11px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-google-block:hover {
  background: #f3f4f6;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-test-login {
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border: 1px dashed var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  padding: 9px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-test-login:hover {
  border-color: var(--border-focus);
  color: var(--text-primary);
}

.login-protection-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Control Panel Section */
.control-panel-section {
  margin: 40px 0;
}

.control-panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .panel-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-icon {
  font-size: 1.4rem;
}

.panel-title-wrap h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.inbox-address-pill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 14px;
}

.inbox-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.inbox-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
  background: #ecfdf5;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-copy {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy:hover {
  border-color: var(--border-focus);
  color: var(--text-primary);
}

.copy-feedback {
  font-size: 0.75rem;
  color: var(--accent);
}

/* Panel Tabs */
.panel-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Stack Metrics & Table */
.stack-metrics-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 20px;
}

.metric-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.metric-val {
  font-size: 1.15rem;
  color: var(--text-primary);
}

.btn-convert-stack {
  background: linear-gradient(135deg, #2563eb, #10b981);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-convert-stack:hover:not(:disabled) {
  box-shadow: 0 0 16px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-convert-stack:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stack-empty-msg {
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
}

.stack-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.stack-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.stack-table th {
  background: var(--bg-input);
  padding: 12px 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.stack-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.stack-table tr:last-child td {
  border-bottom: none;
}

.stack-table tr:hover td {
  background: var(--bg-card-hover);
}

.btn-delete-inv {
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-delete-inv:hover {
  background: var(--danger-bg);
}

/* Settings Tab */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (min-width: 640px) {
  .settings-grid {
    grid-template-columns: 1fr 1.5fr;
  }
}

.form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  transition: var(--transition);
}

.form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feedback-text {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

/* Simulation Box */
.sim-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.sim-box h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.sim-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.sim-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 480px;
}
