/* ==========================================================================
   BizNivo Tools — Ultra-Reliable Mobile & iOS Fullscreen Workspaces
   Rock-Solid 100dvh Scrolling on iPhone, iPad, Android, and Desktop
   ========================================================================== */

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

:root {
  /* Brand Accent */
  --brand-primary: #2563eb;
  --brand-primary-hover: #1d4ed8;
  --brand-primary-light: #eff6ff;
  --brand-primary-border: #bfdbfe;

  /* Neutral Surface Palette */
  --bg-body: #f8fafc;
  --bg-white: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f8fafc;

  /* Text Colors */
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Borders & Dividers */
  --border-light: #e2e8f0;
  --border-card: #e2e8f0;
  --border-focus: #3b82f6;

  /* Functional Badges */
  --badge-free-bg: #f1f5f9;
  --badge-free-text: #475569;
  --badge-pop-bg: #fef3c7;
  --badge-pop-text: #d97706;

  /* Tool Accents */
  --icon-blue: #2563eb;
  --icon-blue-bg: #eff6ff;
  --icon-red: #ef4444;
  --icon-red-bg: #fef2f2;
  --icon-emerald: #10b981;
  --icon-emerald-bg: #ecfdf5;
  --icon-purple: #8b5cf6;
  --icon-purple-bg: #f5f3ff;
  --icon-amber: #f59e0b;
  --icon-amber-bg: #fffbeb;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Reset & iOS Optimization */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

body.modal-open {
  overflow: hidden;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-primary-hover);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

/* ==========================================================================
   1. Header Navigation
   ========================================================================== */
.header-nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  padding-top: env(safe-area-inset-top, 0);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 0.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none !important;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.4px;
}

.brand-title span {
  color: var(--brand-primary);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

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

.nav-link {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-body);
  text-decoration: none !important;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--brand-primary);
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#daily-usage-badge {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border: 1px solid var(--brand-primary-border);
  white-space: nowrap;
}

@media (max-width: 600px) {
  #daily-usage-badge {
    display: none;
  }
}

.btn-search-trigger {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.btn-search-trigger:hover {
  background: var(--bg-subtle);
  color: var(--text-dark);
}

.btn-upgrade-pro {
  background: var(--brand-primary);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  text-decoration: none !important;
  transition: background var(--transition-fast), transform var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.btn-upgrade-pro:hover {
  background: var(--brand-primary-hover);
}

/* ==========================================================================
   2. Hero Section
   ========================================================================== */
.hero-sec {
  padding: 2.75rem 0 2rem;
  text-align: center;
}

@media (max-width: 640px) {
  .hero-sec {
    padding: 2rem 0 1.5rem;
  }
}

.hero-h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 5.5vw, 3rem);
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.75px;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 1.75rem;
  padding: 0 0.5rem;
  line-height: 1.5;
}

/* Big Search Box */
.search-bar-container {
  max-width: 600px;
  margin: 0 auto 1.5rem;
  position: relative;
  width: 100%;
}

