/* =========================
   THEME TOKENS (SINGLE SOURCE)
   ========================= */

/* default = dark */
:root {
  /* --bg: #0b1220;
  --header: #010e29; */
  --bg: #0b1220;
  --header: #010e29;
  --text: #e0e0e0;
  --text-value: rgb(21, 196, 255);
  --icon-color: rgb(21, 196, 255);

  --accent: #0066cc;

  /* eski “güzel” kart tonu */
  --card-bg: #031829;

  --border-color: rgba(128, 128, 128, 0.37);

  /* tablo başlığı */
  --table-header-bg: #02020e;

  --card-hover-bg: rgba(21, 196, 255, 0.1);
  --success-color: #27ae60;
  --warning-color: #e67e22;
  --error-color: #e74c3c;

  --ert-current-electrode: #ff4444;
  --ert-potential-electrode: #26f163;
  --ert-error: #ff4444;
  --ert-electrode-border: rgba(124, 124, 124, 0.5);

   --table-row-even: rgba(255, 255, 255, 0.03);
  --table-row-odd: rgba(255, 255, 255, 0.06);
  --table-row-hover: rgba(21, 196, 255, 0.15);
  --result-icon-color: rgb(21, 196, 255);

}

html[data-theme="light"] {
  --bg: #f6f7fb;
  --header: #ffffff;
  --text: #0f172a;
  --text-value: #0ea5e9;
  --icon-color: #0ea5e9;
  --accent: #2563eb;
  --card-bg: rgba(255, 255, 255, 0.92);
  --border-color: rgba(15, 23, 42, 0.20);
  --table-header-bg: rgba(37, 99, 235, 0.12);
  --card-hover-bg: rgba(14, 165, 233, 0.08);

  --ert-current-electrode: #dc2626;
  --ert-potential-electrode: #16a34a;
  --ert-error: #dc2626;

    --table-row-even: rgba(0,0,0,0.03);
  --table-row-odd: rgba(0,0,0,0.06);
  --table-row-hover: rgba(37, 99, 235, 0.10);
}

html[data-theme="blue"] {
  --bg: #0b1220;
  --header: #0f1a2e;
  --text: #e0f2fe;
  --text-value: #38bdf8;
  --icon-color: #38bdf8;
  --accent: #06b6d4;
  --card-bg: rgba(2, 6, 23, 0.20);
  --border-color: rgba(59, 130, 246, 0.50);
  --table-header-bg: rgba(59, 130, 246, 0.35);
  --card-hover-bg: rgba(59, 130, 246, 0.10);

  --ert-current-electrode: #ff4444;
  --ert-potential-electrode: #26f163;
  --ert-error: #ff4444;
}

html[data-theme="green"] {
  --bg: #0a2a1a;
  --header: #0d351f;
  --text: #e8f5e8;
  --text-value: #22c55e;
  --icon-color: #22c55e;
  --accent: #34d399;
  --card-bg: rgba(10, 42, 26, 0.88);
  --border-color: rgba(45, 107, 74, 0.50);
  --table-header-bg: #021103;
  --card-hover-bg: rgba(34, 197, 94, 0.08);

  --ert-current-electrode: #ff4444;
  --ert-potential-electrode: #26f163;
  --ert-error: #ff4444;
}


header-main,
footer-main {
  position: fixed;
  left: 0;
  right: 0;
  padding: 10px 14px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--header);
  color: var(--text);
  z-index: 10;
  user-select: none;

}

header-main {
  border-bottom: 2px solid var(--accent);
  border-top: 2px solid var(--accent);

}

#header-title {
  font-size: 1.25rem;
}

#powerButton {
  background-color: #ff5757;
}

.power-off-button {

  gap: 0.5rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-radius: 10px;
  color: rgb(255 255 255 / 1);
  /* transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms; */
  user-select: none;

}

.power-off-button:hover {
  opacity: 0.9;
}


header-main {
  top: 0;
}

footer-main {
  bottom: 0;
}

.header-center span {
  margin: 0 6px;
}

.header-right span {
  margin-left: 10px;
}

footer-main .action-button.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/*main {
  height: 100%;
  padding-top: 52px;   
  padding-bottom: 44px;
}*/

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* HEADER & FOOTER sabit */
header-main,
footer-main {
  position: fixed;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 10;
}

header-main {
  top: 0;
}

footer-main {
  bottom: 0;
}

/* MAIN = header + footer arası */
main {
  position: absolute;
  top: 60px;
  bottom: 60px;
  left: 0;
  right: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;

  flex: 1 1 0%;

}

/* SAYFALAR BURAYA GELİR */
.main-content-area {

  padding: 20px;
  background-color: var(--bg);
  /* justify-content: stretch; */
  /* align-items: stretch; */
}



footer-main {
  width: 100vw;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 2px solid var(--accent);
}

.footer-actions {
  margin-left: auto;
  /* 🔴 SAĞA ZORLA */

  display: flex;
  /* align-items: center; */
  gap: 12px;
}

.action-button {
  width: 80px;
  height: 45px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: 1px solid gray;
  /* ✅ beyaz çerçeve */
  border-radius: 5px;

  color: #ffffff;
  cursor: pointer;

  transition:
    background-color 0.15s ease,
    transform 0.1s ease,
    opacity 0.15s ease;
}

.action-button i {
  font-size: 22px;
  /* 🔥 icon daha büyük */
  line-height: 1;
}

.action-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.action-button:active {
  transform: scale(0.94);
}

.action-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#footer-brand.hidden {
  visibility: hidden;
}

#vertical-divider {
  width: 1px;
  height: 2.5rem;
  color: #3399ff;
}
.vertical-divider {
  width: 1px;
  height: 28px;
  background: var(--border-color);
  margin: 0 10px;
}




