:root {
  --bg-dark: #0a0f0d;
  --bg-card: rgba(18, 28, 23, 0.75);
  --border-color: rgba(46, 125, 90, 0.25);
  --border-focus: #28a745;
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.35);
  --accent: #34d399;
  --accent-blue: #38bdf8;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-form: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

html {
  box-sizing: border-box;
  overflow-x: hidden;
  width: 100%;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  width: 100%;
}

/* Background Glow */
.glow-bg {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  max-width: 100vw;
  overflow: hidden;
}
.glow-bg.top-left {
  top: -200px;
  left: -200px;
  background: radial-gradient(circle, #059669, #064e3b);
}
.glow-bg.bottom-right {
  bottom: -200px;
  right: -200px;
  background: radial-gradient(circle, #0284c7, #065f46);
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
  min-width: 0;
  box-sizing: border-box;
}

/* Navbar */
.navbar {
  background: rgba(10, 15, 13, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
  min-width: 0;
  width: 100%;
}
.navbar .container {
  min-width: 0;
}
.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}
.brand-logo-container {
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 1px rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.95);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}
.brand-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}
.brand:hover .brand-logo-container {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4), 0 0 12px rgba(255, 255, 255, 0.4);
}
.brand-name {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 1.2px;
  background: linear-gradient(135deg, #34d399, #10b981, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-tagline {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.8vw, 12px);
  flex-wrap: nowrap;
  min-width: 0;
}
.nav-desktop-links {
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.7vw, 10px);
  flex-shrink: 0;
}
.nav-menu-wrap {
  display: none;
  position: relative;
  flex-shrink: 0;
}
.btn-nav-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.btn-nav-menu:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}
.nav-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 170px;
  background: #0f172a;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  padding: 8px 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}
