/* ================= GLOBAL RESET ================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
}

img,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

/* ================= BODY ================= */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;

  background: #000000;

  color: white;
}

/* ================= NAVBAR ================= */

header {
  max-width: 2000px;
  margin: 40px auto;

  background: #0f172a;

  border-radius: 35px;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);

  border: 1px solid #1e293b;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 130px;
}

/* .logo {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #38bdf8;
  margin-right: 60px;
} */

.sidebar-logo {
  width: 40%;
  max-width: 180px;
  height: auto;
  margin-bottom: 0 auto 20px auto;
  display: block;
  object-fit: contain;
}

/* Adjust for collapsed sidebar on mobile */
@media (max-width: 1000px) {
  .sidebar-logo {
    display: none;
  }
}

/* NAV LINKS */

.nav-items {
  display: flex;
  align-items: center;
  gap: 60px;
}

nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
}

nav ul li a {
  text-decoration: none;
  color: #cbd5f5;
  font-size: 16px;

  position: relative;

  transition: 0.3s;
}

nav ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;

  width: 0;
  height: 2px;

  background: #38bdf8;

  transition: 0.3s;
}

nav ul li a:hover::after {
  width: 100%;
}

nav ul li a:hover {
  color: #38bdf8;
}

/* SIGN IN BUTTON */

#Sign-In {
  background: #38bdf8;

  border: none;

  padding: 10px 22px;

  border-radius: 25px;

  cursor: pointer;

  font-weight: 600;

  transition: 0.3s;
}

#Sign-In a {
  text-decoration: none;
  color: #020617;
}

#Sign-In:hover {
  background: #0ea5e9;
  transform: scale(1.05);
}

/* HAMBURGER */

.menu-toggle {
  display: none;
  font-size: 26px;
  cursor: pointer;
}


/* USER MENU */

.user-menu {
  position: relative;
  color: #38bdf8;
  font-weight: 600;
  cursor: pointer;
  padding: 10px;
}

/* DROPDOWN */

.dropdown {
  position: absolute;
  top: 100%;
  right: 0;

  background: #020617;
  border: 1px solid #1e293b;

  padding: 10px 20px;
  border-radius: 10px;

  display: none;
}

.dropdown a {
  color: white;
  text-decoration: none;
}

.dropdown a:hover {
  color: #38bdf8;
}

/* SHOW ON HOVER */

.user-menu:hover .dropdown {
  display: block;
}

/* ================= FORGOT PASSWORD & MESSAGES ================= */

.forgot-link {
  display: inline-block;
  margin-top: 15px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  transition: 0.3s;
  cursor: pointer;
  justify-content: center;
}

.forgot-link:hover {
  color: #38bdf8;
  text-decoration: underline;
}

/* Flash Messages (Error/Invalid ID) */
.ForgotPass {
  margin-top: 20px;
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  color: #fca5a5;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  text-align: center;
  animation: shake 0.4s ease-in-out;
}

/* Shake animation for wrong password */
@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-6px);
  }

  50% {
    transform: translateX(6px);
  }

  75% {
    transform: translateX(-6px);
  }
}

/* ================= MAIN ================= */

main {
  flex: 1;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  padding: 40px 20px;

  text-align: center;
}

/* HERO SECTION */

.hero-card {
  max-width: 1200px;

  padding: 100px;

  background: #0f172a;

  border-radius: 25px;

  border: 1px solid #1e293b;

  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);

  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-text h1 {
  font-size: 42px;

  margin-bottom: 20px;

  color: white;
}

main p {
  font-size: clamp(50px, 12vw, 140px);

  font-weight: 900;

  color: #38bdf8;

  margin-bottom: 30px;
}


/* HERO SECTION LAYOUT */

.hero {
  max-width: 1300px;
  margin: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

}

/* LEFT SIDE */

.hero-left {
  flex: 1;
  text-align: left;
}

.hero-left h1 {
  font-size: 56px;
  margin-bottom: 20px;
  line-height: 1.3;
}

/* RIGHT SIDE */

