/* ═══════════════════════════════════════════════════════════
   ASIA Electric Company — Situații de Stare
   Design System & Component Styles
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

:root {
  --red: #E2001A;
  --red-light: #FF1A3D;
  --red-soft: #FFF0F2;
  --yellow: #FFFF00;
  --black: #000000;
  --text: #222;
  --muted: #999;
  --border: #ECECEC;
  --bg: #F7F7FA;
  --white: #FFFFFF;
  --green: #22C55E;
  --green-soft: #F0FDF4;
  --amber: #F59E0B;
  --amber-soft: #FFFBEB;
  --red-status: #EF4444;
  --red-status-soft: #FEF2F2;
  --grey: #9CA3AF;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 0 0 80px;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════
   HEADER — RED with animated tech geometry
═══════════════════════════════════════════════ */
.hero {
  position: relative;
  background: linear-gradient(135deg, #C8102E 0%, #E2001A 40%, #FF1A3D 100%);
  padding: 45px 20px 65px;
  text-align: center;
  overflow: hidden;
  z-index: 10;
}

/* ── Animated geometric shapes ── */
.geo {
  position: absolute;
  border: 2px solid rgba(255,255,255,0.15);
  pointer-events: none;
  z-index: 0;
}
.geo-circle { border-radius: 50%; }
.geo-c1 { width: 180px; height: 180px; top: -40px; left: -30px; animation: orbitA 28s linear infinite; }
.geo-c2 { width: 100px; height: 100px; bottom: -20px; right: 10%; animation: orbitB 22s linear infinite reverse; border-color: rgba(255,255,0,0.2); }
.geo-c3 { width: 60px; height: 60px; top: 30%; right: 5%; animation: orbitA 18s linear infinite; border-style: dashed; }

.geo-rect { border-radius: 6px; }
.geo-r1 { width: 120px; height: 40px; top: 15%; left: 8%; animation: slideFloat 20s ease-in-out infinite; transform: rotate(15deg); }
.geo-r2 { width: 80px; height: 80px; bottom: 10%; left: 25%; animation: slideFloat 26s ease-in-out infinite reverse; transform: rotate(-10deg); border-color: rgba(255,255,0,0.18); }

.geo-diamond { transform: rotate(45deg); }
.geo-d1 { width: 50px; height: 50px; top: 20%; right: 22%; animation: orbitB 24s linear infinite; border-color: rgba(255,255,0,0.25); }
.geo-d2 { width: 30px; height: 30px; bottom: 25%; left: 15%; animation: orbitA 20s linear infinite reverse; }

.geo-dot {
  width: 8px; height: 8px;
  background: rgba(255,255,255,0.3);
  border: none;
  border-radius: 50%;
}
.geo-dot1 { top: 40%; left: 35%; animation: blink 4s ease-in-out infinite; }
.geo-dot2 { top: 25%; right: 35%; animation: blink 5s ease-in-out infinite 1s; }
.geo-dot3 { bottom: 30%; right: 40%; animation: blink 3.5s ease-in-out infinite 0.5s; background: rgba(255,255,0,0.4); }

.geo-line {
  border: none;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 1px;
}
.geo-l1 { width: 200px; top: 50%; left: 5%; transform: rotate(-5deg); animation: slideFloat 22s ease-in-out infinite; }
.geo-l2 { width: 140px; top: 35%; right: 0; transform: rotate(12deg); animation: slideFloat 18s ease-in-out infinite reverse; background: rgba(255,255,0,0.12); }

.geo-bracket {
  border: none;
  font-family: 'Orbitron', monospace;
  font-size: 3rem;
  color: rgba(255,255,255,0.06);
  font-weight: 900;
  line-height: 1;
}
.geo-b1 { top: 10%; left: 45%; animation: slideFloat 30s ease-in-out infinite; }
.geo-b2 { bottom: 5%; right: 8%; animation: slideFloat 24s ease-in-out infinite reverse; font-size: 2.2rem; }

@keyframes orbitA {
  0%   { transform: rotate(0deg) translateX(15px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(15px) rotate(-360deg); }
}
@keyframes orbitB {
  0%   { transform: rotate(0deg) translateY(10px) rotate(0deg); }
  100% { transform: rotate(360deg) translateY(10px) rotate(-360deg); }
}
@keyframes slideFloat {
  0%, 100% { transform: translate(0, 0); opacity: 0.6; }
  25%  { transform: translate(20px, -15px); opacity: 1; }
  50%  { transform: translate(-10px, 20px); opacity: 0.5; }
  75%  { transform: translate(15px, 10px); opacity: 0.9; }
}
@keyframes blink {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.6); }
}

/* ── Header content ── */
.hero-content {
  position: relative;
  z-index: 2;
}