.nav-menu-item {
  display: block;
  padding: 8px 16px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.nav-menu-item:hover {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
@media (max-width: 1199px) {
  .nav-desktop-links {
    display: none !important;
  }
  .nav-menu-wrap {
    display: inline-block !important;
  }
}
@media (max-width: 1360px) {
  #btn-google-login #login-text {
    display: none !important;
  }
  #btn-google-login {
    padding: 6px 9px !important;
    gap: 0 !important;
  }
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-link:hover {
  color: var(--accent);
}
.nav-btn-highlight {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-btn-highlight:hover {
  background: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 16px var(--primary-glow);
}
.store-link {
  color: var(--accent-blue);
  white-space: nowrap;
  font-size: 12.5px;
  flex-shrink: 0;
}

/* Hero */
.hero {
  padding: 44px 0 28px;
  text-align: center;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-logo-wrapper {
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(255, 255, 255, 0.2);
  margin: 0 auto 16px auto;
  border: 1px solid rgba(255, 255, 255, 0.95);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-logo-wrapper:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 36px rgba(16, 185, 129, 0.35), 0 0 25px rgba(255, 255, 255, 0.3);
}
.hero-logo-img {
  height: 72px;
  width: auto;
  display: block;
}
.badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 auto 16px auto;
}
.hero h1 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff, #d1d5db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 680px;
  margin: 0 auto;
}
.hero-desc strong {
  color: var(--accent);
}

/* Main Layout Grid */
.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 24px;
  padding-bottom: 72px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 992px) {
  .main-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Card Style */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.chat-icon {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
}
.card-header h2 {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.chat-founder-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  white-space: nowrap;
}
.subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* Forms */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  font-family: var(--font-form);
}
.help-text {
  font-size: 11px;
  color: var(--text-dim);
}
input, select, textarea {
  background: rgba(10, 15, 13, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-family: var(--font-form);
  font-size: 14px;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
select option, optgroup {
  background-color: #121c17;
  color: #fff;
  font-family: var(--font-form);
}
.input-unit {
  position: relative;
  display: flex;
  align-items: center;
}
.input-unit input {
  width: 100%;
  padding-right: 38px;
}
.input-unit .unit {
  position: absolute;
  right: 12px;
  font-size: 13px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Advanced Parameters */
.advanced-params {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.advanced-params summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  outline: none;
}
.params-grid {
  margin-top: 14px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 768px) {
  .params-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #062419;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--primary-glow);
  filter: brightness(1.05);
}
.btn-secondary {
  display: inline-block;
  background: #0284c7;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  margin-top: 10px;
}
.btn-secondary:hover {
  background: #0369a1;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

/* Results Area */
.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 28px 0;
}
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.results-header h3 {
  font-size: 18px;
  font-weight: 700;
}
.badge-accent {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent-blue);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.dosing-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.dosing-card {
  background: rgba(10, 15, 13, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dosing-card.secondary {
  border-left-color: var(--accent-blue);
}
.dosing-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.dosing-info h4 a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}
.dosing-info h4 a:hover {
  color: var(--accent);
}
.dosing-schedule {
  font-size: 12px;
  color: var(--text-muted);
}
.dosing-dose {
  text-align: right;
  min-width: 140px;
}
.dose-clicks {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}
.dose-ml {
  font-size: 11px;
  color: var(--text-dim);
}
.btn-buy-mini {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}
.btn-buy-mini:hover {
  text-decoration: underline;
}

.advice-box {
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 13px;
  margin-bottom: 20px;
  color: #e5e7eb;
}
.advice-box strong {
  color: var(--accent);
}

/* Lab Banner */
.lab-banner {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15), rgba(16, 185, 129, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.lab-banner-icon {
  font-size: 32px;
}
.lab-banner-content h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}
.lab-banner-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Chat Assistant Panel */
.card-chat {
  height: 720px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px;
  background: rgba(10, 15, 13, 0.4);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}
.msg-agent {
  align-self: flex-start;
}
.msg-user {
  align-self: flex-end;
}
.msg-bubble {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
}
.msg-agent .msg-bubble {
  background: rgba(18, 28, 23, 0.9);
  border: 1px solid rgba(46, 125, 90, 0.4);
  color: #f3f4f6;
  border-bottom-left-radius: 4px;
}
.msg-agent .msg-bubble a {
  color: var(--accent-blue);
  text-decoration: underline;
}
.msg-user .msg-bubble {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-input-row {
  display: flex;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}
.chat-input-row input {
  flex: 1;
  min-width: 0;
}
.btn-send {
  background: var(--primary);
  color: #062419;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 18px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-send:hover {
  background: var(--accent);
}
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.btn-suggestion {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-suggestion:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.45);
  color: #fff;
  transform: translateY(-1px);
}
.chat-disclaimer {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

/* Diagnostic Section */
.diagnostic-section {
  padding: 48px 24px 80px;
  position: relative;
  z-index: 1;
}
.diagnostic-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 36px;
}
.diagnostic-header h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 12px 0 10px;
  background: linear-gradient(180deg, #ffffff, #d1d5db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle-diag {
  color: var(--text-muted);
  font-size: 15px;
}
.diag-tabs {
  display: inline-flex;
  gap: 10px;
  background: rgba(18, 28, 23, 0.9);
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  margin-top: 24px;
}
.diag-tab {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.diag-tab:hover {
  color: #fff;
}
.diag-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #062419;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.diag-search-wrap {
  margin-top: 22px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.diag-search-wrap input {
  width: 100%;
  border-radius: 999px;
  padding: 12px 22px;
  background: rgba(18, 28, 23, 0.85);
  border: 1px solid var(--border-color);
  font-size: 14px;
}
.diag-search-wrap input:focus {
  border-color: var(--accent);
}

.diag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 22px;
}
@media (max-width: 768px) {
  .diag-grid {
    grid-template-columns: 1fr;
  }
}
.diag-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.diag-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}
.diag-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.diag-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.diag-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.diag-badge.plants {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.diag-badge.algae {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.diag-badge.fish {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.diag-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.diag-field {
  font-size: 13px;
  line-height: 1.5;
}
.diag-label {
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.diag-field.symptom {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-blue);
}
.diag-field.solution {
  background: rgba(16, 185, 129, 0.05);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}
.diag-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.btn-diag-product {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: var(--accent);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-diag-product:hover {
  background: rgba(16, 185, 129, 0.35);
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
}
.btn-diag-lab {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--accent-blue);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-diag-lab:hover {
  background: rgba(56, 189, 248, 0.3);
  color: #fff;
}

/* Chat Attachment & Photo Upload */
.btn-attach-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  flex-shrink: 0;
}
.btn-attach-photo:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--primary);
  transform: scale(1.04);
}

/* Voice Input / Microphone Button */
.btn-mic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  flex-shrink: 0;
  color: #f1f5f9;
}
.btn-mic:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--primary);
  transform: scale(1.04);
}
.btn-mic.recording {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
  animation: micPulse 1.2s infinite ease-in-out;
}
@keyframes micPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.voice-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin-bottom: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #fca5a5;
  animation: fadeIn 0.25s ease-out;
}
.voice-dot {
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444;
  animation: voiceBlink 0.9s infinite alternate;
}
@keyframes voiceBlink {
  0% { opacity: 0.3; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.15); }
}
.btn-done-voice {
  margin-left: auto;
  background: #10b981;
  color: #062419;
  font-weight: 700;
  font-size: 12px;
  border: none;
  border-radius: 6px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-done-voice:hover {
  background: #34d399;
  transform: scale(1.04);
}
.btn-cancel-voice {
  margin-left: 6px;
  background: transparent;
  border: none;
  color: #f87171;
  font-size: 15px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}
.btn-cancel-voice:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
}
.chat-attachment-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
}
.attachment-thumb-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.attachment-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.btn-remove-attachment {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.attachment-label {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
}
.chat-msg-img {
  max-width: 220px;
  max-height: 180px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.15);
  object-fit: cover;
}

