/* Yönetim paneli — göze hitap eden düzen */
.dashboard-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45, 143, 95, 0.22), transparent),
    linear-gradient(180deg, #061018 0%, #0a1f18 40%, #050c10 100%);
  color: #e8f4ef;
  font-family: "DM Sans", system-ui, sans-serif;
}

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(6, 16, 24, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(78, 207, 143, 0.15);
  position: sticky;
  top: 0;
  z-index: 50;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dash-brand .mark {
  min-width: 48px;
  height: 42px;
  padding: 0 0.35rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #2d8f5f, #1a5c40);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #fff;
  box-shadow: 0 8px 24px rgba(45, 143, 95, 0.35);
}

.dash-brand h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.dash-brand p {
  margin: 0;
  font-size: 0.78rem;
  color: #8fb3a8;
}

.dash-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-dash {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-dash--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #c5e0d8;
  border: 1px solid rgba(139, 179, 168, 0.25);
}

.btn-dash--ghost:hover {
  background: rgba(78, 207, 143, 0.12);
}

.btn-dash--danger {
  background: linear-gradient(135deg, #c44, #922);
  color: #fff;
}

/* Panelde özel imleçteki filiz ikonu butonların yanında UI gibi görünmesin */
body:has(.spa-view[data-view="dashboard"].spa-view--active) .motion-cursor-ring::after {
  display: none;
}

.dash-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
}

.welcome-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(45, 143, 95, 0.18), rgba(10, 40, 32, 0.6));
  border: 1px solid rgba(78, 207, 143, 0.22);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

