/* -------- Βασική σελίδα -------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  padding-top: 84px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: url("/beeapp/img/bg-graphs.jpg") no-repeat center center fixed;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: url('/beeapp/img/beisbee-logo.png') no-repeat center center;
  background-size: contain;
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
}

/* -------- Top Bar -------- */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(255,193,7,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  padding: 0 12px;
}

.top-bar-right {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.provider-logo {
  height: 40px;
  width: 40px;
  object-fit: cover;
  border-radius: 8px;
}

/* -------- Κουμπιά Header -------- */
.user-btn, .logout-btn {
  background: #FFC107;
  color: #111;
  border: 1px solid #FFA000;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}
.user-btn:hover, .logout-btn:hover {
  background: #4CAF50;
  color: white;
  border-color: #388E3C;
}

.top-bar-title {
  color: #111;
  font-size: 22px;
  font-weight: 300;
  background: #FFC107;
  border: 1px solid #FFA000;
  border-radius: 8px;
  padding: 6px 18px;
  transition: background 0.3s, color 0.3s;
  cursor: default;
}
.top-bar-title:hover {
  background: #4CAF50;
  color: white;
}

/* -------- Header Panel -------- */
.bee-header {
  text-align: center;
  padding: 8px 16px;
  background: rgba(255,140,0,0.85);
  margin: 6px 16px;
  border-radius: 10px;
}
.bee-header img { display: none; }
.bee-header h2 {
  margin: 0;
  color: #000000;
  font-size: 22px;
  font-weight: 300;
  text-shadow: none;
  padding: 0;
}
/* -------- Device Page -------- */
.device-page {
  padding: 16px;
  display: flex;
  justify-content: center;
}

.device-card {
  width: 100%;
  max-width: 350px;
  background-color: #FFF3E0;
  background-image: url('/beeapp/img/beisbee-logo.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 70%;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  overflow: hidden;
  position: relative;
}

/* User bar */
.card-user-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

/* Επικεφαλίδα */
.card-header {
  background: #fff8e7;
  padding: 16px 14px;
  text-align: center;
  font-size: 13px;
  border-bottom: 1px solid #eee;
}
.card-header-title {
  font-weight: 600;
  color: #111111;
  font-size: 14px;
}
.card-header-time {
  font-weight: 600;
  display: block;
  margin-top: 4px;
  color: #111;
}

/* Βάρος / Διαφορά */
.card-weight {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 24px 18px;
  border-bottom: 1px solid #eee;
}
.card-weight-block {
  flex: 1;
  text-align: center;
}
.card-weight-value {
  font-family: "Segoe UI", Roboto, sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: #111;
}
.card-weight-label {
  font-size: 12px;
  color: #000;
  margin-top: 4px;
}

/* Μετρήσεις */
.card-metrics {
  display: flex;
  justify-content: space-around;
  background: #fff;
  padding: 20px 10px;
  border-bottom: 1px solid #eee;
}
.metric { text-align: center; min-width: 0; }
.metric-value {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #111;
}
.metric-label { font-size: 11px; color: #000; }

/* Κουμπιά */
.card-actions {
  display: flex;
  justify-content: space-around;
  background: #fff;
  padding: 20px 12px;
  border-bottom: 1px solid #eee;
  gap: 10px;
}
.card-button {
  flex: 1;
  padding: 10px 0;
  border-radius: 10px;
  border: 1px solid #FFC107;
  font-size: 14px;
  font-weight: 600;
  background: #fff8e7;
  color: #5D3A1A;
  cursor: pointer;
  transition: background 0.3s;
}
.card-button:hover {
  background: #FFC107;
  color: #111;
}

/* Location */
.card-location {
  background: #fff;
  text-align: center;
  padding: 16px 10px;
  border-bottom: 1px solid #eee;
}
.location-icon { font-size: 26px; margin-bottom: 4px; }
.location-label { font-size: 13px; color: #111111; margin-bottom: 4px; }
.location-value { font-size: 12px; color: #222; }

/* Πλοήγηση χρόνου */
.card-navigation {
  background: #fff;
  padding: 16px 10px 20px;
}
.nav-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  gap: 6px;
}
.nav-btn {
  min-width: 60px;
  padding: 6px 0;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #f9f9f9;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  color: #111;
}
.nav-btn:hover { background: #FFC107; border-color: #FFA000; }
.nav-btn-primary {
  border-color: #000000;
  background: #FFC107;
  color: #111;
}
.nav-label { font-size: 12px; text-align: center; color: #111111; }

/* -------- Battery blink -------- */
.battery-low {
  color: #e53935;
  animation: battery-blink 1s infinite;
}
@keyframes battery-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* -------- Forms -------- */
.page-title {
  text-align: center;
  margin-top: 30px;
  font-size: 22px;
}
.form-card {
  max-width: 380px;
  margin: 20px auto 40px;
  padding: 20px 24px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}
.form-label {
  display: block;
  font-size: 14px;
  margin-bottom: 12px;
}
.form-input {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
  box-sizing: border-box;
}
.form-button {
  margin-top: 10px;
  width: 100%;
  padding: 10px 0;
  border: none;
  border-radius: 999px;
  background: #FFC107;
  color: #111;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.form-button:hover { background: #4CAF50; color: white; }
.form-back {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: #222;
  text-decoration: none;
}

/* -------- History controls -------- */
.history-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

/* -------- Device selector -------- */
.device-selector {
  text-align: center;
  padding: 10px;
  font-size: 14px;
}

/* -------- Responsive -------- */
@media (min-width: 600px) {
  .device-page { padding-top: 20px; }
}

/* Device selector μέσα στην κάρτα */
.card-device-selector {
  padding: 10px 14px 4px;
  text-align: center;
}
.card-device-selector select {
  border: none;
  background: transparent;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  outline: none;
  color: #111;
  appearance: none;
  -webkit-appearance: none;
}

/* -------- Γραφήματα -------- */
canvas {
  background: rgba(255,255,255,0.85);
  border-radius: 12px;
  padding: 10px;
  width: 100% !important;
}
h2 {
  color: white;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  padding-left: 20px;
}

/* -------- Footer --------*/
/* old footer removed */
  z-index: 999;
}


/* -------- Top Bar ισονομία κουμπιών -------- */
.top-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 8px !important;
}
.top-bar .user-btn,
.top-bar .logout-btn,
.top-bar .top-bar-title {
  flex: 1 !important;
  text-align: center !important;
  padding: 8px 6px !important;
  font-size: 13px !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}
.top-bar img {
  flex: 0 0 40px !important;
}

/* Unified footer bar */
.bee-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 248, 230, 0.80);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
  padding: 10px 16px;
  font-size: 12px;
  color: #5D3A1A;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 100;
}

@media (max-width: 600px) {
  body { padding-top: 120px !important; }
}