.hero .bolt {
  display: inline-block;
  font-size: 3.5rem;
  color: var(--yellow);
  filter: drop-shadow(0 0 12px rgba(255,255,0,0.6));
  animation: boltGlow 2.5s ease-in-out infinite alternate;
  margin-bottom: 6px;
}
.hero .bolt svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

@keyframes boltGlow {
  0%   { filter: drop-shadow(0 0 8px rgba(255,255,0,0.4)); transform: scale(1); }
  50%  { filter: drop-shadow(0 0 20px rgba(255,255,0,0.9)); transform: scale(1.08); }
  100% { filter: drop-shadow(0 0 10px rgba(255,255,0,0.5)); transform: scale(1); }
}

.hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: 3px;
  color: var(--white);
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hero .sub {
  font-weight: 700;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-top: 8px;
}

.hero-wave {
  position: absolute;
  bottom: -1px; left: 0; width: 100%; height: 40px;
  z-index: 3;
}
.hero-wave svg { display: block; width: 100%; height: 100%; }

/* ═══════════════════════════════════════════════
   CONTAINER
═══════════════════════════════════════════════ */
.container {
  position: relative;
  z-index: 5;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ═══════════════════════════════════════════════
   ACTION BAR
═══════════════════════════════════════════════ */
.action-bar {
  display: flex;
  gap: 12px;
  padding: 24px 0 18px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.btn-action {
  padding: 14px 28px;
  border: none;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--white);
}
.btn-action:active { transform: scale(0.96); }

.btn-export {
  background: var(--red);
  box-shadow: 0 6px 24px rgba(226,0,26,0.3);
}
.btn-export:hover { box-shadow: 0 10px 32px rgba(226,0,26,0.4); transform: translateY(-2px); }

.btn-import {
  background: #333;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}
.btn-import:hover { box-shadow: 0 10px 32px rgba(0,0,0,0.25); transform: translateY(-2px); }

.btn-back-link {
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.4);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 5;
  margin-bottom: 10px;
}
.btn-back-link:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════
   DASHBOARD GRID — Site Cards
═══════════════════════════════════════════════ */
.site-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 40px;
}

.site-card {
  background: var(--white);
  border-radius: 18px;
  border: 2px solid var(--black);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  position: relative;
}
.site-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
  z-index: 10;
}

.card-header {
  background: var(--red);
  padding: 18px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 2px solid var(--black);
  border-radius: 15px 15px 0 0;
}

.card-name {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

/* ── LED Indicator ── */
.led-wrap {
  position: relative;
  flex-shrink: 0;
}

.led {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  flex-shrink: 0;
  position: relative;
}
.led-green {
  background: var(--green);
  box-shadow: 0 0 8px rgba(34,197,94,0.6);
}
.led-yellow {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(245,158,11,0.6);
}
.led-red {
  background: var(--red-status);
  box-shadow: 0 0 8px rgba(239,68,68,0.6);
  animation: ledPulse 1.5s ease-in-out infinite;
}
.led-grey {
  background: var(--grey);
  box-shadow: 0 0 4px rgba(156,163,175,0.4);
}

@keyframes ledPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(239,68,68,0.6); }
  50% { box-shadow: 0 0 20px rgba(239,68,68,0.9); }
}

.led-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  right: -10px;
  background: #1a1a1a;
  z-index: 999;
  color: var(--white);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  z-index: 100;
  line-height: 1.4;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.led-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 16px;
  border: 6px solid transparent;
  border-top-color: #1a1a1a;
}
.led-wrap:hover .led-tooltip {
  display: block;
}

/* ── Card Body ── */
.card-body {
  padding: 14px 16px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
}

.card-stat-label {
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.card-stat-value {
  font-weight: 800;
  color: var(--black);
  text-align: right;
}

.card-stat-date {
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 500;
  display: block;
  margin-top: 1px;
}

/* ── Progress Bar ── */
.card-progress {
  margin-top: 2px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text);
}

.progress-track {
  height: 8px;
  background: #EDEDED;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease, background 0.3s;
  min-width: 0;
}
.progress-fill.green { background: var(--green); }
.progress-fill.yellow { background: var(--amber); }
.progress-fill.red { background: var(--red-status); }
.progress-fill.grey { background: var(--grey); }

/* ── Card Footer ── */
.card-footer {
  padding: 12px 16px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
  border-radius: 0 0 15px 15px;
}

.card-feedback-emoji {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.2s;
}
.site-card:hover .card-feedback-emoji {
  transform: scale(1.15);
}

.card-updated {
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 500;
  text-align: right;
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════
   DETAIL PAGE — Site Form
═══════════════════════════════════════════════ */
.detail-wrap {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0,0,0,0.06);
  border: 2px solid var(--black);
  margin-top: 24px;
  margin-bottom: 40px;
}