/* AI Photo Diagnostic Card */
.photo-diag-card {
  background: linear-gradient(145deg, rgba(16, 24, 20, 0.95), rgba(10, 18, 14, 0.98));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}
.photo-diag-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent-gold), transparent);
}
.photo-diag-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.photo-diag-icon {
  width: 48px;
  height: 48px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.photo-diag-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.photo-diag-header p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Dropzone */
.photo-dropzone {
  border: 2px dashed rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.25);
  padding: 30px 20px;
  text-align: center;
  transition: all 0.25s;
  cursor: pointer;
}
.photo-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.12);
  transform: scale(1.01);
}
.dropzone-icon {
  font-size: 42px;
  margin-bottom: 10px;
}
.dropzone-title {
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 6px;
}
.dropzone-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.btn-select-photo {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-select-photo:hover {
  background: var(--primary);
  transform: translateY(-1px);
}

/* Preview Inside Dropzone */
.dropzone-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  cursor: default;
}
.preview-img-container {
  position: relative;
  max-width: 420px;
  max-height: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #000;
}
.preview-img-container img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  display: block;
}
.btn-remove-photo {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-remove-photo:hover {
  background: #dc2626;
  border-color: #dc2626;
}
.preview-actions {
  display: flex;
  width: 100%;
  max-width: 600px;
  gap: 10px;
  flex-wrap: wrap;
}
.photo-note-input {
  flex: 1;
  min-width: 240px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  outline: none;
}
.photo-note-input:focus {
  border-color: var(--primary);
}
.btn-analyze-ai {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px var(--primary-glow);
  transition: all 0.2s;
}
.btn-analyze-ai:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Loading State */
.photo-loading {
  padding: 30px 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  margin-top: 15px;
}
.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid rgba(16, 185, 129, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.photo-loading p {
  font-size: 15px;
  color: #fff;
  margin-bottom: 6px;
}
.loading-sub {
  font-size: 12px;
  color: var(--text-dim);
}

/* Photo Result */
.photo-result {
  margin-top: 20px;
  background: rgba(5, 15, 10, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease-out;
}
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.result-badge {
  background: rgba(16, 185, 129, 0.25);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-close-result {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s;
}
.btn-close-result:hover {
  color: #fff;
}
.result-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
}
.result-body h4 {
  font-size: 16px;
  color: #fff;
  margin: 12px 0 6px;
}
.result-body ul {
  padding-left: 20px;
  margin: 8px 0;
}
.result-body li {
  margin-bottom: 6px;
}
.result-body a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
}
.result-body a:hover {
  color: #fff;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  background: rgba(10, 15, 13, 0.9);
  padding: 24px 0;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}
.footer-links {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 14px;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--accent);
}

/* Chemiclean Mini Calculator */
.chemiclean-calc-box {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chemiclean-calc-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chemiclean-calc-header strong {
  color: #34d399;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chemiclean-calc-header .calc-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.chemiclean-calc-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chemiclean-calc-body label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-color);
}
.chemiclean-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chemiclean-input-group input {
  width: 120px;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.chemiclean-input-group input:focus {
  outline: none;
  border-color: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.2);
}
.chemiclean-input-group .input-unit {
  font-size: 12px;
  color: var(--text-muted);
}
.chemiclean-result {
  font-size: 13px;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid #34d399;
}
.chemiclean-result .highlight-doses {
  color: #34d399;
  font-size: 15px;
  font-weight: 700;
}

/* ============================================================
   SALT CALCULATOR (ROTALA BUTTERFLY) STYLES
   ============================================================ */
.salt-section {
  margin-top: 40px;
}

.salt-calc-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.salt-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.salt-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.salt-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.salt-filter-btn.active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.25);
}

.salt-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.salt-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.salt-form-group.full-width {
  grid-column: 1 / -1;
  margin-top: 8px;
}
.salt-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color);
}
.salt-form-group input,
.salt-form-group select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  transition: var(--transition);
}
.salt-form-group input:focus,
.salt-form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
.salt-form-group select option {
  background: #111827;
  color: #fff;
}
.salt-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}
.salt-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.salt-input-row input {
  flex: 1;
}
.salt-unit {
  font-size: 13px;
  font-weight: 600;
  color: #34d399;
  white-space: nowrap;
}

