/* --- DEFAULT DESKTOP (Unchanged behavior) --- */
body {
    font-family: arial;
    margin: 0px !Important;
}
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: border-box;
}

@media only screen and (min-width: 768px) {
  html, body {
    overflow-x: visible !important;
    width: 100% !important;
  }
  body {
    min-width: auto !important;
    width: auto !important;
  }
  .container {
    width: 100% !important;
    min-width: auto !important;
  }
}

/* 1366px (and close range) */
@media (min-width: 1281px) and (max-width: 1366px) {
  html {
    overflow-x: hidden !important;
  }

  body {
    transform: scale(0.8);
    transform-origin: top left;
    width: 125% !important;
    height: 0;
  }
}

/* 1440px (and close range) */
@media (min-width: 1367px) and (max-width: 1550px) {
  html {
    overflow-x: hidden !important;
  }

  body {
    transform: scale(0.9);
    transform-origin: top left;
    width: 111.11% !important; /* 1 / 0.9 */
    height: 0;
  }
  .live-box {height: 50vh !important}
  
}
/* 1600px (and close range) */
@media (min-width: 1551px) and (max-width: 1620px) {
  html {
    overflow-x: hidden !important;
  }

  body {
    transform: scale(0.95);
    transform-origin: top left;
    width: 105.26% !important; /* 1 / 0.95 */
    height: 0;
  }
}



/* --- MOBILE ONLY (Strict 1920px + Scroll) --- */
@media only screen and (max-width: 1220px) {
  
  /* 1. Force Root Elements to Allow Scroll */
  html {
    overflow-x: scroll !important; /* Forces scrollbar even if content fits (optional, but ensures mechanism is active) */
    overflow-y: visible !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch; /* Enables smooth scrolling on iOS */
  }

  body {
    margin: 0 !important;
    padding: 0 !important;
    /* 2. Force the fixed width that exceeds the screen */
    width: 1920px !important;
    min-width: 1920px !important;
    max-width: none !important;
    
    /* 3. Critical: Ensure body doesn't clip its own children */
    overflow-x: visible !important; 
    
    /* Prevent mobile browsers from zooming out to fit 1920px */
    -webkit-text-size-adjust: none; 
    -moz-text-size-adjust: none;
    text-size-adjust: none;
  }

  .container {
    width: 1920px !important;
    min-width: 1920px !important;
    max-width: none !important;
    margin: 0 auto; /* Center if needed, or 0 if you want left aligned */
    display: block !important; /* Ensure it acts as a block */
  }
  
  /* 4. Safety Net: Check for any internal divs that might be clipping */
  .header-section, .menu-links, .habit-task-links {
    max-width: none !important;
    width: auto !important;
  }
}

.header-section {
  position: static;
  width: 100%;
  background: #0079bf;
  color: white;
  font-size: 14px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 10px 10px;
}

.month-picker {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: 10px;
}

.month-picker input {
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
  width: 100px;
  text-align: center;
}

.arrow-button {
  padding: 5px 10px;
  background: #005fa3;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}

.arrow-button:hover {
  background: #004a80;
}

.month-picker input:focus {
  outline: 2px solid #004a80;
}

/* Menu Container */
.menu-links {
  margin-left: auto;
  margin-right: 10px;
}

.habit-task-links {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
}

/* General Link Styles */
.habit-task-links a {
padding-top: 4px;
  color: white;
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 3px;
  background-color: #004a80;
  font-size: 13px;
  transition: background 0.2s;
}

.habit-task-links a:hover {
  background-color: #003760;
}

/* Span Styles (Labels) */
.habit-task-links span {
  color: white;
  min-width: 40px;
  cursor: default;
  padding-top: 4px;
}

/* --- DROPDOWN SPECIFIC STYLES --- */

/* 1. Make the dropdown wider */
.dropdown-content {
    min-width: 160px; /* Adjust this value to make it wider */
}

/* 2. Fix the flickering issue */
/* This creates an invisible bridge so the mouse doesn't "leave" the element while moving down */
.dropdown::after {
    content: "";
    display: block;
    height: 10px; /* Height of the invisible bridge */
    width: 100%;
    position: absolute;
    bottom: -10px; /* Pushes it right below the button */
    left: 0;
}

.dropdown {
  position: relative;
  display: inline-block;
}

/* The button that triggers the dropdown (The SM/JI/AB label) */
.dropbtn {
  background-color: #004a80;
  color: white;
  padding: 3px 10px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  border-radius: 3px;
  display: inline-block;
}

.dropbtn:hover {
  background-color: #003760;
}

/* The Hidden Content */
.dropdown-content {
  display: none; /* Hidden by default */
  position: absolute;
  background-color: #0079bf; /* Match header bg */
  min-width: 120px !important;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1000;
  border-radius: 4px;
  top: 100%; /* Position directly below */
  left: 0;
  margin-top: 2px;
  padding: 4px 0;
}

/* Links inside the dropdown */
.dropdown-content a {
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  display: block;
  background-color: transparent; /* Remove individual button bg inside dropdown */
  text-align: left;
  border-radius: 0;
  font-weight: normal;
}

.dropdown-content a:hover {
  background-color: #005fa3; /* Highlight on hover */
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
  display: block;
}