: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, sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

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;
}

/* 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;
}
.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: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* 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: 16px 0;
}
.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.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;
}
.brand-logo-img {
  height: 42px;
  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: 22px;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #34d399, #10b981, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-tagline {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.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: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.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);
}

/* Hero */
.hero {
  padding: 44px 0 28px;
  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-bottom: 22px;
  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-bottom: 16px;
}
.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: 1.25fr 0.95fr;
  gap: 28px;
  padding-bottom: 72px;
}
@media (max-width: 992px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* Card Style */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}
.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;
}
.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: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}
.help-text {
  font-size: 11px;
  color: var(--text-dim);
}
input, select {
  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: inherit;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
select option {
  background-color: #121c17;
  color: #fff;
}
.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;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  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);
}
.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;
}
.chat-input-row input {
  flex: 1;
}
.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;
}
.btn-send:hover {
  background: var(--accent);
}
.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);
}
.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;
}