.btn-calculate-salt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-calculate-salt:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.salt-results-box {
  margin-top: 28px;
  padding: 22px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
}
.salt-res-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}
.salt-res-header h3 {
  font-size: 18px;
  color: #fff;
  margin: 0;
}
.salt-res-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.salt-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.salt-metric-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.salt-metric-card.primary {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}
.salt-metric-card .metric-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}
.salt-metric-card .metric-val {
  font-size: 26px;
  font-weight: 800;
  color: #34d399;
  line-height: 1.2;
}
.salt-metric-card .metric-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  display: block;
}

.salt-metric-card .metric-elements {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.elem-pill {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #e2e8f0;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.elem-pill strong {
  color: #34d399;
}

.salt-explanation {
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid #34d399;
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px;
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 20px;
}

.salt-warning-box {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.salt-warning-item {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-left: 4px solid #ef4444;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 13px;
  line-height: 1.5;
}
.salt-warning-item strong {
  color: #f87171;
}

.salt-links-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}
.btn-rotala-link, .btn-growise-alt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}
.btn-rotala-link {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid var(--border-color);
}
.btn-rotala-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.btn-growise-alt {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.btn-growise-alt:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

/* ==========================================================================
   PWA Installation Buttons & Modal
   ========================================================================== */

.btn-install-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 95, 70, 0.3));
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-install-header:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(6, 95, 70, 0.5));
  border-color: #34d399;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.hero-install-box {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}
.btn-install-hero {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 16px rgba(16, 185, 129, 0.15);
  text-align: left;
  font-family: inherit;
  color: #fff;
}
.btn-install-hero:hover {
  border-color: #10b981;
  transform: translateY(-2px);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 24px rgba(16, 185, 129, 0.3);
}
.hero-install-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  object-fit: cover;
  background: #fff;
}
.hero-install-texts {
  display: flex;
  flex-direction: column;
}
.hero-install-title {
  font-size: 15px;
  font-weight: 800;
  color: #34d399;
  letter-spacing: -0.2px;
}
.hero-install-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Founder Knowledge Card under Hero Install Box */
.founder-card {
  margin-top: 20px;
  max-width: 780px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-align: left;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  padding: 16px 20px;
  border-radius: var(--radius);
}
.founder-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.founder-card-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  padding: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
}
.founder-card-content {
  flex: 1;
  min-width: 0;
}
.founder-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #34d399;
  margin: 0 0 4px 0;
  letter-spacing: -0.2px;
}
.founder-card-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
}

@media (max-width: 640px) {
  .founder-card {
    padding: 14px;
  }
  .founder-card-inner {
    gap: 10px;
  }
  .founder-card-icon {
    font-size: 20px;
    padding: 6px;
  }
  .founder-card-title {
    font-size: 14px;
  }
  .founder-card-text {
    font-size: 12.5px;
  }
}

/* Floating PWA bar at bottom */
.pwa-floating-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: calc(100% - 32px);
  max-width: 460px;
  animation: slideUpFade 0.4s ease-out;
}
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.pwa-floating-inner {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.2);
}
.pwa-floating-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
}
.pwa-floating-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pwa-floating-info strong {
  font-size: 14px;
  color: #fff;
  font-weight: 700;
}
.pwa-floating-info span {
  font-size: 11px;
  color: var(--text-muted);
}
.btn-install-floating {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  font-family: inherit;
}
.btn-install-floating:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  transform: translateY(-1px);
}
.btn-pwa-dismiss {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.btn-pwa-dismiss:hover {
  color: #fff;
}

/* Modal for iOS / Browser install guides */
.pwa-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pwa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}
.pwa-modal-card {
  position: relative;
  z-index: 1;
  background: #0f172a;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(16, 185, 129, 0.2);
  animation: modalScale 0.3s ease-out;
}
@keyframes modalScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.pwa-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}
.pwa-modal-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
}
.pwa-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}
.pwa-modal-subtitle {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.pwa-modal-btn-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.pwa-modal-btn-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.pwa-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}
.pwa-step-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.pwa-step-desc {
  font-size: 13px;
  line-height: 1.45;
  color: #cbd5e1;
}
.pwa-step-desc strong {
  color: #fff;
}
.pwa-step-desc em {
  color: #34d399;
  font-style: normal;
  font-weight: 600;
}

/* ==========================================================================
   Google Auth & User Profile & Saved Tanks
   ========================================================================== */