.detail-banner {
  background: var(--white);
  padding: 22px 20px;
  text-align: center;
  border-bottom: 2px solid var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.detail-banner .tbolt {
  font-size: 1.6rem;
  color: var(--yellow);
  filter: drop-shadow(0 0 6px rgba(255,255,0,0.5));
}
.detail-banner .tbolt svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}
.detail-banner h2 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 2px;
  color: var(--black);
}

/* ── LED Status Banner on detail ── */
.led-banner {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-bottom: 2px solid var(--black);
  font-weight: 800;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.led-banner.status-green { background: var(--green-soft); color: #166534; }
.led-banner.status-yellow { background: var(--amber-soft); color: #92400E; }
.led-banner.status-red { background: var(--red-status-soft); color: #991B1B; }
.led-banner.status-grey { background: #F3F4F6; color: #6B7280; }

.led-banner .led {
  width: 14px;
  height: 14px;
  border-color: currentColor;
}

/* ── Section Header ── */
.sec-head {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid var(--black);
  background: var(--white);
}
.sec-head .bar {
  width: 5px;
  height: 22px;
  background: var(--red);
  border-radius: 3px;
  flex-shrink: 0;
}
.sec-head h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ── Save / Discard Button Bar ── */
.save-bar {
  padding: 14px 24px;
  background: var(--white);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--black);
}
.save-bar.bottom {
  border-bottom: none;
  border-top: 2px solid var(--black);
}

.btn-save {
  padding: 12px 28px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(226,0,26,0.25);
}
.btn-save:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(226,0,26,0.35); }
.btn-save:active { transform: scale(0.97); }

.btn-discard {
  padding: 12px 28px;
  background: var(--white);
  color: var(--text);
  border: 2px solid var(--black);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s;
}
.btn-discard:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }

/* ── Form Fields ── */
.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.field-cell {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--black);
  border-right: 1px solid var(--black);
  background: var(--white);
  transition: background 0.25s;
}
.field-cell:nth-child(even) { border-right: none; }
.field-cell:focus-within { background: var(--red-soft); }
.field-cell.full-width {
  grid-column: 1 / -1;
  border-right: none;
}

.fl {
  width: 140px;
  flex-shrink: 0;
  padding: 14px 14px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--black);
  background: var(--red-soft);
}
.fl i { font-style: normal; font-size: 1.1rem; }
.fl .field-ts {
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
}

.fi {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--black);
  outline: none;
  resize: none;
  min-height: 50px;
  overflow: hidden !important;
}
.fi::placeholder { color: #c5c5c5; font-weight: 500; }

input.fi {
  min-height: 50px;
  height: 50px;
}
input[type="range"].fi {
  padding: 14px;
  cursor: pointer;
  accent-color: var(--red);
}
input[type="date"].fi {
  cursor: pointer;
}

.percent-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  flex: 1;
}
.percent-display input[type="range"] {
  flex: 1;
  accent-color: var(--red);
  height: 6px;
  cursor: pointer;
}
.percent-display .percent-val {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--red);
  min-width: 60px;
  text-align: right;
}

/* ═══════════════════════════════════════════════
   STAGES TABLE
═══════════════════════════════════════════════ */
.stages-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.stages-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.stages-table th {
  background: var(--red);
  color: var(--white);
  padding: 14px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-right: 1px solid var(--black);
  border-bottom: 2px solid var(--black);
  vertical-align: middle;
}
.stages-table th:last-child { border-right: none; }