html,
body {
  margin: 0;
  height: 100%;
  font-family: Arial, sans-serif;

}


/* HEADER */

#app-header {
  height: 60px;
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  padding: 0 20px;
  justify-content: space-between;
}

.header-left .app-title {
  font-size: 40px;
  font-weight: bold;
}

.header-center {
  font-size: 16px;
}
.header-right {
  display: flex;
  align-items: center;
}
.header-right span {
  margin-left: 15px;
}
.hdr-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;

}

.hdr-icon {
  color: var(--icon-color);
  font-size: 1.1rem;
}
/* STACK */
.hdr-btn {
  width: 64px;
  height: 42px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text);
  display: flex;
  font-size: 1.1rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, opacity 0.15s;
}

.hdr-btn:hover {
  background: rgba(255,255,255,0.12);
}

.hdr-btn:active {
  transform: scale(0.95);
}
.hdr-btn.power {
  background: #e74c3c;
  border-color: #e74c3c;
  color: #fff;
}

.hdr-btn.power:hover {
  filter: brightness(1.1);
}



#app-footer {
  height: 40px;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

#vertical-divider {
  width: 1px;
  height: 2.5rem;
  color: #3399ff;
}



/* === RESET / NORMALIZE === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* === TYPOGRAPHY === */

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.4;
  user-select: none;
  justify-content: center;
  align-items: center;
}

/* === DEFAULT TEXT === */

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
}

p {
  margin: 0;
}

#vertical-divider {
  width: 1px;
  height: 2.5rem;
  color: #3399ff;
}

.page-container {
  width: 100%;
  /* max-width: 200px; */
  height: 100%;
  color: var(--text);

  margin: 0 auto;
  padding: 12px;

  display: flex;
  flex-direction: column;

  box-sizing: border-box;
  background-color: var(--bg);
  overflow: hidden;
}

.page-container.centered {
  display: flex;
  justify-content: center;
  /* dikey */
  align-items: center;
  /* yatay */
}

.theme-button {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text);
  width: 46px;
  height: 45px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.theme-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.theme-button:active {
  transform: scale(0.96);
}
/* ---------- DISCONNECT SCREEN ---------- */

.disconnect-wrap {
  width: 100%;
  height: calc(100vh - var(--header-height, 64px) - var(--footer-height, 56px));
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.disconnect-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 36px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.disconnect-icon {
  font-size: 3rem;
  color: var(--danger, #e74c3c);
  margin-bottom: 12px;
}

.disconnect-title {
  margin: 8px 0 12px;
  font-size: 1.6rem;
  color: var(--text);
}

.disconnect-text {
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.disconnect-subtext {
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 22px;
}

.disconnect-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.1s ease;
}

.disconnect-btn:hover {
  filter: brightness(1.1);
}

.disconnect-btn:active {
  transform: scale(0.97);
}
@keyframes blink {
  0%   { opacity: 1; }
  50%  { opacity: 0.3; }
  100% { opacity: 1; }
}

.blink {
  animation: blink 1s infinite;
}
  /* --- SAFE HOME OVERLAY --- */
  .safehome-hotspot{
    position: fixed;
    left: 0; top: 0;
    width: 40px; height: 40px;
    opacity: 0;           /* görünmez */
    z-index: 9998;
  }
  .safehome-overlay{
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.55);
    z-index: 9999;
  }
  .safehome-card{
    width: min(420px, 92vw);
    background: #111;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
    color: #fff;
  }
  .safehome-title{
    display:flex; gap:10px; align-items:center;
    font-size: 1.05rem;
    margin-bottom: 10px;
  }
  .safehome-title i{ color: #f1c40f; }
  .safehome-row{ display:flex; gap:10px; align-items:center; margin: 10px 0; }
  .safehome-pin{
    flex:1;
    font-size: 1.2rem;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.06);
    color:#fff;
    outline: none;
    letter-spacing: 3px;
  }
  .safehome-grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap:10px;
    margin-top: 12px;
  }
  .safehome-btn{
    height: 48px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    color:#fff;
    font-size: 1.05rem;
  }
  .safehome-btn.primary{
    background: rgba(34,197,94,.25);
    border-color: rgba(34,197,94,.55);
  }
  .safehome-btn.danger{
    background: rgba(231,76,60,.20);
    border-color: rgba(231,76,60,.55);
  }

/* =========================================================
   CERES(R) MARKALAMA  (title-bar logo + arka plan filigranı)
   Tek kaynak: her sayfa index.html kabuğu üzerinden alır.
   ========================================================= */

/* --- 1) TITLE BAR MARKA KİLİDİ --- */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ceres-brand {
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #1E8FDA;
  /* katmanlı vurgu: keskin alt gölge + yumuşak mavi hâle */
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.55),
    0 2px 4px rgba(0, 0, 0, 0.45),
    0 0 14px rgba(15, 112, 183, 0.55);
  white-space: nowrap;
}

.ceres-brand sup {
  font-size: 0.5em;
  font-weight: 700;
  vertical-align: super;
  margin-left: 1px;
  text-shadow: none;
}

.brand-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
  flex: 0 0 auto;
}

html[data-theme="light"] .ceres-brand {
  color: #0F70B7;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6),
    0 1px 3px rgba(15, 23, 42, 0.25);
}

/* --- 2) FOOTER MARKA YAZISI (içeriğe hiç girmeyen, sabit filigran) --- */
footer-main {
  position: fixed;
}

.footer-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  line-height: 1;
  color: #0F70B7;
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.footer-brand sup {
  font-size: 0.55em;
  vertical-align: super;
  margin-left: 1px;
}

/* dar ekranlarda footer aksiyon tuşlarıyla çakışmasın */
@media (max-width: 720px) {
  .footer-brand { display: none; }
}