.user-auth-area {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.btn-google-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #1f2937;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-google-login:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px 4px 6px;
  border-radius: 9999px;
  cursor: pointer;
  position: relative;
}
.user-profile-badge:hover {
  background: rgba(255, 255, 255, 0.13);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary);
  background: #1e293b;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-user-menu-toggle {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  animation: fadeInDown 0.15s ease-out;
}

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

.user-dropdown-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-dropdown-header strong {
  font-size: 13px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-dropdown-header span {
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-promo-banner {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-promo-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #34d399;
  font-weight: 700;
}
.user-promo-code {
  font-family: monospace;
  font-size: 13px;
  font-weight: 800;
  color: #a7f3d0;
}

.user-menu-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.user-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.user-menu-logout {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}
.user-menu-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

/* Calculator User Actions Toolbar */
.calc-save-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
}

.save-actions-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-save-tank, .btn-view-tanks {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.btn-save-tank {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.35));
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
}
.btn-save-tank:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), rgba(5, 150, 105, 0.55));
  color: #fff;
  transform: translateY(-1px);
}

.btn-view-tanks {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}
.btn-view-tanks:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.voucher-tag {
  background: rgba(245, 158, 11, 0.15);
  border: 1px dashed rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}
.voucher-tag strong {
  color: #fef08a;
  letter-spacing: 0.05em;
}

/* Saved Tanks List in Modal */
.saved-tanks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.tank-card-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  transition: var(--transition);
}
.tank-card-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(16, 185, 129, 0.4);
}

.tank-info-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tank-info-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.tank-info-meta {
  font-size: 12px;
  color: #94a3b8;
}

.tank-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-load-tank {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-load-tank:hover {
  background: rgba(16, 185, 129, 0.4);
  color: #fff;
}
.btn-delete-tank {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-delete-tank:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

.tanks-empty-state {
  text-align: center;
  padding: 24px 12px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
}

/* Szybkie dodawanie do koszyka – Banner & Przyciski CTA */
.cart-order-banner {
  margin: 18px 0;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 78, 59, 0.25));
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.cart-banner-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cart-banner-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 320px;
}

.cart-banner-icon {
  font-size: 32px;
  line-height: 1;
}

.cart-banner-info h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
  color: #34d399;
}

.cart-banner-info p {
  margin: 0;
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.4;
}

.cart-banner-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cart-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.cart-price-block .old-price {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 12px;
}

.cart-price-block .promo-price {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.cart-price-block .discount-pill {
  font-size: 11px;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
}

.btn-cart-direct {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

.btn-cart-direct:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.6);
  filter: brightness(1.1);
  color: #ffffff !important;
}

.card-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-cart-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399 !important;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none !important;
  transition: all 0.2s;
}

.btn-cart-mini:hover {
  background: #10b981;
  color: #ffffff !important;
  border-color: #10b981;
}

/* Chat Cart CTA Button */
.chat-cart-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none !important;
  margin: 8px 0 4px 0;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.chat-cart-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.55);
  filter: brightness(1.1);
  color: #ffffff !important;
}




/* ==========================================================================
   LANGUAGE SPLASH SCREEN & I18N STYLES (OPCJA 2: TWARDY EKRAN STARTOWY)
   ========================================================================== */
.splash-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: radial-gradient(circle at 50% 30%, #0d1b1e 0%, #06090d 80%, #030507 100%);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(10px, 2.5vh, 24px) clamp(10px, 3vw, 20px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

.splash-screen.splash-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-container {
  position: relative;
  max-width: 860px;
  width: 100%;
  margin: auto;
  background: rgba(13, 20, 28, 0.94);
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(16, 185, 129, 0.15);
  border-radius: 24px;
  padding: 32px 28px;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: splashPop 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes splashPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.splash-logo-wrap {
  margin-bottom: 20px;
}

.splash-logo-container {
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 20px rgba(255, 255, 255, 0.3);
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.splash-logo-container:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.35), 0 0 25px rgba(255, 255, 255, 0.4);
}

.splash-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

.splash-brand-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2.2px;
  color: #ffffff;
  margin: 0 0 4px 0;
  text-transform: uppercase;
}

.splash-brand-sub {
  font-size: 13px;
  color: #10b981;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0;
}

.splash-selection-box {
  margin-top: 16px;
}

.splash-title {
  font-size: 19px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 6px 0;
}

.splash-desc {
  font-size: 12.5px;
  color: #94a3b8;
  margin: 0 auto 20px auto;
  max-width: 580px;
  line-height: 1.45;
}

.splash-lang-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.splash-lang-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  color: #ffffff;
  text-decoration: none;
  min-height: 0;
  box-sizing: border-box;
}

.splash-lang-card:hover, .splash-lang-card:focus-visible {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.25);
  outline: none;
}