.hero-right {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-right img {
  width: 700px;
  max-width: 100%;
  border-radius: 20px;
}

/* DEMO BUTTON */

.demo-btn {
  display: inline-block;

  background: #38bdf8;
  color: #020617;

  padding: 14px 70px;

  border-radius: 35px;

  font-size: 20px;
  font-weight: 600;

  text-decoration: none;

  transition: 0.3s;
}

.demo-btn i {
  margin-left: 10px;
}

.demo-btn:hover {
  background: #0ea5e9;
  transform: scale(1.05);
}

@media (max-width:900px) {

  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-left {
    text-align: center;
  }

}

/* HERO DESCRIPTION */

.hero-desc {
  margin: 20px 0 30px 0;
}

.hero-subtitle {
  font-size: 20px;
  color: #94a3b8;
  margin-bottom: 5px;
}

#typed-text {
  font-size: 25px;
  font-weight: 600;
  color: #38bdf8;
}

/* blinking cursor */

.typed-cursor {
  font-weight: 700;
  color: #38bdf8;
  animation: blink 1s infinite;
}

/* cursor animation */

@keyframes blink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}


/* ================= LOGIN ================= */

.login {
  background: #0f172a;
  border: 1px solid #1e293b;
  padding: 80px 100px;
  border-radius: 25px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  text-align: center;
}

.login h1 {
  margin-bottom: 25px;
}

/* Force form elements to stack vertically */
.login form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 15px;
}

#ID,
#Password {
  width: 100%;
  max-width: 320px;
  padding: 18px;
  border-radius: 15px;
  border: 1px solid #334155;
  background: #020617;
  color: white;
  font-size: 16px;
}

#submit {
  background: #38bdf8;
  border: none;
  width: auto;
  min-width: 150px;
  padding: 15px 40px;
  border-radius: 30px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.3s;
  display: inline-block;
}

#submit:hover {
  background: #0ea5e9;
  transform: translateY(-2px);
}

/* ================= FORGOT PASSWORD & MESSAGES ================= */

.forgot-link {
  margin-top: 20px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  transition: 0.3s;
}

.forgot-link:hover {
  color: #38bdf8;
  text-decoration: underline;
}


/* ================= IO PANEL ================= */

.io-container {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 50px;

  max-width: 1100px;

  margin: auto;
}

.io-section {
  background: #0f172a;

  border: 1px solid #1e293b;

  padding: 25px;

  border-radius: 20px;
}

.io-section h2 {
  text-align: center;

  margin-bottom: 20px;

  color: #38bdf8;
}

.io-row {
  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 10px;

  margin: 10px 0;

  background: #020617;

  border-radius: 10px;
}

.indicator {
  width: 14px;
  height: 14px;

  border-radius: 50%;

  background: red;

  box-shadow: 0 0 8px red;

  margin-right: 10px;
}

.io-label {
  flex: 1;
  margin-left: 10px;
}

.io-btn {
  background: #38bdf8;

  border: none;

  padding: 6px 14px;

  border-radius: 8px;

  cursor: pointer;

  color: #020617;
}

.io-btn:hover {
  background: #0ea5e9;
}

/* ================= FOOTER ================= */

footer {
  background: #020617;

  padding: 40px 20px;

  margin-top: 60px;

  border-top: 1px solid #1e293b;
}

.footer-container {
  display: flex;

  justify-content: space-between;

  max-width: 1100px;

  margin: auto;

  gap: 30px;

  flex-wrap: wrap;
}

.footer-section h4 {
  margin-bottom: 15px;

  color: #38bdf8;
}

.footer-section ul li {
  list-style: none;

  margin: 6px 0;
}

.footer-section ul li a {
  color: #94a3b8;

  text-decoration: none;

  font-size: 14px;
}

.footer-section ul li a:hover {
  color: #38bdf8;
}

.footer-bottom {
  text-align: center;

  margin-top: 25px;

  font-size: 14px;

  color: #64748b;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {
  nav {
    padding: 15px 25px;
  }

  .nav-items {
    gap: 25px;
  }

  .io-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  nav ul {
    position: absolute;

    top: 80px;

    right: 0;

    width: 100%;

    background: #0f172a;

    flex-direction: column;

    text-align: center;

    display: none;

    padding: 20px;

    border-radius: 0 0 20px 20px;
  }

  nav ul.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

/* ---------------------------------------Dashboard---------------------------------------- */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: #0a0e2a;
  border-right: 1px solid #1f2a44;
  padding: 25px 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.logo-area {
  padding: 0 20px 25px 20px;
  border-bottom: 1px solid #1f2a44;
  margin-bottom: 25px;
}

.logo-area h2 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.machine-id-badge {
  background: #1e2f4b;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  margin-top: 10px;
  display: inline-block;
}

.nav-menu {
  list-style: none;
  padding: 0 15px;
}

.nav-menu li {
  margin-bottom: 8px;
}

.nav-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: #8b9dc3;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s;
}