@media (max-width: 768px) {
  .welcome-hero {
    grid-template-columns: 1fr;
    padding: 0.9rem 0.85rem;
    margin-bottom: 0.75rem;
    border-radius: 14px;
    gap: 0.65rem;
  }

  .dash-wrap {
    padding: 0.65rem 0.7rem 1rem;
  }

  .welcome-hero h2 {
    font-size: clamp(1.05rem, 4.2vw, 1.35rem);
    margin-bottom: 0.2rem;
  }

  .welcome-hero .tagline {
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .metrics-grid {
    gap: 0.55rem;
    margin-bottom: 0.85rem;
  }

  .metric-card {
    padding: 0.8rem 0.85rem;
    border-radius: 12px;
  }

  .metric-card::before {
    width: 72px;
    height: 72px;
  }

  .metric-card .label {
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
  }

  .metric-card .value {
    font-size: 1.45rem;
    min-height: 1.75rem;
  }

  .metric-card .sub {
    font-size: 0.76rem;
    padding-top: 0.2rem;
  }

  .two-col {
    gap: 0.65rem;
    margin-bottom: 0.85rem;
  }

  .panel {
    padding: 0.9rem 0.85rem;
    border-radius: 12px;
  }

  .panel h3 {
    margin-bottom: 0.65rem;
    font-size: 0.95rem;
  }

  .dash-topbar {
    padding: 0.5rem 0.7rem !important;
    gap: 0.5rem;
  }

  .dash-brand .mark {
    min-width: 40px;
    height: 36px;
    font-size: 0.72rem;
  }

  .dash-brand h1 {
    font-size: 0.95rem;
  }

  .toast-container {
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.75rem;
    max-width: none;
  }

  .dash-hero {
    margin-bottom: 0.3rem;
  }

  .dash-hero h1 {
    margin: 0 0 0.15rem;
    font-size: clamp(1rem, 4.5vw, 1.22rem);
    font-weight: 700;
    line-height: 1.25;
  }

  .dash-hero p {
    margin: 0;
    font-size: 0.78rem;
    color: #9ec4b8;
    line-height: 1.4;
  }

  .section-label {
    margin: 0.35rem 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #8fb3a8;
  }

  .plant-select {
    width: 100%;
    padding: 0.42rem 0.55rem;
    margin-bottom: 0.45rem;
    border-radius: 10px;
    border: 1px solid rgba(139, 179, 168, 0.32);
    background: rgba(6, 16, 24, 0.82);
    color: #e8f4ef;
    font-size: 0.84rem;
  }

  .seed-market-panel .seed-panel-head h3,
  .seed-market-panel .sub {
    font-size: 0.88rem;
    line-height: 1.4;
  }

  .upload-zone {
    padding: 0.85rem 0.75rem;
  }

  .ai-upload-toolbar {
    gap: 0.45rem;
  }

  .btn-ai-chip {
    min-height: 42px;
    padding: 0.45rem 0.65rem;
  }

  .btn-ai-run {
    min-height: 44px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .dash-wrap {
    padding: 0.85rem 1rem 1.15rem;
    max-width: 920px;
  }

  .welcome-hero {
    padding: 1.1rem 1rem;
    margin-bottom: 1rem;
    border-radius: 16px;
  }

  .metrics-grid {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .metric-card {
    padding: 1rem 1.05rem;
  }

  .metric-card .value {
    font-size: 1.6rem;
  }

  .panel {
    padding: 1.05rem 1rem;
  }

  .two-col {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .dash-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
  }

  .dash-actions .btn-dash,
  .dash-actions a.btn-dash {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 2.2rem;
    font-size: 0.82rem;
    padding: 0.42rem 0.8rem;
  }

  .dash-hero h1 {
    font-size: 1.28rem;
    line-height: 1.25;
  }

  .dash-hero p {
    font-size: 0.84rem;
  }

  .section-label {
    font-size: 0.78rem;
  }

  .plant-select {
    max-width: 360px;
    font-size: 0.86rem;
  }
}

.welcome-hero h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
}

.welcome-hero .tagline {
  margin: 0;
  color: #9ec4b8;
  font-size: 0.95rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.status-pill.on {
  background: rgba(105, 240, 174, 0.15);
  color: #69f0ae;
  border: 1px solid rgba(105, 240, 174, 0.35);
}

.status-pill.off {
  background: rgba(255, 138, 101, 0.12);
  color: #ffab91;
  border: 1px solid rgba(255, 138, 101, 0.3);
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}

.status-pill.off .dot {
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.25rem;
  align-items: stretch;
}

@media (max-width: 1280px) {
  .metrics-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .metrics-grid > .metric-card:nth-child(1),
  .metrics-grid > .metric-card:nth-child(2),
  .metrics-grid > .metric-card:nth-child(3) {
    grid-column: span 2;
  }

  .metrics-grid > .metric-card:nth-child(4),
  .metrics-grid > .metric-card:nth-child(5) {
    grid-column: span 3;
  }
}

@media (max-width: 720px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-grid > .metric-card {
    grid-column: span 1 !important;
  }

  .metrics-grid > .metric-card:nth-child(5) {
    grid-column: span 2 !important;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid > .metric-card:nth-child(5) {
    grid-column: span 1 !important;
  }
}

.metric-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  background: rgba(12, 28, 24, 0.65);
  border: 1px solid rgba(45, 143, 95, 0.2);
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(78, 207, 143, 0.12), transparent 70%);
  pointer-events: none;
}

.metric-card .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8fb3a8;
  margin-bottom: 0.5rem;
}

.metric-card .value {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  min-height: 2.25rem;
}

.metric-card .sub {
  font-size: 0.82rem;
  color: #7a9e92;
  margin-top: auto;
  padding-top: 0.35rem;
}

.metric-card--crit {
  border-color: rgba(232, 93, 93, 0.55) !important;
  box-shadow: 0 0 0 1px rgba(232, 93, 93, 0.25);
}

.ring-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.donut {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(var(--c, #2d8f5f) calc(var(--p, 0) * 1%), #1a3328 0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.donut-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #0c1c18;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.panel {
  padding: 1.35rem;
  border-radius: 16px;
  background: rgba(8, 22, 30, 0.75);
  border: 1px solid rgba(45, 143, 95, 0.18);
}

.panel h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel h3 .icon {
  font-size: 1.2rem;
}

.sensor-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sensor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.sensor-row .bar {
  flex: 1;
  max-width: 140px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sensor-row .bar span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #1e6b4a, #4ecf8f);
}

.fuel-box {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(212, 168, 83, 0.08);
  border: 1px solid rgba(212, 168, 83, 0.25);
  margin-top: 0.75rem;
}

.fuel-box.warn {
  background: rgba(232, 93, 93, 0.1);
  border-color: rgba(232, 93, 93, 0.35);
}

.fuel-box h4 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: #d4a853;
}

.timer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.75rem;
}

.timer-controls input[type="number"] {
  width: 88px;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(139, 179, 168, 0.35);
  background: rgba(6, 16, 24, 0.8);
  color: #e8f4ef;
}

.timer-display {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  color: #69f0ae;
}

.btn-dash--primary {
  background: linear-gradient(135deg, #2d8f5f, #1e6b4a);
  color: #fff;
  box-shadow: 0 4px 20px rgba(45, 143, 95, 0.3);
}

.btn-dash--primary:hover {
  transform: translateY(-1px);
}

.btn-dash--accent {
  background: rgba(78, 207, 143, 0.2);
  color: #a8e6c9;
  border: 1px solid rgba(78, 207, 143, 0.4);
}

.upload-zone {
  border: 2px dashed rgba(78, 207, 143, 0.35);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover {
  border-color: rgba(78, 207, 143, 0.55);
  background: rgba(78, 207, 143, 0.06);
}

.upload-zone input {
  display: none;
}

.ai-result-heading {
  margin: 1rem 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #9ae6b4;
  letter-spacing: 0.02em;
}

.ai-result-heading.hidden {
  display: none;
}

.ai-result-block {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(78, 207, 143, 0.18);
}

.ai-result {
  margin-top: 0.35rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(18, 42, 38, 0.8);
  border: 1px solid rgba(45, 143, 95, 0.25);
  display: none;
}

.ai-result.visible {
  display: block;
}

.ai-result h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.ai-result ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  color: #b8d4c8;
  font-size: 0.9rem;
}

.toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(18, 38, 48, 0.95);
  border: 1px solid rgba(78, 207, 143, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  font-size: 0.88rem;
  animation: slideIn 0.35s ease;
}

.toast.warn {
  border-color: rgba(212, 168, 83, 0.5);
}

.toast.danger {
  border-color: rgba(232, 93, 93, 0.5);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.range-inline {
  width: 100%;
  margin-top: 0.5rem;
}

.welcome-hero--tobacco {
  background:
    linear-gradient(135deg, rgba(20, 50, 36, 0.92), rgba(8, 22, 30, 0.88)),
    url("../assets/img/features/live-panel.jpg") right center / cover no-repeat;
}

.sensor-row--manage {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(72px, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
}

.sensor-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.sensor-row-meta {
  color: #8fb3a8;
  font-size: 0.78rem;
  line-height: 1.2;
}

.sensor-name-input {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(139, 179, 168, 0.35);
  background: rgba(6, 16, 24, 0.75);
  color: #e8f4ef;
  font-size: 0.88rem;
}

.sensor-row--manage .bar {
  max-width: none;
}

.btn-sensor-del {
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(232, 93, 93, 0.45);
  background: rgba(232, 93, 93, 0.12);
  color: #ffab91;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-sensor-del:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-sensor-add {
  margin-top: 0.75rem;
  width: 100%;
  justify-content: center;
}

.ai-panel-auth-hint {
  margin: 0.5rem 0 0;
  color: #fbbf24;
  font-size: 0.88rem;
}

.panel--tobacco-ai {
  position: relative;
  overflow: hidden;
  border-color: rgba(78, 207, 143, 0.22);
}

.panel--tobacco-ai > .tobacco-ai-head,
.panel--tobacco-ai > .ai-upload-row,
.panel--tobacco-ai > .ai-result-block,
.panel--tobacco-ai > .ai-result {
  position: relative;
  z-index: 1;
}

.ai-upload-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.ai-plant-hint-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ai-plant-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.ai-plant-hint__label {
  font-weight: 600;
  color: #d8efe6;
  font-size: 0.92rem;
}

.ai-plant-hint__select {
  min-width: min(100%, 220px);
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(78, 207, 143, 0.35);
  background: rgba(12, 32, 26, 0.92);
  color: #eef8f3;
  font: inherit;
}

.ai-plant-hint__help {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.88;
}

.ai-diagnosis__meta--cross-plant {
  border-left: 3px solid #e8b44c;
  padding-left: 0.65rem;
}

.ai-upload-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: stretch;
}

.ai-upload-toolbar__cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: stretch;
}

.ai-btn-upload {
  flex: 1 1 auto;
  min-height: 54px;
  margin: 0;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(78, 207, 143, 0.42);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(20, 52, 40, 0.88) 0%, rgba(10, 28, 22, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 4px 18px rgba(0, 0, 0, 0.28);
  color: #e8f4ef;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.ai-btn-upload::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(78, 207, 143, 0.08) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.ai-btn-upload:hover {
  border-color: rgba(110, 231, 168, 0.75);
  background:
    linear-gradient(145deg, rgba(26, 64, 48, 0.92) 0%, rgba(14, 36, 28, 0.96) 100%);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 28px rgba(45, 143, 95, 0.22);
}

.ai-btn-upload:hover::before {
  opacity: 1;
}

.ai-btn-upload__inner {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.ai-btn-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.btn-ai-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.62rem 0.95rem;
  min-height: 54px;
  border-radius: 13px;
  border: 1px solid rgba(78, 207, 143, 0.32);
  background: linear-gradient(180deg, rgba(22, 50, 40, 0.92), rgba(12, 30, 24, 0.98));
  color: #b8f0d0;
  font-weight: 600;
  font-size: 0.84rem;
  line-height: 1.2;
  cursor: pointer;
  box-shadow:
    0 2px 14px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.btn-ai-chip:hover {
  border-color: rgba(110, 231, 168, 0.55);
  background: linear-gradient(180deg, rgba(30, 68, 52, 0.96), rgba(18, 42, 34, 1));
  color: #d4fce8;
  transform: translateY(-1px);
  box-shadow:
    0 6px 20px rgba(45, 143, 95, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-ai-chip:active,
.btn-ai-run:active,
.ai-btn-upload:active {
  transform: translateY(0);
}

.btn-ai-guide--active {
  border-color: rgba(110, 231, 168, 0.7);
  background: linear-gradient(180deg, rgba(36, 88, 64, 0.95), rgba(22, 56, 42, 1));
  color: #d4fce8;
  box-shadow:
    0 0 0 1px rgba(78, 207, 143, 0.25),
    0 4px 18px rgba(45, 143, 95, 0.25);
}

.btn-ai-run {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.65rem 1.35rem;
  min-height: 54px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #45e89a 0%, #2d9b63 48%, #1f7a4f 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 4px 22px rgba(45, 143, 95, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-ai-run::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: skewX(-18deg);
  animation: ai-run-sweep 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ai-run-sweep {
  0%, 72%, 100% { left: -120%; }
  38% { left: 140%; }
}

.btn-ai-run:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 10px 32px rgba(61, 214, 140, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-ai-run__label,
.btn-ai-chip__label {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .ai-upload-toolbar {
    grid-template-columns: 1fr;
  }

  .ai-upload-toolbar__cluster {
    width: 100%;
  }

  .btn-ai-run {
    flex: 1 1 100%;
  }

  .btn-ai-chip {
    flex: 1 1 calc(50% - 0.25rem);
  }
}

@media (max-width: 420px) {
  .btn-ai-history .btn-ai-chip__label {
    font-size: 0.78rem;
  }
}

.ai-photo-guide {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(78, 207, 143, 0.28);
  background: rgba(8, 24, 18, 0.72);
  font-size: 0.84rem;
  line-height: 1.45;
}

.ai-photo-guide.hidden {
  display: none;
}

.ai-photo-guide h4 {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ae6b4;
}

.ai-photo-guide__steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-photo-guide__steps li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  color: #c8e6dc;
}

.ai-photo-guide__steps li:last-child {
  margin-bottom: 0;
}

.ai-photo-guide__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(78, 207, 143, 0.18);
  color: #9ae6b4;
  font-size: 0.72rem;
  font-weight: 700;
}

.ai-photo-tips--compact {
  margin-top: 0.65rem;
  font-size: 0.8rem;
}

@media (max-width: 820px) {
  .ai-upload-toolbar__cluster .btn-ai-chip {
    min-height: 50px;
  }
}

.ai-diagnosis__meds-box {
  margin-top: 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: #fef3c7;
  font-weight: 500;
  line-height: 1.55;
}

.ai-diagnosis__verdict {
  font-size: 1.05rem;
  font-weight: 700;
  color: #9ae6b4;
}

.ai-diagnosis-pair {
  margin: 1rem 0 1.1rem;
  display: grid;
  gap: 0.65rem;
}

.ai-diagnosis-pair__item {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(78, 207, 143, 0.22);
  background: rgba(12, 28, 24, 0.55);
}

.ai-diagnosis-pair__item--primary {
  border-color: rgba(78, 207, 143, 0.45);
  background: rgba(78, 207, 143, 0.1);
  box-shadow: 0 0 0 1px rgba(78, 207, 143, 0.08) inset;
}

.ai-diagnosis-pair__item--secondary {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.06);
}

.ai-diagnosis-pair__badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ae6b4;
  margin-bottom: 0.35rem;
}

.ai-diagnosis-pair__item--secondary .ai-diagnosis-pair__badge {
  color: #fcd34d;
}

.ai-diagnosis-pair__name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: #e8fff3;
  line-height: 1.35;
}

.ai-diagnosis-pair__pct {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #8fb3a8;
}

.ai-diagnosis-pair__note {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: #8fb3a8;
  line-height: 1.45;
}

.ai-diagnosis-pair__none {
  margin: 0;
  font-size: 0.88rem;
  color: #8fb3a8;
  font-style: italic;
}

/* Yapay zeka teşhis — anlamlı panel animasyonu */
.ai-motion-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ai-motion-layer__grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(78, 207, 143, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 207, 143, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  animation: ai-grid-drift 24s linear infinite;
  opacity: 0.55;
}

.ai-motion-layer__scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  top: 0;
  background: linear-gradient(90deg, transparent, rgba(120, 255, 190, 0.75), transparent);
  box-shadow: 0 0 16px rgba(78, 207, 143, 0.35);
  opacity: 0;
  transform: translateY(0);
}

.ai-motion-layer__pulse {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(78, 207, 143, 0.12);
  animation: ai-idle-pulse 5s ease-in-out infinite;
}

@keyframes ai-grid-drift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(22px, 22px); }
}