.search-icon-svg {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.search-input-main {
  width: 100%;
  padding: 0.95rem 1.25rem 0.95rem 2.85rem;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  background: var(--bg-white);
  color: var(--text-dark);
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all var(--transition-fast);
  -webkit-appearance: none;
}

.search-input-main:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

.hero-trust-line {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-trust-line span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.trust-check {
  color: var(--icon-emerald);
  font-weight: 700;
}

/* ==========================================================================
   3. Category Pill Navigation
   ========================================================================== */
.categories-nav-sec {
  margin-bottom: 2rem;
}

.category-pills-wrap {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 540px) {
  .category-pills-wrap {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    padding-left: 0.25rem;
  }
  .category-pills-wrap::-webkit-scrollbar {
    display: none;
  }
}

.pill-btn {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  padding: 0.45rem 1.05rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.pill-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-dark);
}

.pill-btn.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   4. Tool Cards Grid
   ========================================================================== */
.tools-grid-sec {
  padding-bottom: 3.5rem;
}

.tools-grid-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 920px) {
  .tools-grid-layout {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .tools-grid-layout {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

.tool-box-card {
  background: var(--bg-white);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  cursor: pointer;
  text-decoration: none !important;
  position: relative;
}

@media (max-width: 480px) {
  .tool-box-card {
    padding: 1.2rem;
  }
}

.tool-box-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-card-hover);
}

.tool-box-card:active {
  transform: scale(0.99);
}

.card-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.svg-icon-frame {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.svg-icon-frame svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

.svg-icon-frame.blue { background: var(--icon-blue-bg); color: var(--icon-blue); }
.svg-icon-frame.red { background: var(--icon-red-bg); color: var(--icon-red); }
.svg-icon-frame.emerald { background: var(--icon-emerald-bg); color: var(--icon-emerald); }
.svg-icon-frame.purple { background: var(--icon-purple-bg); color: var(--icon-purple); }
.svg-icon-frame.amber { background: var(--icon-amber-bg); color: var(--icon-amber); }

.card-badge-pill {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--badge-free-bg);
  color: var(--badge-free-text);
}

.card-badge-pill.pop {
  background: var(--badge-pop-bg);
  color: var(--badge-pop-text);
}

.card-tool-name {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.card-tool-desc {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.card-formats-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.format-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.card-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
}

.card-action-btn {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   5. Clean Premium Banner
   ========================================================================== */
.premium-banner-sec {
  margin: 1rem 0 3.5rem;
}

.premium-banner-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

@media (max-width: 800px) {
  .premium-banner-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }
}

.premium-banner-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.premium-banner-sub {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.55;
}

.premium-action-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

@media (max-width: 800px) {
  .premium-action-right {
    align-items: center;
    width: 100%;
  }
}

.premium-price-tag {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #60a5fa;
}

.btn-banner-upgrade {
  background: var(--brand-primary);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  text-decoration: none !important;
  white-space: nowrap;
}

@media (max-width: 800px) {
  .btn-banner-upgrade {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   6. Clean Privacy Section
   ========================================================================== */
.privacy-trust-sec {
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 3.5rem 0;
}

.privacy-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.privacy-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.privacy-sub {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.55;
}

.privacy-cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .privacy-cols-3 {
    grid-template-columns: 1fr;
  }
}

.privacy-col-item {
  background: var(--bg-body);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.privacy-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--brand-primary);
}

.privacy-col-h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}

.privacy-col-p {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.5;
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
.main-footer-sec {
  background: var(--bg-white);
  padding: 3.5rem 0 2rem;
}

.footer-grid-4 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 860px) {
  .footer-grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 480px) {
  .footer-grid-4 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.footer-col-h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-list a {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-list a:hover {
  color: var(--brand-primary);
}

.footer-bottom-line {
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ==========================================================================
   8. Tool Workspace (Ultra-Reliable Native Full-Screen Scrolling on Mobile)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-dialog {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  padding: 1.1rem 1.4rem;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.modal-close-btn {
  background: var(--bg-subtle);
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.modal-body {
  padding: 1.4rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-body);
  flex-grow: 1;
}

/* === MOBILE & IPHONE OPTIMIZATION (< 768px) === */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0;
    align-items: stretch;
    background: var(--bg-body);
    display: block;
    overflow-y: scroll;
  }

  .modal-dialog {
    max-height: none;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    margin: 0;
    display: block;
    box-shadow: none;
    transform: none !important;
  }

  .modal-header {
    padding: 1rem 1.25rem;
    padding-top: calc(env(safe-area-inset-top, 0) + 0.75rem);
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .modal-body {
    padding: 1.25rem 1rem 5rem; /* Large bottom padding for iPhone touch swipe & home bar */
    overflow: visible;
  }
}

/* Dropzone */
.dropzone-box {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 2rem 1.25rem;
  text-align: center;
  background: var(--bg-white);
  cursor: pointer;
  position: relative;
  margin-bottom: 1.25rem;
}

.dropzone-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.dropzone-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.dropzone-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* Split Controls */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .split-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-input, .form-select, textarea.form-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  font-family: inherit;
  font-size: 16px; /* Prevents iPhone Safari zoom */
  outline: none;
  -webkit-appearance: none;
}

.form-input:focus, .form-select:focus, textarea.form-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

/* Range Slider */
.slider-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.range-slider {
  flex-grow: 1;
  accent-color: var(--brand-primary);
  height: 6px;
  cursor: pointer;
}

.value-badge {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  min-width: 42px;
  text-align: center;
}

/* Presets Grid */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.preset-btn {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  color: var(--text-dark);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
}

.preset-btn.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

.preset-name {
  font-weight: 700;
  display: block;
}

.preset-size {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.preset-btn.active .preset-size {
  color: #bfdbfe;
}

/* Preview Box */
.preview-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.preview-media {
  max-width: 100%;
  max-height: 200px;
  border-radius: 6px;
  object-fit: contain;
}

.stats-summary-bar {
  display: flex;
  width: 100%;
  justify-content: space-around;
  margin-top: 0.85rem;
  padding: 0.65rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.stat-cell {
  text-align: center;
}

.stat-cell-title {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.stat-cell-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
}

.stat-cell-val.positive {
  color: var(--icon-emerald);
}

/* Button */
.btn-corp-primary {
  background: var(--brand-primary);
  color: #fff !important;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.35rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  width: 100%;
}

.btn-corp-primary:active {
  background: var(--brand-primary-hover);
}

.btn-corp-secondary {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 38px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Toast Stack */
.toast-stack {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  align-items: center;
}

@media (min-width: 600px) {
  .toast-stack {
    left: auto;
    align-items: flex-end;
  }
}

.toast-msg {
  background: #0f172a;
  color: #fff;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-modal);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-normal);
  pointer-events: all;
  max-width: 90vw;
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-msg.success { border-left: 4px solid var(--icon-emerald); }
.toast-msg.error { border-left: 4px solid var(--icon-red); }
