/* ============================================================
   Magic Terrarium – Global Reset
   Clean, modern, PWA-ready UI
   ============================================================ */

:root {
  --bg: #0b1020;
  --card-bg: rgba(255,255,255,0.06);
  --accent: #43e697;
  --accent-soft: rgba(67,230,151,0.12);
  --text-main: #f5f7ff;
  --text-muted: #9aa2c3;
  --danger: #ff6b6b;
  --ok: #43e697;
  --radius: 18px;
  --shadow: 0 14px 35px rgba(0,0,0,0.45);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #202954 0%, #050714 55%);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ============================================================
   Layout
   ============================================================ */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;      /* הכרטיס והפוטר אחד מתחת לשני */
  align-items: center;         /* מרכז לרוחב */
  justify-content: flex-start; /* מתחיל מלמעלה */
  padding: 18px;
}

.app-card {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  border-radius: 24px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(16px);
}

/* Footer מתחת לכרטיס */
.app-footer {
  margin-top: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
}

.app-footer a {
  color: inherit;
  text-decoration: underline;
}

/* ============================================================
   Center Header (Logo + Title)
   ============================================================ */

.app-center-header {
  text-align: center;
  margin-bottom: 22px;
}

.app-logo-big {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.app-center-title {
  font-size: 22px;
  font-weight: 700;
  margin-top: 6px;
}

.app-center-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   Forms
   ============================================================ */

.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(4,8,25,0.7);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-main);
  font-size: 15px;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(67,230,151,0.4);
}

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.form-error {
  padding: 10px 12px;
  background: rgba(255,107,107,0.15);
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--danger);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   Checkboxes (New, fixed layout)
   ============================================================ */

.checkbox-row,
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 15px;
}

.settings-line {
  margin-bottom: 12px;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn-primary,
.btn-secondary,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  width: 100%;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: 0.12s ease;
  color: #fff;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(90deg, #1dd1a1, #00b894);
}

.btn-secondary {
  background: linear-gradient(90deg, #00c6ff, #0072ff);
}

.btn-danger {
  background: linear-gradient(90deg, #ff5f6d, #ff2e63);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.3);
}

/* ============================================================
   Status banners
   ============================================================ */

.status-banner {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  margin-bottom: 12px;
}

.status-ok {
  background: var(--accent-soft);
  color: var(--ok);
}

.status-warn {
  background: rgba(255,107,107,0.15);
  color: var(--danger);
}

/* ============================================================
   Gauge (User dashboard)
   ============================================================ */

.metric-card {
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: rgba(7,10,30,0.95);
  border: 1px solid rgba(255,255,255,0.1);
}

.metric-header {
  display: flex;
  justify-content: space-between;
}

.metric-title {
  font-size: 14px;
  font-weight: 600;
}

.metric-status {
  font-size: 12px;
}

.metric-status.normal { color: var(--ok); }
.metric-status.low,
.metric-status.high { color: var(--danger); }
.metric-status.nodata { color: var(--text-muted); }

.metric-main {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
}

.metric-units {
  font-size: 12px;
  color: var(--text-muted);
}

.gauge-bar {
  height: 14px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg,#ff6b6b 0%, #ffd36b 20%, #43e697 50%, #ffd36b 80%, #ff6b6b 100%);
  position: relative;
}

.gauge-track {
  position: absolute;
  inset: 2px;
  background: rgba(4,8,25,0.85);
  border-radius: 999px;
}

.gauge-fill {
  position: absolute;
  inset: 2px;
  background: rgba(67,230,151,0.25);
  border-radius: 999px;
}

.gauge-dot {
  width: 20px;
  height: 20px;
  background: radial-gradient(circle at 30% 20%, #ffffff, #43e697);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  animation: floatDot 1.8s ease-in-out infinite;
}

@keyframes floatDot {
  0%,100% { transform: translate(-50%,-52%); }
  50% { transform: translate(-50%,-46%); }
}

/* ============================================================
   Admin dashboard cards
   ============================================================ */

.terrarium-card {
  background: rgba(255,255,255,0.07);
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.15);
}

.section-title {
  font-size: 15px;
  margin-bottom: 12px;
  font-weight: 600;
}

/* ============================================================
   Mobile tweaks
   ============================================================ */

@media (max-width: 420px) {
  .form-row {
    flex-direction: column;
  }
}

.shortcut-link {
    color: var(--text-main) !important;
    text-decoration: underline;
    font-size: 13px;
    word-break: break-all;
}

.shortcut-link:visited {
    color: var(--text-main) !important;
}

.shortcut-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.shortcut-link {
    color: #43e697 !important;        /* ירוק-טורקיז כמו הכפתורים */
    font-weight: 600;
    text-decoration: underline;
    word-break: break-all;             /* כדי שלא יגלוש החוצה */
}

.shortcut-link:hover {
    color: #2bc57f !important;
}

