    body {
      font-family: Arial, sans-serif;
      background: #111;
      color: #eee;
      text-align: center;
      padding: 20px;
    }

    .card {
      background: #1e1e1e;
      padding: 24px;
      margin: 18px auto;
      border-radius: 16px;
      max-width: 460px;
    }

    input, select {
      width: 90%;
      padding: 14px;
      margin: 8px 0;
      border-radius: 10px;
      border: none;
      font-size: 18px;
    }

    button {
      font-size: 18px;
      padding: 12px 24px;
      margin: 8px;
      border: 0;
      border-radius: 10px;
      cursor: pointer;
    }

    .main { background: #2563eb; color: white; }
    .on { background: #22c55e; color: white; }
    .off { background: #ef4444; color: white; }
    .gray { background: #555; color: white; }

    .value {
      font-size: 32px;
      font-weight: bold;
    }

    .hidden {
      display: none;
    }

    .user-row {
      background: #2a2a2a;
      margin: 8px 0;
      padding: 12px;
      border-radius: 10px;
    }

    .small {
      color: #aaa;
      font-size: 14px;
    }

    .active-on {
      background: #22c55e;
      color: white;
    }

    .active-off {
      background: #ef4444;
      color: white;
    }

    .inactive {
      background: #555 !important;
      color: #aaa;
    }

    .relay-block {
      margin: 18px 0;
      text-align: center;
    }

    .relay-title {
      font-size: 18px;
      font-weight: bold;
      margin-bottom: 4px;
    }

    .relay-controls {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 10px;
    }

    .relay-controls label {
      color: #ccc;
      font-size: 16px;
      white-space: nowrap;
    }

    .relay-controls input {
      width: auto;
      padding: 0;
      margin: 0 5px 0 0;
      transform: scale(1.2);
    }

    .option-row {
      margin: 10px auto 0;
      text-align: left;
      max-width: 330px;
      color: #ccc;
      font-size: 15px;
    }

    .option-row input {
      width: auto;
      padding: 0;
      margin-right: 8px;
      transform: scale(1.2);
    }

    .mode-actions {
      margin-top: 12px;
    }

    .mode-actions button {
      font-size: 15px;
      padding: 10px 14px;
    }

    .pressure-actions button {
      font-size: 15px;
      padding: 10px 14px;
    }

    #toast {
      position: fixed;
      bottom: 30px;
      left: 50%;
      transform: translateX(-50%);
      background: grey;
      color: white;
      padding: 12px 20px;
      border-radius: 10px;
      font-size: 16px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
      z-index: 999;
    }

    .circle-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin: 10px 0;
      color: #ccc;
    }

    .circle-row label {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 110px;
    }

    .circle-row input {
      width: auto;
      margin: 0;
      transform: scale(1.15);
    }

    .circle-row button {
      width: 42px;
      height: 42px;
      padding: 0;
      margin: 0;
      font-size: 18px;
    }

    .circle-time {
      min-width: 60px;
      text-align: center;
      font-size: 16px;
      color: #fff;
    }


    #toast.show {
      opacity: 1;
    }

  .device-status {
    font-size: 24px;
    font-weight: bold;
    margin-top: 14px;
  }

  .device-online {
    color: #22c55e;
  }

  .device-offline {
    color: #ef4444;
  }

  .device-info {
    margin-top: 8px;
    line-height: 1.5;
  }

  .hidden {
    display: none !important;
  }

  .logo-container {
    text-align: center;
    margin-bottom: 20px;
  }

  .logo-container {
    text-align: center;
    margin-bottom: 20px;
  }

  .logo {
    width: 220px;
    max-width: 100%;
    border-radius: 24px;
  }

	/* Körprogram relé kártya */
	.circle-row-new {
		margin: 8px 0;
		padding: 8px;
		background: #2a2a2a;
		border-radius: 12px;
	}

	/* Relé cím + checkbox */
	.circle-row-new label {
		margin-bottom: 6px;
		font-size: 14px;
	}

	.circle-row-new input {
		width: auto;
		margin: 0;
		transform: scale(1.2);
	}

	/* Óra / perc / mp grid */
	.time-editor {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 5px;
		text-align: center;
		align-items: center;
	}

	/* + és - gombok */
	.time-editor button {
		height: 28px;
		font-size: 15px;

		padding: 0;
		line-height: 1;

		display: flex;
		align-items: center;
		justify-content: center;
	}

	/* óra / perc / mp felirat */
	.time-editor .time-label {
		font-size: 12px;
	}

	/* Idő értékek */
	.time-editor .time-value {
		font-size: 16px;
	}
	
    .motor-mv-warning {
      margin-top: 12px;
      padding: 10px;
      border-radius: 8px;
      background: #ffebee;
      border: 2px solid #f44336;
      color: #b71c1c;
      font-weight: bold;
      text-align: center;
    }	



/* =====================================================
   BACKGROUD
===================================================== */

body {
  background-color: #0f0f0f;
  background-image: url("/images/bg12.png");
  background-repeat: repeat;
  background-size: 800px auto;
  background-attachment: fixed;
}

/* =====================================================
   ADMINOK KÁRTYA
===================================================== */

.admin-main-header-card {
  background: #252525;
  border-radius: 16px;
  padding: 18px;

  max-width: 900px;
  margin: 16px auto;
}

.admin-main-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.admin-main-header-row h2 {
  margin: 0;
  padding-left: 27px;
}

.admin-main-header-row .small {
  margin-top: 4px;
}

/* =====================================================
   ADMIN PANEL
===================================================== */


    .admin-grid {
      display: grid;
      gap: 18px;
      max-width: 900px;
      margin: 0 auto;
    }

    .admin-title {
      font-size: 28px;
      margin-bottom: 8px;
    }

    .admin-actions {
      display: flex;
      justify-content: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    
/* =====================================================
   ADMIN PANEL - ÚJ FELÜLET
===================================================== */

.admin-header-card {
  background: #252525;
  border-radius: 16px;
  padding: 18px;

  max-width: 900px;
  margin: 16px auto;
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.admin-header-row h2 {
  margin: 0;
}

.admin-header-row .small {
  margin-top: 4px;
}

.admin-manager-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;

  align-items: center;
}

.admin-manager-buttons button {
  width: 240px;
}

/* =====================================================
   +ÚJ ADMIN
===================================================== */

.add-admin-row {
  display: grid;
  grid-template-columns:
    1fr
    1fr
    auto
    auto;

  gap: 8px;
  align-items: center;

  margin-top: 18px;
}

.add-admin-row input {
  width: 100%;
  box-sizing: border-box;

  font-size: 16px;
  padding: 10px;
}

.remove-admin-row {
  margin-top: 18px;
}

.remove-admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.remove-admin-header,
.remove-admin-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 2fr;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.remove-admin-header {
  padding: 0 10px 8px 10px;
  font-size: 14px;
  font-weight: normal;
  color: #aaa;
}

.remove-admin-item {
  border: 1px solid #444;
  border-radius: 10px;
  padding: 10px;
  font-size: 18px;
  font-weight: bold;
  color: white;
}

.remove-admin-item input {
  width: auto;
  margin: 0;
}
/* =====================================================
   ÜGYFÉL KERESŐ
===================================================== */

.admin-search-row {
  margin-top: 8px;

  display: flex;
  align-items: center;
  gap: 10px;

  width: 100%;
}

.search-icon {
  width: 140px;
  max-width: 100%;

  object-fit: contain;
  flex-shrink: 0;
}

.admin-search-row form {
  flex: 1;
  max-width: 450px;
}

.clientSearchBox {
  width: 100% !important;
  max-width: none;

  box-sizing: border-box;

  margin-left: 0;
  margin-right: 0;

  transition: 0.2s;
}

.clientSearchBoxNone {
  background: rgba(255, 0, 0, 0.12);
  border: 1px solid #ff5555;
}

.search-area {
  width: 400px;
}

.search-result-message {
  margin-top: 6px;
  text-align: center;

  color: #ff6b6b;
  font-size: 13px;
  min-height: 18px;
}

.clientSearchBox::placeholder {
  color: #888;
}

/* =====================================================
   ÜGYFÉL KÁRTYA
===================================================== */

.client-card {
  background: #252525;
  border-radius: 16px;
  padding: 18px;

  max-width: 900px;
  margin: 16px auto;
}

.client-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.client-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1E88E5;
  

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
  font-weight: bold;
  color: white;
}

.client-name {
  font-size: 22px;
  font-weight: bold;
}

.client-header-actions {
  display: flex;
  gap: 10px;
}

.client-footer {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.client-settings-btn {
  background: transparent;
  border: none;

  color: #888;

  font-size: 28px;
  cursor: pointer;

  padding: 0;

  transition: all 0.2s ease;
}

.client-settings-btn:hover {
  color: #1E88E5;
  transform: rotate(45deg);
}

/* =====================================================
   ÜGYFÉL POP KÁRTYA
===================================================== */
.client-settings-popup {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.65);

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 9999;
}

.client-settings-card {
  width: 90%;
  max-width: 880px;

  background: #252525;

  border: 3px solid #555;
  border-radius: 18px;

  padding: 24px;

  text-align: center;
}

.client-settings-header {
  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 10px;

  margin-bottom: 24px;

  text-align: center;
}

.client-settings-name-block {
  text-align: left;
}

.client-settings-body {
  min-height: 160px;

  margin-top: 18px;
  margin-bottom: 24px;
}

.client-settings-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.device-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;

  align-items: center;
}