.splash-flag {
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.splash-lang-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.splash-lang-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.splash-lang-code {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.splash-footer-note {
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 14px;
}

/* ==========================================================================
   MOBILE RESPONSIVE RULES FOR SPLASH SCREEN (AUTODOPASOWANIE DO TELEFONÓW)
   ========================================================================== */
@media (max-width: 680px) {
  .splash-screen {
    padding: 10px 8px;
  }
  .splash-container {
    padding: 16px 12px;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.85);
  }
  .splash-logo-wrap {
    margin-bottom: 10px;
  }
  .splash-logo-container {
    padding: 6px 14px;
    border-radius: 12px;
    margin-bottom: 6px;
  }
  .splash-logo {
    height: 32px;
  }
  .splash-brand-title {
    font-size: 18px;
    letter-spacing: 1.5px;
    margin-bottom: 2px;
  }
  .splash-brand-sub {
    font-size: 11px;
  }
  .splash-selection-box {
    margin-top: 8px;
  }
  .splash-title {
    font-size: 14.5px;
    margin-bottom: 3px;
  }
  .splash-desc {
    font-size: 11px;
    margin-bottom: 10px;
    line-height: 1.35;
  }
  .splash-lang-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
  }
  .splash-lang-card {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 7px 10px;
    gap: 10px;
    border-radius: 10px;
    text-align: left;
  }
  .splash-flag {
    font-size: 24px;
  }
  .splash-lang-info {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .splash-lang-name {
    font-size: 12.5px;
  }
  .splash-desc br {
    display: none;
  }
  .splash-lang-code {
    font-size: 9.5px;
  }
  .splash-footer-note {
    font-size: 10px;
    padding-top: 10px;
    line-height: 1.3;
  }
}

/* Bardzo małe ekrany oraz orientacja horyzontalna (landscape) na smartfonach */
@media (max-height: 640px) and (orientation: landscape), (max-width: 360px) {
  .splash-container {
    padding: 12px 10px;
  }
  .splash-logo-wrap {
    margin-bottom: 6px;
  }
  .splash-logo-container {
    padding: 4px 10px;
    margin-bottom: 4px;
  }
  .splash-logo {
    height: 26px;
  }
  .splash-brand-title {
    font-size: 16px;
  }
  .splash-brand-sub {
    display: none;
  }
  .splash-desc {
    display: none;
  }
  .splash-title {
    font-size: 13px;
    margin-bottom: 6px;
  }
  .splash-lang-grid {
    gap: 6px;
    margin-bottom: 8px;
  }
  .splash-lang-card {
    padding: 5px 8px;
    gap: 6px;
  }
  .splash-flag {
    font-size: 20px;
  }
  .splash-lang-name {
    font-size: 11.5px;
  }
  .splash-lang-code {
    display: none;
  }
  .splash-footer-note {
    padding-top: 6px;
    font-size: 9.5px;
  }
}

/* ==========================================================================
   NAVBAR LANGUAGE SELECTOR
   ========================================================================== */
.nav-lang-picker {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.btn-lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 9px;
  color: #f1f5f9;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-lang-toggle:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}

.lang-chevron {
  font-size: 10px;
  color: #94a3b8;
  transition: transform 0.2s;
}

.nav-lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  background: #0f172a;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 6px 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.lang-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 8px 14px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}

.lang-opt:hover, .lang-opt:focus-visible {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  outline: none;
}

.opt-flag {
  font-size: 16px;
  line-height: 1;
}

/* ==========================================================================
   MOBILE & VIEWPORT RESPONSIVE OPTIMIZATIONS (2026-10-24)
   ========================================================================== */

/* CTA Buttons in Hero */
.hero-cta-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 480px;
  margin: 16px auto 20px;
}
.btn-hero-cta {
  flex: 1 1 0;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14.5px;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.btn-hero-chat {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #062419;
  border: none;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-hero-chat:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.btn-hero-calc {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  border: 1px solid var(--border-color);
}
.btn-hero-calc:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary);
}

/* Founder Card Expand Button */
.founder-card-header-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.founder-more-btn {
  background: transparent;
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 32px;
  transition: all 0.2s ease;
}
.founder-more-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}

/* Chat Send Button icons */
.btn-send-text {
  display: inline;
}
.btn-send-icon {
  display: none;
}

/* Diagnostic Accordion & Ask Advisor */
.diag-card.diag-accordion .diag-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.diag-card-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.diag-chevron {
  font-size: 16px;
  color: var(--primary);
  transition: transform 0.2s ease;
  padding-left: 8px;
  flex-shrink: 0;
}
.btn-diag-ask-advisor {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  min-height: 40px;
}
.btn-diag-ask-advisor:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #fff;
}