@keyframes ai-idle-pulse {
  0%, 100% { transform: scale(1); opacity: 0.35; }
  50% { transform: scale(1.04); opacity: 0.55; }
}

@keyframes ai-scan-sweep {
  0% { top: 0; opacity: 0.2; }
  15% { opacity: 0.9; }
  85% { opacity: 0.9; }
  100% { top: 100%; opacity: 0.2; }
}

@keyframes ai-success-flash {
  0% { box-shadow: inset 0 0 0 rgba(78, 207, 143, 0); }
  40% { box-shadow: inset 0 0 40px rgba(78, 207, 143, 0.12); }
  100% { box-shadow: inset 0 0 0 rgba(78, 207, 143, 0); }
}

.panel--tobacco-ai[data-ai-state="scanning"] {
  border-color: rgba(78, 207, 143, 0.45);
  box-shadow: 0 0 0 1px rgba(78, 207, 143, 0.15), 0 8px 28px rgba(0, 0, 0, 0.2);
}

.panel--tobacco-ai[data-ai-state="scanning"] .ai-motion-layer__scan {
  animation: ai-scan-sweep 2.4s ease-in-out infinite;
  opacity: 1;
}

.panel--tobacco-ai[data-ai-state="scanning"] .ai-motion-layer__pulse {
  animation: ai-scan-ring 1.2s ease-in-out infinite;
  border-color: rgba(78, 207, 143, 0.35);
}