.device-action-buttons button {
  width: 250px;
}


/* =====================================================
   UJ ESZKÖZ POPUP RESZ KÁRTYA
===================================================== */
.add-device-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.add-device-row input,
.add-device-row select {
  width: 100%;
  box-sizing: border-box;
  font-size: 18px;
  padding: 10px;
  margin: 0;
}

.add-device-save {
  background: #2e7d32;
  color: white;

  width: 38px;
  height: 38px;

  padding: 0;
  margin: 0;

  border: none;
  border-radius: 8px;

  cursor: pointer;

  font-size: 18px;
}

.add-device-cancel {
  background: #ff6b6b;
  color: white;
  width: 38px;
  height: 38px;
  padding: 0;
  margin: 0;
}



.remove-device-row {
  margin-top: 18px;
}

.remove-device-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.remove-device-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 10px;
  align-items: center;

  
  border: 1px solid #444;
  border-radius: 10px;

  padding: 10px;

  text-align: left;
  font-size: 18px;
  font-weight: bold;
  color: white;
}


.remove-device-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;

  gap: 10px;

  padding: 0 10px 8px 10px;

  font-size: 14px;
  font-weight: none;

  color: #aaa;

  text-align: left;
}

.remove-device-item input {
  width: auto;
  margin: 0;
}
/* =====================================================
   ESZKÖZ KÁRTYA
===================================================== */