.stages-table td {
  padding: 0;
  border-bottom: 1px solid var(--black);
  border-right: 1px solid var(--black);
  background: var(--white);
  vertical-align: top;
}
.stages-table tr:nth-child(even) td { background: #FAFAFA; }
.stages-table tr:hover td { background: var(--red-soft); }
.stages-table td:last-child { border-right: none; }

.stages-table .ri {
  width: 38px;
  background: var(--red-soft) !important;
  color: var(--red);
  font-weight: 900;
  font-size: 0.85rem;
  text-align: center;
  padding: 14px 5px !important;
  border-right: 2px solid var(--black) !important;
}

.stages-table .ct {
  width: 100%;
  min-height: 48px;
  padding: 12px 10px;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--black);
  resize: none;
  outline: none;
  line-height: 1.5;
  overflow: hidden !important;
}
.stages-table .ct::placeholder { color: #d5d5d5; font-weight: 400; }

.stages-table input[type="date"].ct {
  cursor: pointer;
  min-height: 48px;
  padding: 12px 8px;
}

.stages-table select.ct {
  cursor: pointer;
  min-height: 48px;
  padding: 12px 8px;
  appearance: auto;
}

.col-num { width: 38px; }
.col-stage { width: 28%; }
.col-planned { width: 18%; }
.col-actual { width: 18%; }
.col-status { width: 18%; }
.col-del { width: 50px; }

.btn-del-row {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 12px;
  transition: color 0.2s;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-del-row:hover { color: var(--red); }

/* ── Stage controls ── */
.stage-ctrls {
  padding: 12px 24px;
  background: var(--white);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--black);
}

.btn-sm {
  padding: 9px 18px;
  background: var(--white);
  border: 1.5px solid var(--black);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-sm:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }

/* ═══════════════════════════════════════════════
   FEEDBACK SECTION
═══════════════════════════════════════════════ */
.feedback-form {
  padding: 20px 24px;
  background: var(--white);
  border-bottom: 1px solid var(--black);
}

.emoji-picker {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.emoji-picker-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin-right: 8px;
}

.emoji-option {
  font-size: 2rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: var(--bg);
  transition: all 0.2s;
  line-height: 1;
  position: relative;
}
.emoji-option:hover {
  transform: scale(1.15);
  border-color: var(--border);
}
.emoji-option.selected {
  border-color: var(--red);
  background: var(--red-soft);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(226,0,26,0.15);
}

.emoji-score {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: var(--red);
  color: white;
  font-size: 0.55rem;
  font-weight: 900;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
}

.feedback-comment-input {
  width: 100%;
  min-height: 70px;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 12px;
}
.feedback-comment-input:focus { border-color: var(--red); }
.feedback-comment-input::placeholder { color: #bbb; font-weight: 400; }

.btn-submit-feedback {
  padding: 10px 24px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-submit-feedback:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Feedback History ── */
.feedback-history {
  padding: 16px 24px 20px;
  background: var(--white);
}

.feedback-empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 20px 0;
}

.feedback-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.feedback-item:last-child { border-bottom: none; }

.feedback-item-emoji {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.feedback-item-content {
  flex: 1;
  min-width: 0;
}

.feedback-item-comment {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 4px;
  word-break: break-word;
}

.feedback-item-date {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 500;
}

.feedback-item-del {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
  flex-shrink: 0;
}
.feedback-item-del:hover { color: var(--red); }

/* ═══════════════════════════════════════════════
   TOAST & OVERLAY
═══════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--black);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════════
   NO DATA STATE
═══════════════════════════════════════════════ */
.no-data-hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  font-style: italic;
}

/* ═══════════════════════════════════════════════
   FILE INPUT HIDDEN
═══════════════════════════════════════════════ */
.hidden-input { display: none; }

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .site-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .site-grid { grid-template-columns: repeat(2, 1fr); }
  .fields-grid { grid-template-columns: 1fr; }
  .field-cell { border-right: none; }
  .col-stage { width: 24%; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.4rem; letter-spacing: 1px; }
  .hero { padding: 30px 14px 50px; }
  .hero .sub { font-size: 0.7rem; letter-spacing: 2px; }

  .site-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }

  .card-name { font-size: 0.72rem; }

  .fl { width: 110px; font-size: 0.65rem; padding: 10px 8px; }
  .fi { font-size: 0.95rem; padding: 10px 12px; }

  .stages-table th { font-size: 0.6rem; padding: 10px 4px; letter-spacing: 0; }
  .stages-table .ct { font-size: 0.85rem; padding: 8px 6px; }
  .col-num { width: 30px; }

  .btn-action { width: 100%; justify-content: center; font-size: 0.78rem; padding: 12px 20px; }
  .save-bar { flex-direction: column; }
  .btn-save, .btn-discard { width: 100%; justify-content: center; }

  .emoji-option { font-size: 1.6rem; padding: 4px 6px; }
  .detail-banner h2 { font-size: 1rem; }
}

@media print {
  body { background: #fff; padding: 0; }
  .hero-wave, .geo, .action-bar, .save-bar, .stage-ctrls, .feedback-form, .btn-back-link, .btn-del-row, .feedback-item-del, .hero { display: none !important; }
  .container { max-width: 100%; padding: 0; margin: 0; }
  
  /* Dashboard print */
  .site-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 15px; max-width: 100%; }
  .site-card { break-inside: avoid; border: 1px solid #000; box-shadow: none !important; }
  .card-header { border-bottom: 1px solid #000; }
  
  /* Detail print */
  .detail-wrap { border: 1px solid #000; box-shadow: none; break-inside: avoid; border-radius: 0; }
  .fi, .ct { border: 1px solid #ccc !important; }
  
  * { 
    -webkit-print-color-adjust: exact !important; 
    print-color-adjust: exact !important; 
  }
}