@keyframes ai-scan-ring {
  0%, 100% { transform: scale(0.96); opacity: 0.5; }
  50% { transform: scale(1.02); opacity: 0.85; }
}

.panel--tobacco-ai[data-ai-state="done"] {
  animation: ai-success-flash 0.9s ease-out;
}

.panel--tobacco-ai[data-ai-state="done"] .ai-motion-layer__pulse {
  border-color: rgba(120, 255, 180, 0.5);
}

.ai-result--scanning {
  display: block;
  border-color: rgba(78, 207, 143, 0.35);
}

.ai-scan-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #b8e8d0;
  font-size: 0.92rem;
}

.ai-scan-spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(78, 207, 143, 0.25);
  border-top-color: #4ecf8f;
  border-radius: 50%;
  animation: ai-spin 0.85s linear infinite;
  flex-shrink: 0;
}

@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

.ai-scan-progress {
  margin-top: 0.65rem;
  height: 3px;
  border-radius: 3px;
  background: rgba(78, 207, 143, 0.15);
  overflow: hidden;
}

.ai-scan-progress span {
  display: block;
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, #2d8f5f, #4ecf8f);
  border-radius: 3px;
  animation: ai-progress-slide 2.4s ease-in-out infinite;
}

@keyframes ai-progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