.device-card {
  background: #2a2a2a;
  border-radius: 14px;
  padding: 16px;
  margin-top: 18px;
  width: calc(100% - 20px);
  margin-left: auto;
  margin-right: auto;
}

/* =====================================================
   ESZKÖZ KÁRTYA
   Egy ügyfélhez tartozó ESP32 eszköz megjelenítése
===================================================== */

.device-card2 {

  /* Kicsit világosabb háttér,
     hogy elkülönüljön az ügyfélkártyától */
  background: #2D2D2D;

  /* Lekerekített sarkok */
  border-radius: 16px;

  /* Belső margó */
  padding: 18px;

  /* Kicsit keskenyebb mint a client-card */
  max-width: 880px;

  /* Középre igazítás */
  margin: 16px auto;

  border: 3px solid #4A4A4A;
}



/* =====================================================
   ESZKÖZ KÁRTYA FELIRATOK
===================================================== */

.device-label {

  /* Külön sorban jelenjen meg */
  display: block;

  /* Távolság a cím és az érték között */
  margin-top: 12px;

  /* Halvány szürke szín */
  color: #aaa;

  /* Kisebb betűméret */
  font-size: 14px;
}

/* =====================================================
   ESZKÖZ KÁRTYA ESZKÖZ ID ÉRTÉK
===================================================== */

.device-id-value {
  display: block;
  margin-top: 12px;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
}


.device-icon-container {
  margin-top: 25px;
  text-align: center;
}

.esp32-icon {
  width: 140px;
  max-width: 100%;
}

/* =====================================================
   ESZKÖZ KÁRTYA ESZKÖZ NÉV ÉRTÉK
===================================================== */

.device-name-value {
  display: block;
  margin-top: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
}

.device-location-value {
  display: block;
  margin-top: 12px;

  color: #fff;
  font-size: 16px;
  font-weight: bold;
}

/* =====================================================
   ESZKÖZ KÁRTYA ESZKÖZ OFFLINE-ONLINE ÉRTÉK
===================================================== */

.device-offline {
  display: block;
  margin-top: 12px;

  color: #ff6666;
  font-size: 16px;
  font-weight: bold;
}