/* Desktop Defaults (>= 769px) */
@media (min-width: 769px) {
  .founder-more-btn {
    display: none !important;
  }
  .founder-card-text {
    display: block !important;
  }
  .diag-card.diag-accordion .diag-card-body {
    display: block !important;
  }
  .diag-chevron {
    display: none !important;
  }
}

/* Mobile & Tablet Styles (< 768px) */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* 1. Header & Navigation */
  .glow-bg {
    display: none !important;
  }
  .nav-btn-highlight,
  #btn-install-header,
  #nav-lang-picker,
  .store-link,
  #user-auth-area,
  .brand-tagline {
    display: none !important;
  }
  .navbar {
    padding: 8px 0 !important;
  }
  .nav-content {
    justify-content: space-between !important;
    width: 100% !important;
  }
  .brand-name {
    font-size: 18px !important;
    letter-spacing: 0.8px !important;
  }
  .brand-logo-img {
    height: 32px !important;
  }
  .brand-logo-container {
    padding: 3px 6px !important;
    border-radius: 8px !important;
  }
  .btn-nav-menu {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 22px !important;
    display: inline-flex !important;
  }
  .nav-menu-dropdown {
    position: fixed !important;
    top: 58px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    box-sizing: border-box !important;
    max-height: calc(100vh - 75px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: #0d1511 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    border-radius: 14px !important;
    padding: 10px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95) !important;
    z-index: 2000 !important;
  }
  .nav-menu-item {
    padding: 10px 14px !important;
    font-size: 14.5px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 8px !important;
    color: #f1f5f9 !important;
  }
  .nav-menu-item:hover, .nav-menu-item:active {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
  }
  .nav-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 0;
  }
  .nav-menu-item-highlight {
    background: rgba(16, 185, 129, 0.12) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #34d399 !important;
    font-weight: 600 !important;
  }
  .nav-menu-btn-install {
    background: transparent;
    border: 1px dashed rgba(56, 189, 248, 0.4);
    color: #38bdf8 !important;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: inherit;
  }
  .nav-menu-lang-header {
    font-size: 11px;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 6px 4px 4px;
    letter-spacing: 0.5px;
    font-weight: 700;
  }
  .nav-menu-lang-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 4px 0;
  }
  .menu-lang-opt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    min-height: 38px;
    transition: all 0.15s ease;
  }
  .menu-lang-opt:hover, .menu-lang-opt:active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
  }

  /* 2. Layout, Cards & Spacing */
  .container {
    padding: 0 12px !important;
  }
  .card {
    padding: 14px 12px !important;
    border-radius: 14px !important;
    margin-bottom: 12px !important;
  }
  .hero {
    padding: 16px 0 12px !important;
  }
  .hero-logo-wrapper {
    display: none !important;
  }
  .hero-founder-badge {
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: clamp(9.5px, 2.9vw, 11.5px) !important;
    padding: 4px 8px !important;
    letter-spacing: 0.3px !important;
    margin-bottom: 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .hero h1 {
    font-size: clamp(21px, 6vw, 26px) !important;
    line-height: 1.25 !important;
    margin-bottom: 8px !important;
  }
  .hero-desc {
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    margin-bottom: 12px !important;
  }
  .hero-cta-group {
    gap: 8px !important;
    margin: 8px auto 12px !important;
  }
  .btn-hero-cta {
    min-height: 42px !important;
    padding: 8px 10px !important;
    font-size: 13px !important;
  }
  .founder-card {
    padding: 10px 12px !important;
    margin-top: 8px !important;
  }
  .founder-card-inner {
    gap: 8px !important;
  }
  .founder-card-icon {
    font-size: 20px !important;
  }
  .founder-card-title {
    font-size: 13px !important;
    margin-bottom: 0 !important;
  }
  .founder-card-text {
    display: none;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
  }
  .founder-card-text.expanded {
    display: block !important;
  }

  /* 3. Section Order on Mobile */
  .main-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    padding-bottom: 24px !important;
  }
  .card-chat {
    order: 1 !important;
  }
  .card-calculator {
    order: 2 !important;
  }

  /* 4. Chat on Mobile */
  .card-chat {
    height: auto !important;
    max-height: none !important;
  }
  .card-chat .card-header {
    gap: 8px !important;
    margin-bottom: 12px !important;
  }
  .card-chat .chat-icon {
    display: none !important;
  }
  .card-chat h2 {
    font-size: 16px !important;
    line-height: 1.25 !important;
  }
  .card-chat .subtitle {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }
  .chat-messages {
    max-height: 65vh !important;
    min-height: 180px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 6px 4px !important;
    margin-bottom: 8px !important;
  }
  .msg {
    max-width: 100% !important;
    width: 100% !important;
    margin-bottom: 8px !important;
  }
  .msg-bubble {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
    font-size: 13.5px !important;
    line-height: 1.45 !important;
  }
  .chat-messages .msg-agent:first-child ul {
    display: none !important;
  }
  .chat-suggestions {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 6px !important;
    padding: 2px 2px 8px 2px !important;
    margin-bottom: 8px !important;
    scrollbar-width: none !important;
  }
  .chat-suggestions::-webkit-scrollbar {
    display: none !important;
  }
  .btn-suggestion {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    min-height: 38px !important;
  }
  .chat-input-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .btn-attach-photo, .btn-mic {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    font-size: 18px !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #chat-input {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    font-size: 16px !important; /* Blokuje iOS auto-zoom */
    padding: 9px 12px !important;
    height: 40px !important;
    box-sizing: border-box !important;
  }
  .btn-send {
    width: 44px !important;
    height: 40px !important;
    min-width: 44px !important;
    min-height: 40px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  .btn-send-text {
    display: none !important;
  }
  .btn-send-icon {
    display: inline !important;
    font-size: 18px !important;
    line-height: 1 !important;
  }
  .chat-disclaimer {
    font-size: 10px !important;
    line-height: 1.35 !important;
    color: #64748b !important;
    text-align: center !important;
    margin-top: 6px !important;
  }

  /* 5. Calculator on Mobile */
  select {
    font-size: 13.5px !important;
    padding: 9px 10px !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
    max-width: 100% !important;
  }
  .help-text {
    font-size: 10.5px !important;
    line-height: 1.35 !important;
    color: #94a3b8 !important;
    margin-top: 3px !important;
  }

  /* 6. Diagnostics Accordion & Tabs on Mobile */
  .diagnostic-section {
    padding: 24px 12px 32px !important;
  }
  .diag-tabs {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 3px !important;
    gap: 4px !important;
    margin-top: 12px !important;
    border-radius: 10px !important;
  }
  .diag-tab {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 8px 4px !important;
    font-size: 11.5px !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    border-radius: 6px !important;
  }
  .diag-search-wrap {
    margin-top: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .diag-search-wrap input {
    font-size: 13px !important;
    padding: 9px 14px !important;
  }
  .diag-card.diag-accordion .diag-card-top {
    padding: 4px 0 !important;
  }
  .diag-card.diag-accordion .diag-card-body {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .diag-card.diag-accordion.is-open .diag-card-body {
    display: block;
  }
  .diag-card.diag-accordion.is-open .diag-chevron {
    transform: rotate(180deg);
  }
  .diag-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .diag-actions a, .diag-actions button {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: 42px !important;
    box-sizing: border-box !important;
  }

  /* 7. Floating PWA bar adjustment */
  .pwa-floating-bar {
    width: calc(100% - 20px) !important;
    left: 10px !important;
    right: 10px !important;
    transform: none !important;
    bottom: 12px !important;
  }
}



/* Tabele raportu laboratoryjnego w czacie */
.chat-messages table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.85rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
  display: block;
  overflow-x: auto;
}
.chat-messages th {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-weight: 700;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.3);
  white-space: nowrap;
}
.chat-messages td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: top;
}
.chat-messages tr:last-child td {
  border-bottom: none;
}