.ai-source-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(100, 180, 255, 0.15);
  color: #9ec8ff;
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: middle;
}

.ai-engine-sources {
  display: grid;
  gap: 0.45rem;
  margin: 0.55rem 0 0.85rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(120, 200, 160, 0.12);
}

.ai-engine-sources__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.ai-engine-sources__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8fb3a8;
  min-width: 9.5rem;
}

.ai-source-badge--visual {
  margin-left: 0;
  background: rgba(78, 207, 143, 0.18);
  color: #7ee8b8;
}

.ai-source-badge--report {
  margin-left: 0;
  background: rgba(180, 140, 255, 0.18);
  color: #c9b0ff;
}

.ai-result--done .ai-confidence {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(78, 207, 143, 0.15);
  color: #4ecf8f;
  font-size: 0.82rem;
  font-weight: 600;
}

.ai-diagnosis__fields {
  margin: 0.85rem 0 0;
  display: grid;
  gap: 0.65rem 1rem;
}

.ai-diagnosis__fields dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #8fb3a8;
  text-transform: uppercase;
}

.ai-diagnosis__fields dd {
  margin: 0.15rem 0 0;
  color: #d4ebe2;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ai-diagnosis__fields dd ul {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
}

.ai-diagnosis__disclaimer {
  margin: 1rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(212, 168, 83, 0.1);
  border: 1px solid rgba(212, 168, 83, 0.28);
  color: #e8d4a8;
  font-size: 0.8rem;
  line-height: 1.45;
}