.device-online {
  display: block;
  margin-top: 12px;

  color: #66ff66;
  font-size: 16px;
  font-weight: bold;
}

.device-last-seen {
  margin-top: 4px;

  color: #bbb;
  font-size: 12px;
}

/* =====================================================
   ESZKÖZ KÁRTYA CONFIG X és Pipa szine
===================================================== */
.config-ok {
  color: #22c55e;
}

.config-missing {
  color: #ef4444;
}

.device-configs {
  text-align: left;
  line-height: 1.8;
}

/* =====================================================
   ESZKÖZ KÁRTYA GOMBOK
===================================================== */

.device-grid button {

  /* Csak akkora legyen,
     amekkora a felirat */
  width: auto;

  /* Függőleges térköz */
  margin: 4px 0;
}

/* =====================================================
   MŰVELETEK OSZLOP
===================================================== */

.device-actions {

  /* Flexbox elrendezés */
  display: flex;

  /* Gombok egymás alatt */
  flex-direction: column;

  /* Jobb oldalra igazítás */
  align-items: flex-end;

  /* Távolság a gombok között */
  gap: 8px;
}

/* =====================================================
   ONLINE VAGY OFFLINE AZ ESZKÖZ
===================================================== */
.device-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 20px;
}

.device-online {
  color: #22c55e;
  font-weight: bold;
  font-size: 18px;
}

.device-last-seen {
  margin-top: 6px;
  color: #aaa;
  font-size: 13px;
}

/* =====================================================
   SZüRKE TOGGLE GOMB
===================================================== */
.device-toggle {
  display: block;

  margin: 12px auto 0;

  background: transparent;
  border: none;

  color: #aaa;

  font-size: 18px;

  cursor: pointer;
}

.device-details {
  margin-top: 18px;
}

.device-grid-details {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 20px;
  align-items: start;
}

/* =====================================================
   MOBIL NÉZET - ESZKÖZ KÁRTYA
===================================================== */

@media (max-width: 700px) {



  .device-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .device-card2 {
    max-width: 100%;
    width: auto;
  }

  .device-actions {
    align-items: stretch;
  }

  .device-actions button {
    width: 100%;
  }

  .device-configs {
    text-align: left;
  }

  .client-header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .client-user {
    justify-content: center;
  }

  .client-footer {
    justify-content: center;
    margin-top: 24px;
  }

}

/* =====================================================
   ÜGYFELEK KEZELÉSE POPUP
===================================================== */

.client-manager-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;

  align-items: center;
}

.client-manager-buttons button {
  width: 240px;
}

/* =====================================================
   ÚJ ÜGYFÉL SOR
===================================================== */

.add-client-row {
  display: grid;
  grid-template-columns:
    1fr
    1fr
    1fr
    1fr
    auto
    auto;

  gap: 8px;
  align-items: center;

  margin-top: 18px;
}

.add-client-row input {
  width: 100%;
  box-sizing: border-box;

  font-size: 16px;
  padding: 10px;
}

.popup-section-title {
  margin-top: 18px;
  margin-bottom: 10px;

  font-size: 18px;
  font-weight: bold;

  color: white;

  text-align: center;
}

/* =====================================================
   ÜGYFÉL TÖRLÉS
===================================================== */

.remove-client-row {
  margin-top: 18px;
}

.remove-client-row {
  margin-top: 18px;
}

.remove-client-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.remove-client-header,
.remove-client-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.remove-client-header {
  padding: 0 10px 8px 10px;
  font-size: 14px;
  font-weight: normal;
  color: #aaa;
}

.remove-client-item {
  border: 1px solid #444;
  border-radius: 10px;
  padding: 10px;
  font-size: 18px;
  font-weight: bold;
  color: white;
}

.remove-client-item input {
  width: auto;
  margin: 0;
}

.warning-device-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;

  gap: 10px;

  margin-top: 8px;

  font-size: 14px;
  color: #aaa;

  font-weight: normal;
}

.warning-title {
  color: #aaa;
  font-size: 14px;
  font-weight: normal;
}

.warning-title-blink {
  color: #ff4444;
  font-weight: bold;

  animation: blinkWarning 1s infinite;
}

@keyframes blinkWarning {

  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }

  100% {
    opacity: 1;
  }

}

.warning-device-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;

  gap: 10px;

  padding: 3px 0;

  margin-top: 8px;

  font-size: 18px;
  font-weight: bold;
  color: white;
}