/* ScapeWise Links & Hero CTA */
.nav-link-scapewise {
  color: #34d399 !important;
  font-weight: 700 !important;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12.5px !important;
}
.nav-link-scapewise:hover {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7 !important;
}
.nav-menu-item-scapewise {
  color: #34d399 !important;
  font-weight: 700 !important;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.hero-cta-group {
  flex-wrap: wrap !important;
  max-width: 640px !important;
}
.btn-hero-scape {
  flex: 1 1 100% !important;
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}
.btn-hero-scape:hover {
  background: rgba(16, 185, 129, 0.24);
  color: #a7f3d0;
  transform: translateY(-1px);
}

/* Compact desktop navbar spacing so "Zaprojektuj swoją aranżację" fits cleanly */
@media (min-width: 1200px) and (max-width: 1480px) {
  .nav-links {
    gap: 6px !important;
  }
  .nav-desktop-links {
    gap: 7px !important;
  }
  .nav-link {
    font-size: 12px !important;
  }
  .nav-link-scapewise {
    padding: 4px 8px !important;
    font-size: 11.5px !important;
  }
  .nav-btn-highlight,
  .btn-install-header {
    padding: 5px 9px !important;
    font-size: 11.5px !important;
  }
  .brand-tagline {
    font-size: 9px !important;
    letter-spacing: 0.3px !important;
  }
}