.ai-diagnosis__meta {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: #6a9588;
}

.ai-diagnosis__meta--warn {
  color: #ffb74d;
}

.ai-diagnosis--warn .ai-diagnosis__warn-title {
  margin: 0;
  color: #ffd54f;
  font-weight: 600;
  line-height: 1.45;
}

.ai-result--no-plant,
.ai-result--error {
  border-color: rgba(212, 168, 83, 0.35);
}

.tobacco-ai-head {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 200px);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .tobacco-ai-head {
    grid-template-columns: 1fr;
  }
}

.tobacco-ai-head__photo {
  min-height: 120px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(6, 16, 12, 0.1) 0%, rgba(6, 16, 12, 0.55) 100%),
    url("../assets/img/features/ai-diagnosis.jpg") center / cover no-repeat;
  border: 1px solid rgba(78, 207, 143, 0.25);
}

.upload-zone--tobacco:not(.ai-btn-upload) {
  background:
    linear-gradient(180deg, rgba(12, 32, 24, 0.5), rgba(8, 22, 30, 0.75)),
    url("../assets/img/features/ai-diagnosis.jpg") center / cover no-repeat;
  border-style: solid;
  color: #e8f4ef;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

.upload-zone--tobacco span {
  position: relative;
  z-index: 1;
}

.ai-photo-tips {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: #8fb3a8;
}

.ai-photo-tips summary {
  cursor: pointer;
  color: #9ae6b4;
  font-weight: 600;
  list-style: none;
}

.ai-photo-tips summary::-webkit-details-marker {
  display: none;
}

.ai-photo-tips__list {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  line-height: 1.45;
}

.ai-photo-tips__list li {
  margin-bottom: 0.25rem;
}

.ai-photo-quality {
  margin-top: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(139, 179, 168, 0.22);
  background: rgba(12, 28, 24, 0.55);
  font-size: 0.85rem;
}

.ai-photo-quality.hidden {
  display: none;
}

.ai-photo-quality--ok {
  border-color: rgba(78, 207, 143, 0.35);
  background: rgba(78, 207, 143, 0.08);
}

.ai-photo-quality--warn {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
}

.ai-photo-quality--bad {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.1);
}

.ai-photo-quality__score {
  font-weight: 600;
  color: #c8e6dc;
}

.ai-photo-quality__issues {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  color: #e8d5a3;
}

.ai-photo-quality__ok {
  margin: 0.35rem 0 0;
  color: #9ae6b4;
}

.ai-photo-quality__checklist {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.25rem 0.75rem;
}

.ai-photo-quality__check {
  font-size: 0.8rem;
  color: #8fb3a8;
}

.ai-photo-quality__check--ok {
  color: #9ae6b4;
}

.ai-photo-quality__check--miss {
  color: #e8c97a;
}

.ai-diagnosis__scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0 0;
}

.ai-score-pill {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  background: rgba(78, 207, 143, 0.12);
  border: 1px solid rgba(78, 207, 143, 0.28);
  color: #9ae6b4;
  font-size: 0.78rem;
  font-weight: 600;
}

.ai-score-pill--conf {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.3);
  color: #93c5fd;
}

.ai-score-pill--label {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.28);
  color: #fcd34d;
  font-weight: 500;
}

.ai-diagnosis__section {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(139, 179, 168, 0.15);
}