.nav-menu li a i {
  width: 22px;
  font-size: 1.1rem;
}

.nav-menu li a:hover {
  background: #1e2f4b;
  color: #4facfe;
}

.nav-menu li.active a {
  background: #1e2f4b;
  color: #4facfe;
  border-left: 3px solid #4facfe;
}

.nav-divider {
  height: 1px;
  background: #1f2a44;
  margin: 20px 15px;
}

.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 20px 30px;
  overflow-x: auto;
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logout-btn {
  background: #1e2f4b;
  padding: 8px 20px;
  border-radius: 25px;
  color: #ff6b6b;
  text-decoration: none;
  font-size: 0.85rem;
}

.status-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}

.status-item {
  background: #0a0e2a;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  border: 1px solid #1f2a44;
  transition: 0.3s;
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: 800;
}

.status-item.active {
  background: #1e2f4b;
  border-color: #4facfe;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 12px;
}

.status-dot.idle {
  background: #fbbf24;
}

.status-dot.error {
  background: #ff6b6b;
}

.status-dot.cycle {
  background: #4ade80;
}

.status-dot.pallet {
  background: #a855f7;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}

.stat-card {
  background: #0a0e2a;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  border: 1px solid #1f2a44;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4facfe;
}

.stat-label {
  font-size: 0.7rem;
  color: #8b9dc3;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 25px;
}

.pie-col,
.timer-col {
  background: #0a0e2a;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #1f2a44;
}

.pie-chart-wrapper {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.pie-canvas {
  flex: 2;
  min-width: 180px;
}

.pie-canvas canvas {
  max-height: 200px;
  width: 100%;
}

.pie-legend-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legend-item-right {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background: #0a0e2a;
  border-radius: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.current-state {
  text-align: center;
  margin-top: 15px;
  padding: 10px;
  background: #0a0e2a;
  border-radius: 8px;
}

footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid #1f2a44;
  font-size: 0.7rem;
  margin-top: 20px;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #0a0e2a;
  border-radius: 20px;
  padding: 25px;
  max-width: 500px;
  width: 90%;
  border: 1px solid #4facfe;
}

.settings-btn,
.reset-btn {
  background: #1e2f4b;
  border: none;
  padding: 6px 15px;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  margin-left: 5px;
}

@media (max-width: 1000px) {
  .sidebar {
    width: 80px;
  }

  .sidebar .logo-area h2,
  .sidebar .machine-id-badge,
  .sidebar .nav-menu li a span {
    display: none;
  }

  .sidebar .nav-menu li a {
    justify-content: center;
  }

  .sidebar .nav-menu li a i {
    margin: 0;
  }

  .main-content {
    margin-left: 80px;
  }

  .status-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {

  .status-row,
  .stats-row {
    grid-template-columns: 1fr;
  }
}

body.light-mode {
  background: #f5f7fa;
  color: #1e293b;
}

body.light-mode .sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-right: 1px solid #e2e8f0;
}

body.light-mode .logo-area h2 {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
}

body.light-mode .nav-menu li a {
  color: #475569;
}

body.light-mode .nav-menu li a:hover {
  background: #e2e8f0;
  color: #0891b2;
}

body.light-mode .nav-menu li.active a {
  background: #e2e8f0;
  color: #0891b2;
  border-left-color: #0891b2;
}

body.light-mode .shift-bar,
body.light-mode .status-item,
body.light-mode .stat-card,
body.light-mode .pie-col,
body.light-mode .timer-col {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

body.light-mode .status-item.active {
  background: #e2e8f0;
  border-color: #0891b2;
}

body.light-mode .stat-number {
  color: #0891b2;
}

body.light-mode .current-state {
  background: #f8fafc;
}

body.light-mode footer {
  border-top-color: #e2e8f0;
  color: #64748b;
}

body.light-mode .logout-btn {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

body.light-mode .settings-btn {
  background: #e2e8f0;
  color: #0891b2;
}

.timeline-full {
  background: #0a0e2a;
  border-radius: 14px;
  padding: 15px;
  margin-bottom: 25px;
  border: 1px solid #1f2a44;
}

.timer-bar {
  background: #1e2a3a;
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  margin: 10px 0;
}

.running-section {
  background: #22c55e !important;
  color: #000 !important;
  font-weight: bold !important;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.idle-section {
  background: #eab308 !important;
  color: #000 !important;
  font-weight: bold !important;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.error-section {
  background: #ef4444 !important;
  color: #fff !important;
  font-weight: bold !important;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.offline-section {
  background: #4b5563 !important;
  color: #fff !important;
  font-weight: bold !important;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.timer-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: #8b9dc3;
}

/* Alert System Styles */
.alerts-container {
  background: #0a0e2a;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #1f2a44;
  height: 100%;
}

.alerts-header {
  text-align: center;
  margin-bottom: 15px;
  color: #4facfe;
  font-size: 0.85rem;
}

.alarm-boxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;

}

.alarm-card {
  background: #0a0e2a;
  border-radius: 12px;
  padding: 16px 8px;
  text-align: center;
  border: 2px solid #1f2a44;
  transition: all 0.3s ease;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.alarm-card.active {
  border-color: #ef4444;
  box-shadow: 0 0 15px #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.alarm-card i {
  font-size: 1.8rem;
  margin-bottom: 5px;
  display: block;
}

.alarm-card .alarm-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;

}

.alarm-card .alarm-status {
  font-size: 0.75rem;
  margin-top: 4px;
  font-weight: 600;
}

.active-alarms-list {
  background: #0a0e2a;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 15px;
  max-height: 120px;
  overflow-y: auto;
}

.active-alarm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px solid #1f2a44;
  font-size: 0.7rem;
}

.active-alarm-item:last-child {
  border-bottom: none;
}

.alarm-icon {
  font-size: 0.9rem;
}

.alarm-details {
  flex: 1;
  display: flex;
  gap: 15px;
}

.alarm-name-text {
  font-weight: 600;
  min-width: 70px;
}

.alarm-time {
  color: #8b9dc3;
  min-width: 65px;
}

.alarm-message {
  color: #eef2ff;
}

.no-alarm {
  text-align: center;
  padding: 15px;
  color: #22c55e;
}

.alerts-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 10px;
}

.alert-btn {
  background: #1e2f4b;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  color: white;
  cursor: pointer;
  font-size: 0.7rem;
  transition: 0.2s;
}

.alert-btn:hover {
  background: #2a3f60;
  transform: translateY(-2px);
}

body.light-mode .alerts-container {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light-mode .alarm-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-mode .active-alarms-list {
  background: #f8fafc;
}

body.light-mode .active-alarm-item {
  border-bottom-color: #e2e8f0;
}

body.light-mode .alarm-message {
  color: #1e293b;
}

.pallet-section {
  background: #a855f7 !important;
  color: #fff !important;
  font-weight: bold !important;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

/* Mobile Chart Fixes */
@media (max-width: 768px) {

  #pieChart3D,
  #machineStateChart {
    min-height: 220px !important;
    height: auto !important;
  }

  #efficiencyTrendChart {
    min-height: 160px !important;
    height: auto !important;
    width: 100% !important;
  }

  .pie-canvas {
    min-width: 100% !important;
  }

  .pie-chart-wrapper {
    flex-direction: column !important;
  }

  .pie-legend-right {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
}

/* Force charts to be visible on mobile */
#pieChart3D,
#machineStateChart {
  min-height: 250px !important;
  display: block !important;
  width: 100% !important;
}

.highcharts-container {
  width: 100% !important;
}

/* Remove the terminal-like black bar */
.debug-console,
[class*="debug"] {
  display: none !important;
}


/* ================= TOP HEADER BAR ================= */
.top-header-bar {
  background: #0a0e2a;
  padding: 12px 30px;
  border-bottom: 2px solid #1f2a44;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.all-items {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.all-items>* {
  color: #cbd5f5;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  transition: 0.2s;
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
}

.logo-img {
  height: 55px;
  width: auto;
  border-radius: 8px;
  padding: 0;
}

.machine-id {
  font-size: 1.2rem;
  font-weight: 600;
  color: #4facfe;
  background: #1e2f4b;
  padding: 8px 18px;
  border-radius: 25px;
  letter-spacing: 1px;
}

.all-items a:hover,
.all-items button:hover {
  color: #4facfe;
}

.all-items a.active {
  color: #4facfe;
  position: relative;
}

.all-items a.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #4facfe;
}

.logout-link {
  color: #ff6b6b !important;
}

.logout-link:hover {
  color: #ff8888 !important;
}

.theme-toggle {
  background: #1e2f4b;
  padding: 8px 15px;
  border-radius: 25px;
  font-size: 1.2rem;
}

.theme-toggle:hover {
  background: #2a3f60;
}

/* ================= COMBINED STATUS & STATS CARDS ================= */

.combined-stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}

.combined-card {
  background: #0a0e2a;
  border-radius: 16px;
  padding: 20px 15px;
  text-align: center;
  border: 1px solid #1f2a44;
  transition: all 0.3s ease;
  min-width: 0;
  /* Allow cards to shrink below content width */
}

.combined-card.active {
  border-color: #4facfe;
  box-shadow: 0 0 20px rgba(79, 172, 254, 0.5);
  background: #1a2a4a;
}

/* FIX: Dot and name in same line */
.combined-card .status-dot {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  margin-bottom: 0;
}

.combined-card .combined-name {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.85rem;
  font-weight: 500;
  color: #8b9dc3;
  letter-spacing: 0.5px;
  white-space: nowrap;
  /* Prevent name from wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.combined-card .combined-time {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff, #4facfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 8px;
  white-space: nowrap;
  /* Prevent time from wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Responsive: On smaller screens, make cards more compact */
@media (max-width: 1200px) {
  .combined-stats-row {
    gap: 15px;
  }

  .combined-card {
    padding: 15px 10px;
  }

  .combined-card .combined-name {
    font-size: 0.75rem;
  }

  .combined-card .combined-time {
    font-size: 1.3rem;
  }
}

@media (max-width: 1000px) {
  .combined-stats-row {
    gap: 12px;
  }

  .combined-card {
    padding: 12px 8px;
  }

  .combined-card .combined-name {
    font-size: 0.7rem;
  }

  .combined-card .combined-time {
    font-size: 1.1rem;
  }

  .combined-card .status-dot {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 768px) {
  .combined-stats-row {
    gap: 8px;
    overflow-x: auto;
    /* Allow horizontal scroll on very small screens */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
  }

  .combined-card {
    min-width: 120px;
    /* Fixed minimum width for horizontal scroll */
    padding: 10px 6px;
  }

  .combined-card .combined-name {
    font-size: 0.65rem;
    white-space: normal;
    /* Allow wrapping on mobile if needed */
    line-height: 1.2;
  }

  .combined-card .combined-time {
    font-size: 1rem;
    margin-top: 5px;
  }
}

@media (max-width: 600px) {
  .combined-card {
    min-width: 100px;
    padding: 8px 4px;
  }

  .combined-card .combined-name {
    font-size: 0.6rem;
  }

  .combined-card .combined-time {
    font-size: 0.9rem;
  }
}

/*-----------------------------------------------Analytics------------------------------------------------  */


.dashboard-container {
  max-width: 1800px;
  margin: 0 auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 600;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logout-btn {
  background: #1e2a3a;
  padding: 8px 20px;
  border-radius: 40px;
  text-decoration: none;
  color: #ff6b6b;
  font-weight: 500;
  transition: 0.2s;
  border: 1px solid #ff6b6b40;
}

.logout-btn:hover {
  background: #ff6b6b20;
}

.filter-bar {
  background: #111827;
  border-radius: 24px;
  padding: 20px 24px;
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  border: 1px solid #1f2a3e;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8b9dc3;
}

input[type="date"] {
  background: #0f172a;
  border: 1px solid #2d3a5e;
  padding: 10px 14px;
  border-radius: 16px;
  color: white;
  font-family: inherit;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(100);
    
}

button,
.quick-btn {
  background: #1e2f4b;
  border: none;
  padding: 10px 20px;
  border-radius: 40px;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

button:hover,
.quick-btn:hover {
  background: #2a3f60;
  transform: translateY(-2px);
}

.quick-btn.filter-active {
  background: #4facfe !important;
  color: #0a0f1c !important;
  box-shadow: 0 0 12px rgba(79, 172, 254, 0.6);
  border: 1px solid rgba(79, 172, 254, 0.8);
}

body.light-mode .quick-btn.filter-active {
  background: #0891b2 !important;
  color: white !important;
  box-shadow: 0 0 12px rgba(8, 145, 178, 0.6);
  border: 1px solid rgba(8, 145, 178, 0.8);
}

.quick-range {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.download-btn {
  background: #0f2b3d;
  padding: 10px 18px;
  border-radius: 40px;
  color: #88ddff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
  border: none;
}

/* .kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 40px;
} */

.kpi-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 20px;
  margin-bottom: 40px;
  width: 100%;
}

.kpi-card {
  flex: 1;
  min-width: 0;
  background: #0f172ad9;
  backdrop-filter: blur(4px);
  border-radius: 28px;
  padding: 20px 18px;
  border: 1px solid #2d3a5e;
  transition: all 0.2s;
}


.kpi-card:hover {
  transform: translateY(-4px);
  border-color: #4facfe;
  background: #0f1a2f;
}

.kpi-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9bb5e0;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 12px;
  background: linear-gradient(135deg, #fff, #88aaff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 1px;
  word-break: break-word;
}

.efficiency-badge {
  font-size: 0.75rem;
  margin-top: 8px;
  background: rgba(79, 172, 254, 0.2);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 40px;
  color: #4facfe;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.chart-card {
  background: #0a0f1c;
  border-radius: 32px;
  padding: 20px 16px 12px 16px;
  border: 1px solid #1f2a44;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s;
}

.chart-card:hover {
  border-color: #3a4c7a;
}

.chart-card h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 20px;
  padding-left: 8px;
  border-left: 4px solid #4facfe;
}


.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  background: #1e2f4b;
  padding: 20px 30px;
  border-radius: 50px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 1.2rem;
}

body.light-mode .loading-spinner {
  background: #ffffff;
  color: #0891b2;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* When screen is too small, allow wrapping or scroll */
@media (max-width: 1200px) {
  .kpi-grid {
    flex-wrap: wrap;
  }

  .kpi-card {
    flex: 1 1 calc(33.33% - 20px);
    min-width: 180px;
  }
}

@media (max-width: 768px) {
  .kpi-card {
    flex: 1 1 calc(50% - 20px);
    min-width: 160px;
  }
}

@media (max-width: 550px) {
  .kpi-card {
    flex: 1 1 100%;
  }
}


body.light-mode {
  background: #f5f7fa;
  color: #1e293b;
}

body.light-mode .header h1 {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
}

body.light-mode .filter-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

body.light-mode .kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

body.light-mode .kpi-card:hover {
  border-color: #0891b2;
  background: #fefefe;
}

body.light-mode .kpi-value {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
}

body.light-mode .chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

body.light-mode .chart-card h3 {
  border-left-color: #0891b2;
}

body.light-mode .quick-btn {
  background: #e2e8f0;
  color: #1e293b;
}

body.light-mode .quick-btn:hover {
  background: #cbd5e1;
}

body.light-mode .download-btn {
  background: #0891b2;
  color: white;
}

body.light-mode .logout-btn {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

body.light-mode .footer {
  border-top-color: #e2e8f0;
  color: #64748b;
}


body.light-mode .dashboard-btn {
  background: #0891b2 !important;
  color: white !important;
}

/* Analytics Page Full Width - Remove Sidebar Space */
/* body.analytics-page .app-wrapper {
  display: block;
}

body.analytics-page .sidebar {
  display: none;
}

body.analytics-page .main-content {
  margin-left: 0;
  padding: 0;
  width: 100%;
} */

body.analytics-page .dashboard-container {
  max-width: 100%;
  padding: 20px 30px;
  margin: 0;
}


.emission-section {
  background-color: #4facfe;
  height: 100%;
  transition: all 0.3s ease;
}

.emission-section:hover {
  background-color: #2d8fe0;
  transform: scaleY(1.2);
}

/* OVERRIDE - Force sidebar to show on analytics page */
body.analytics-page .sidebar {
  display: block !important;
}

body.analytics-page .app-wrapper {
  display: flex !important;
}

body.analytics-page .main-content {
  margin-left: 280px;
  /* Sidebar width ithe pass kar */
  width: auto;
}

/* FIX - Main content not behind sidebar */
body.analytics-page {
  overflow-x: hidden;
}

body.analytics-page .app-wrapper {
  display: flex !important;
}

body.analytics-page .sidebar {
  display: block !important;
  width: 280px !important;
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  height: 100vh !important;
  z-index: 100 !important;
}

body.analytics-page .dashboard-container {
  margin-left: 280px !important;
  width: calc(100% - 280px) !important;
  padding: 20px 30px !important;
}

body.analytics-page .main-content {
  margin-left: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}


/* ================= DROPDOWN FOR ANALYTICS PAGE ================= */
.quick-range .range-dropdown {
  position: relative;
  display: inline-block;
}

.quick-range .range-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #1e293b;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  min-width: 120px;
  z-index: 9999;
  display: none;
  margin-top: 5px;
  overflow: hidden;
  border: 1px solid #2d3a5e;
}

.quick-range .range-dropdown-menu.show {
  display: block !important;
}

.quick-range .range-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 20px;
  background: none;
  border: none;
  color: #eef2ff;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
}

.quick-range .range-dropdown-item:hover {
  background: #334155;
}

.quick-range .range-dropdown-item.filter-active {
  background: #4facfe !important;
  color: #0a0f1c !important;
  box-shadow: 0 0 12px rgba(79, 172, 254, 0.6);
}

.quick-range .range-dropdown-toggle i {
  margin-left: 8px;
  font-size: 12px;
}

/* Light mode styles for dropdown */
body.light-mode .quick-range .range-dropdown-menu {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body.light-mode .quick-range .range-dropdown-item {
  color: #1e293b;
}

body.light-mode .quick-range .range-dropdown-item:hover {
  background: #e2e8f0;
}

body.light-mode .quick-range .range-dropdown-item.filter-active {
  background: #0891b2 !important;
  color: white !important;
  box-shadow: 0 0 12px rgba(8, 145, 178, 0.6);
}

/* Make dropdown button glow when active */
.range-dropdown-toggle.filter-active {
  background: #4facfe !important;
  color: #0a0f1c !important;
  box-shadow: 0 0 12px rgba(79, 172, 254, 0.6);
  border: 1px solid rgba(79, 172, 254, 0.8);
}

body.light-mode .range-dropdown-toggle.filter-active {
  background: #0891b2 !important;
  color: white !important;
  box-shadow: 0 0 12px rgba(8, 145, 178, 0.6);
}

/* Apply button glow when active */
#applyBtn.filter-active {
  background: #4facfe !important;
  color: #0a0f1c !important;
  box-shadow: 0 0 12px rgba(79, 172, 254, 0.6);
  border: 1px solid rgba(79, 172, 254, 0.8);
}

body.light-mode #applyBtn.filter-active {
  background: #0891b2 !important;
  color: white !important;
  box-shadow: 0 0 12px rgba(8, 145, 178, 0.6);
}

/* ================= UNIFIED PAGE STYLES (No duplicate sidebar) ================= */

/* Settings Page Styles */
.settings-container {
  max-width: 600px;
  margin: 40px auto;
  padding: 40px;
  background: #0f172a;
  border-radius: 24px;
  border: 1px solid #1f2a44;
  text-align: center;
}

.settings-container h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.settings-container>p {
  color: #8b9dc3;
  margin-bottom: 40px;
}

.setting-card {
  background: #0a0f1c;
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  border: 1px solid #1f2a44;
  text-align: left;
}

.setting-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #4facfe;
}

.setting-description {
  font-size: 0.8rem;
  color: #8b9dc3;
  margin-bottom: 20px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.setting-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-info i {
  font-size: 1.3rem;
  color: #4facfe;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
}

.toggle-input {
  display: none;
}

.toggle-label {
  display: block;
  width: 50px;
  height: 26px;
  background: #1e2f4b;
  border-radius: 30px;
  cursor: pointer;
  position: relative;
  transition: 0.3s;
}

.toggle-ball {
  position: absolute;
  width: 22px;
  height: 22px;
  background: #8b9dc3;
  border-radius: 50%;
  top: 2px;
  left: 3px;
  transition: 0.3s;
}

.toggle-input:checked+.toggle-label {
  background: #4facfe;
}

.toggle-input:checked+.toggle-label .toggle-ball {
  transform: translateX(24px);
  background: white;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #1e2f4b;
  border: none;
  padding: 12px 30px;
  border-radius: 40px;
  color: white;
  text-decoration: none;
  font-weight: 500;
  margin-top: 20px;
  transition: 0.3s;
  cursor: pointer;
}

.back-btn:hover {
  background: #2a3f60;
  transform: translateY(-2px);
}

/* QR Page Styles */
.qr-container {
  max-width: 500px;
  width: 100%;
  background: #0f172a;
  border-radius: 32px;
  padding: 40px 30px;
  text-align: center;
  border: 1px solid #1f2a44;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.qr-header {
  margin-bottom: 30px;
}

.qr-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}

.qr-header p {
  color: #8b9dc3;
  font-size: 0.85rem;
}

.qr-code-wrapper {
  background: white;
  padding: 20px;
  border-radius: 20px;
  display: inline-block;
  margin: 20px 0;
}

.qr-code {
  width: 250px;
  height: 250px;
  display: block;
}

.url-container {
  background: #0a0f1c;
  border-radius: 16px;
  padding: 15px;
  margin: 20px 0;
  border: 1px solid #1f2a44;
}

.url-label {
  font-size: 0.7rem;
  color: #8b9dc3;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.url-value {
  font-size: 0.8rem;
  color: #4facfe;
  word-break: break-all;
  font-family: monospace;
}

.instruction {
  background: rgba(79, 172, 254, 0.1);
  border-radius: 12px;
  padding: 12px;
  margin: 15px 0;
  font-size: 0.75rem;
  color: #8b9dc3;
}

.button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 24px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

.btn-primary {
  background: #4facfe;
  color: #0a0f1c;
}

.btn-secondary {
  background: #1e2f4b;
  color: #eef2ff;
}

.btn-danger {
  background: #ff6b6b;
  color: #0a0f1c;
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  color: #8b9dc3;
  text-decoration: none;
  font-size: 0.8rem;
}

.back-link:hover {
  color: #4facfe;
}

/* Contact Page Styles */
.content-panel {
  background: #0f172a;
  border-radius: 16px;
  padding: 25px;
  border: 1px solid #1f2a44;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.contact-info-section,
.contact-form-section {
  background: #0a0f1c;
  border-radius: 16px;
  padding: 25px;
  border: 1px solid #1f2a44;
}

.contact-info-section h3,
.contact-form-section h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #4facfe;
}

.contact-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding: 12px;
  background: #0f172a;
  border-radius: 12px;
  transition: all 0.2s;
}

.contact-item:hover {
  transform: translateX(5px);
  background: #1a2335;
}

.contact-icon {
  width: 45px;
  height: 45px;
  background: #1e2f4b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #4facfe;
}

.contact-details strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 5px;
}

