/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: #0f1115;
    color: #fff;
}

/* Login/Signup */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #1c1e26, #111217);
}

.auth-card {
    background: #1f2128;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 90%; /* Make the auth card responsive */
    max-width: 320px; /* Set a maximum width */
}

.auth-card input {
    width: 90%;
    margin: 0.5rem 0;
    padding: 0.6rem;
    border-radius: 8px;
    border: none;
    background: #2b2d36;
    color: #fff;
}

.auth-card input::placeholder {
    color: #aaa;
}

.auth-card button {
    padding: 0.6rem 1rem;
    background: #4e9af1;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.auth-card button:hover {
    background: #3670c0;
}

.link {
    color: #4e9af1;
    cursor: pointer;
    text-decoration: underline;
}

/* Dashboard Professional Layout */
.dashboard-page {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #1f2128;
    padding: 2rem;
    border-radius: 0; /* Remove border-radius for sidebar */
}

.sidebar h2 {
    margin-bottom: 2rem;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.sidebar li:hover {
    background: rgba(78, 154, 241, 0.1);
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.dashboard-summary {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.metric-card {
    flex: 1 1 200px;
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5);
}

.metric-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.metric-info .metric-label {
    font-size: 0.9rem;
    color: #ccc;
}

.metric-info .metric-value {
    font-size: 1.4rem;
    font-weight: bold;
}

/* Card Colors */
.metric-card.blue {
    background: linear-gradient(135deg, #226564, #c036c0);
}

.metric-card.green {
    background: linear-gradient(135deg, #2ecc71, #90a21f);
}

.metric-card.yellow {
    background: linear-gradient(135deg, #f1c40f, #d40d0d);
    color: #000;
}

.metric-card.cyan {
    background: linear-gradient(135deg, #1abc9c, #281592);
}

/* Dashboard Content Layout */
.dashboard-content {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.chart-panel {
    flex: 2 1 500px;
    background: #1f2128;
    padding: 1.2rem;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.history-panel {
    flex: 1 1 250px;
    background: #1f2128;
    padding: 1.2rem;
    border-radius: 15px;
    max-height: 500px;
    overflow-y: auto;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.history-panel ul li {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #2b2d36;
    border-radius: 5px;
    margin-bottom: 0.3rem;
    transition: background 0.2s;
}

.history-panel ul li:hover {
    background: rgba(78, 154, 241, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.summary-cards {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.card {
    flex: 1;
    padding: 1.5rem;
    border-radius: 12px;
    color: #fff;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.card.blue {
    background: #f1e64e;
}

.card.green {
    background: #2e70cc;
}

.card.yellow {
    background: #f10f0f;
    color: #000;
}

.card.cyan {
    background: #911abc;
}

/* Content Grid */
.content-grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.chart-container {
    flex: 2;
    background: #1f2128;
    padding: 1rem;
    border-radius: 12px;
}

.history-container {
    flex: 1;
    background: #1f2128;
    padding: 1rem;
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.history-container h3 {
    margin-bottom: 1rem;
    color: #4e9af1;
}

.history-container ul li {
    padding: 0.3rem 0;
    border-bottom: 1px solid #333;
}

/* Sections */
.section {
    display: block;
}

.back-btn {
    padding: 0.5rem 1rem;
    background: #4e9af1;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 1rem;
}

.back-btn:hover {
    background: #3670c0;
}

/* Live Monitoring */
#live p {
    font-size: 1.2rem;
    margin-top: 1rem;
}

#smog-intensity {
    margin-top: 1rem;
    height: 25px;
    background: #2b2d36;
    border-radius: 12px;
    overflow: hidden;
}

#smog-bar {
    height: 100%;
    width: 0;
    background: #f1c40f;
    transition: width 0.5s;
}

/* Pollution Levels */
#pollution p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

/* Alerts */
#alerts-content p {
    background: #2b2d36;
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

/* Scrollbar */
.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-thumb {
    background: #0b2b50;
    border-radius: 4px;
}

/* Responsive for tablets and phones */
@media (max-width: 1024px) {
    .dashboard-page {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-width: none;
        border-radius: 0; /* Consistent border-radius */
        padding: 1rem; /* Reduced padding for smaller screens */
    }

    .sidebar ul {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
    }

    .sidebar li {
        margin-right: 1rem;
        margin-bottom: 0;
    }

    .dashboard-summary {
        flex-direction: column;
        gap: 1rem;
    }

    .metric-card {
        flex: 1 1 100%;
    }

    .chart-panel,
    .history-panel {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .auth-card {
        width: 90%;
        padding: 1.5rem;
    }
}

@media (max-width: 600px) {
    .main-content {
        padding: 1rem;
    }

    .back-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .auth-card h1 {
        font-size: 1.5rem;
    }
}
/* ===== MOBILE + ELECTRON RESPONSIVE SIDEBAR ===== */
@media (max-width: 768px) {

  .dashboard-page {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    height: auto;
    background: #1f2128;
    z-index: 1000;
  }

  .sidebar ul {
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
  }

  .sidebar h2 {
    display: none;
  }

  .main-content {
    margin-bottom: 70px; /* space for bottom nav */
    padding: 1rem;
  }
}
/* ===== POLLUTION LEVELS PROFESSIONAL BACKGROUND ===== */
#pollution {
  background: linear-gradient(
    135deg,
    rgba(31, 33, 40, 0.95),
    rgba(18, 20, 26, 0.95)
  );
  border-radius: 18px;
  padding: 2rem;
  max-width: 520px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

#pollution h2 {
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  font-weight: 600;
}

#pollution p {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Highlight values */
#pollution span {
  font-weight: bold;
}

/* Mobile optimization */
@media (max-width: 600px) {
  #pollution {
    padding: 1.5rem;
    max-width: 100%;
  }

  #pollution h2 {
    font-size: 1.5rem;
  }

  #pollution p {
    font-size: 1rem;
  }
}
/* ===== LIVE SMOG MONITORING PROFESSIONAL BACKGROUND ===== */
#live {
  background: linear-gradient(
    135deg,
    rgba(31, 33, 40, 0.95),
    rgba(18, 20, 26, 0.95)
  );
  border-radius: 18px;
  padding: 2rem;
  max-width: 100%;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

#live h2 {
  margin-bottom: 1rem;
  font-size: 1.8rem;
  font-weight: 600;
}

#live p {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  font-size: 1.2rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Smog bar container polish */
#smog-intensity {
  margin-top: 1.5rem;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* Smooth bar animation */
#smog-bar {
  height: 100%;
  border-radius: 14px;
  transition: width 0.6s ease, background 0.4s ease;
}

/* Mobile optimization */
@media (max-width: 600px) {
  #live {
    padding: 1.5rem;
  }

  #live h2 {
    font-size: 1.5rem;
  }

  #live p {
    font-size: 1.05rem;
  }
}
/* ===== MOBILE + ELECTRON RESPONSIVE LAYOUT (ADD ONLY) ===== */

.dashboard-page{
  display:flex;
  min-height:100vh;
}

/* Sidebar default */
.sidebar{
  width:260px;
  min-width:260px;
  background:#1c1e26;
  padding:1.5rem 1rem;
}

/* Main content fix */
.main-content{
  min-width:0;
}

/* ---- MOBILE MODE ---- */
@media (max-width:768px){

  .dashboard-page{
    flex-direction:column;
  }

  .sidebar{
    width:100%;
    min-width:100%;
    display:flex;
    flex-direction:column;
    padding:1rem;
  }

  .sidebar h2{
    font-size:1.1rem;
    margin-bottom:.8rem;
  }

  .sidebar ul{
    display:flex;
    overflow-x:auto;
    gap:.5rem;
  }

  .sidebar ul li{
    white-space:nowrap;
    background:#2b2d36;
    padding:.4rem .8rem;
    border-radius:8px;
    font-size:.85rem;
  }

  .main-content{
    padding:1rem;
  }

  .dashboard-summary{
    flex-direction:column;
  }

  .dashboard-content{
    flex-direction:column;
  }

  .chart-panel,
  .history-panel{
    width:100%;
  }
}
/* =====================================================
   SIDEBAR BUTTON DESIGN (GREY–BLACK GRADIENT)
   + MOBILE + ELECTRON RESPONSIVE
   (ADD ONLY – DO NOT REMOVE EXISTING CSS)
===================================================== */

.dashboard-page{
  display:flex;
  min-height:100vh;
}

/* Sidebar base */
.sidebar{
  background:linear-gradient(180deg,#1a1b1f,#0f1115);
}

/* Make the menu look like buttons */
.sidebar ul{
  list-style:none;
  margin-top:1.5rem;
  padding:0;
}

.sidebar ul li{
  margin-bottom:12px;
  padding:12px 14px;
  border-radius:12px;
  cursor:pointer;

  background:linear-gradient(135deg,#2a2b30,#0f1115);
  border:1px solid rgba(255,255,255,0.05);

  color:#ffffff;
  font-weight:500;
  transition:all .25s ease;
}

.sidebar ul li:hover{
  background:linear-gradient(135deg,#3a3b40,#14161b);
  transform:translateX(4px);
}

/* Optional active look (if you later add active class) */
.sidebar ul li.active{
  background:linear-gradient(135deg,#44464c,#1a1c22);
  box-shadow:0 0 0 1px rgba(255,255,255,.08) inset;
}


/* =====================================================
   PHONE / TABLET LAYOUT
===================================================== */

@media (max-width:768px){

  .dashboard-page{
    flex-direction:column;
  }

  .sidebar{
    width:100%;
    padding:12px;
  }

  .sidebar h2{
    font-size:1.1rem;
    margin-bottom:10px;
  }

  /* Turn sidebar buttons into horizontal scroll menu */
  .sidebar ul{
    display:flex;
    flex-direction:row;
    gap:10px;
    overflow-x:auto;
    padding-bottom:6px;
  }

  .sidebar ul li{
    flex:0 0 auto;
    margin-bottom:0;
    white-space:nowrap;
    padding:10px 14px;
    font-size:0.85rem;
    border-radius:10px;
  }

  .main-content{
    padding:1rem;
  }

  .dashboard-content{
    flex-direction:column;
  }

  .chart-panel,
  .history-panel{
    width:100%;
  }
}
/* =====================================================
   SETTINGS + BACK BUTTON
   GREY–BLACK GRADIENT DESIGN
   (ADD ONLY – NO CHANGES TO HTML/JS)
===================================================== */

/* Back button (all sections) */
.back-btn{
  background: linear-gradient(135deg, #2a2b30, #0f1115);
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  font-weight: 500;
  border-radius: 12px;
  padding: 10px 16px;
  transition: all .25s ease;
}

.back-btn:hover{
  background: linear-gradient(135deg, #3a3b40, #14161b);
  transform: translateY(-1px);
}


/* Logout button inside Settings */
#settings button{
  background: linear-gradient(135deg, #2a2b30, #0f1115);
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all .25s ease;
}

#settings button:hover{
  background: linear-gradient(135deg, #3a3b40, #14161b);
  transform: translateY(-1px);
}