.ai-diagnosis__section h5 {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8fb3a8;
}

.ai-diagnosis__section--missing h5 {
  color: #e8c97a;
}

.ai-hypotheses {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-hypothesis {
  margin-bottom: 0.65rem;
}

.ai-hypothesis__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  font-size: 0.9rem;
  color: #d4ebe2;
}

.ai-hypothesis__rank {
  color: #6a9588;
  font-weight: 600;
}

.ai-hypothesis__name {
  flex: 1;
  min-width: 120px;
}

.ai-hypothesis__pct {
  font-weight: 700;
  color: #9ae6b4;
}

.ai-hypothesis__unverified {
  font-size: 0.72rem;
  color: #e8c97a;
}

.ai-hypothesis__bar {
  margin-top: 0.3rem;
  height: 6px;
  border-radius: 4px;
  background: rgba(12, 28, 24, 0.8);
  overflow: hidden;
}

.ai-hypothesis__bar span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #2d8f6a, #4ecf8f);
}

.ai-hypothesis__note {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: #8fb3a8;
}

.ai-diagnosis__not-definitive {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: #8fb3a8;
  font-style: italic;
}

.ai-symptoms,
.ai-missing-views {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-symptom,
.ai-missing-views li {
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
  color: #c8e6dc;
}

.ai-symptom--yes {
  color: #9ae6b4;
}

.ai-symptom--no {
  color: #e8c97a;
}

.ai-symptom--unk {
  color: #8fb3a8;
}

.ai-missing-views li::before {
  content: "• ";
  color: #e8c97a;
}

.sensor-moisture-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  background: rgba(78, 207, 143, 0.08);
  border: 1px solid rgba(78, 207, 143, 0.22);
  transition: opacity 0.2s, box-shadow 0.2s;
}

.sensor-moisture-summary.sensor-block--dim {
  opacity: 0.45;
}

.sensor-moisture-summary.sensor-block--highlight {
  box-shadow: 0 0 0 2px rgba(78, 207, 143, 0.35);
}

.circular-progress--sm {
  width: 64px;
  height: 64px;
  min-width: 64px;
  font-size: 0.85rem;
}

.sensor-moisture-summary__text .label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #8fb3a8;
}

.sensor-moisture-summary__text .val {
  font-size: 1.35rem;
  font-weight: 700;
  color: #e8f4ef;
}

.sensor-row--highlight {
  border: 1px solid rgba(78, 207, 143, 0.35);
  background: rgba(78, 207, 143, 0.06);
}

.sensor-row--dim {
  opacity: 0.4;
}

.metric-card--highlight {
  box-shadow: 0 0 0 2px rgba(78, 207, 143, 0.4);
  border-color: rgba(78, 207, 143, 0.45);
}

.metric-card--dim {
  opacity: 0.42;
}

/* Panel — bildirim zili (ikon buton) */
.btn-dash--icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #e8f4ef;
  border: 1px solid rgba(139, 179, 168, 0.25);
}

.btn-dash--icon:hover {
  background: rgba(78, 207, 143, 0.14);
  transform: translateY(-1px);
}

.dash-notif-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.dash-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f59e0b;
  color: #1a1200;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #061018;
}

.dash-notif-badge.hidden {
  display: none !important;
}

.dash-notif-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: min(60vh, 420px);
  overflow-y: auto;
}

.dash-notif-empty {
  margin: 0;
  color: #8fb3a8;
  font-size: 0.9rem;
}

.dash-notif-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(78, 207, 143, 0.14);
  background: rgba(8, 22, 18, 0.55);
  color: #e8f4ef;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.dash-notif-item:hover {
  background: rgba(78, 207, 143, 0.1);
  border-color: rgba(78, 207, 143, 0.28);
}

.dash-notif-item--unread {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.dash-notif-item__title {
  font-weight: 600;
  font-size: 0.9rem;
}

.dash-notif-item__body {
  font-size: 0.82rem;
  color: #9fd4b8;
  line-height: 1.35;
}

.dash-notif-item__time {
  font-size: 0.72rem;
  color: #6d9488;
}

.dash-hero-user {
  margin: 0.15rem 0 0.3rem;
  font-size: clamp(1rem, 2.8vw, 1.22rem);
  font-weight: 600;
  color: #b8e6d0;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.dash-hero-user.hidden {
  display: none !important;
}

.dash-hero-desc {
  margin: 0;
}