.contact-details a {
  color: #4facfe;
  text-decoration: none;
  font-size: 0.8rem;
}

.contact-sub {
  font-size: 0.65rem;
  color: #8b9dc3;
  display: block;
  margin-top: 4px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  margin-bottom: 6px;
  color: #8b9dc3;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background: #0f172a;
  border: 1px solid #1f2a44;
  border-radius: 8px;
  color: #eef2ff;
}

.submit-btn {
  width: 100%;
  background: #4facfe;
  border: none;
  padding: 12px;
  border-radius: 40px;
  color: #0a0f1c;
  font-weight: 600;
  cursor: pointer;
}

.business-hours {
  background: #0a0f1c;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #1f2a44;
  margin-top: 20px;
}

.hours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.hour-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #1f2a44;
}

.map-container {
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 300px;
  border: none;
}

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #22c55e;
  color: #0a0f1c;
  padding: 12px 24px;
  border-radius: 40px;
  z-index: 1000;
}

/* Help Center Page Styles */
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.help-card {
  background: #0a0f1c;
  border: 1px solid #1f2a44;
  border-radius: 20px;
  padding: 30px 25px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.help-card:hover {
  transform: translateY(-5px);
  border-color: #4facfe;
  background: #1a2335;
}

.help-card i {
  font-size: 3rem;
  color: #4facfe;
  margin-bottom: 20px;
  display: block;
}

.help-card h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #eef2ff;
}

.help-card p {
  font-size: 0.85rem;
  color: #8b9dc3;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #0f172a;
  border-radius: 20px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  border: 1px solid #4facfe;
}

.close-modal {
  background: #4facfe;
  border: none;
  padding: 10px 25px;
  border-radius: 8px;
  color: #0a0f1c;
  cursor: pointer;
}

/* Light mode overrides */
body.light-mode .settings-container,
body.light-mode .qr-container,
body.light-mode .content-panel,
body.light-mode .contact-info-section,
body.light-mode .contact-form-section,
body.light-mode .business-hours,
body.light-mode .help-card,
body.light-mode .modal-content {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light-mode .setting-card,
body.light-mode .contact-item,
body.light-mode .form-group input,
body.light-mode .url-container {
  background: #f8fafc;
}

body.light-mode .help-card h4 {
  color: #1e293b;
}

body.light-mode .btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

/* Responsive */
@media (max-width: 900px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}
