/*hub tab*/
.tabradio2{
    display: none;
}
:root:has(.tabradio2:checked) .tabcontent2 {
    grid-area: bottom;
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.tabradio2:checked+.tablable2{
     width: 70px;
    height: 70px;
     color: #ffffff;
    border: 1px solid #274dfe;
    background-color: #274dfe;
    border-radius: 5px;
    margin: 5px;
    padding: 2px;
    
}
.tablable2{
     display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 3;
      color: #274dfe;
    transition: all 0.2s ease;
    background-color: #ffffff;
    border-radius: 5px;
    margin: 5px;
    padding: 2px;
    height: 60px;
   width: 60px;
    
 
   
}
.tabcontent2 {
    display: none;
    padding: 0;
    grid-column: 2;
    grid-row: 1/4;
    background-color: #F3F4F6;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.hub{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    grid-area: top;
    background-color: #ffffff;
}
.hub h1{
    color: #274dfe;
}
.stats{
    grid-area: center;
    display: grid;
    grid-template-rows:auto auto auto ;
    grid-template-areas: "top"
    "middle"
    "bottom"
    ;
    overflow-y:scroll;
    gap:10px;
    padding: 5px;
}
.buttons{
    grid-area: top;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-areas: "first second third fourth";

}
.hubButton1{
    background-color: white;
    margin: 5px;
    grid-area: first ;
    border: 1px solid black;
   display: block;
    border-radius: 10px;
}
#toggle1:checked + button .hubButton1Span{
    display: none;
}
.commandPage{
     display: none;
  width: 100%; height: 100%;
overflow-y: auto;
}

.hubcommands{
    border: 1px solid white;
    background-color: white;
    width: 25%;
    height: auto;
    border-radius: 5px;
    margin: 7px;
}
.hubcommands button{
    display: block;
    border: none;
    width: 100%;
    border-bottom: 1px solid grey;
    margin-top: 10px;
    font-size: large;
     background: none;  
     padding: 0; 
     font: inherit;          /* inherit font from parent */
  color: inherit;         /* inherit text color */
  cursor: pointer; 
}
.hubButton2{
    background-color: white;
    margin: 5px;
    grid-area: second;
     border: 1px solid black;
    display: block;
     border-radius: 10px;
}
#toggle2:checked + button .hubButton2Span{
    display: none;
}
.parkingPage{
     display: none;
  top: 0; left: 0;
  width: 100%; height: 100%;

}


.hubButton3{
    background-color: white;
    margin: 5px;
    grid-area: third ;
     border: 1px solid black;
    display: block;
     border-radius: 10px;
}
#toggle3:checked + button .hubButton3Span{
    display: none;
}
.alertPage{
     display: none;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.hubButton4{
    background-color: white;
    margin: 5px;
    border-radius: 10px;
    grid-area: fourth ;
     border: 1px solid black;
    display: block;
}
#toggle4:checked + button .hubButton4Span{
    display: none;
}
.geoPage{
     display: none;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.geoPageDiv{
    
    width: 100vw;
    height: 100%;
    background-color:#F3F4F6;
    padding: 5px;
    display: grid;
    grid-template-columns: 20% 80%;
    grid-template-rows: 70% 30%;
    grid-template-areas: 
    "left center"
    "left bottom"
    ;
}
.div1{
    grid-area: left;
    background-color: white;
}
.div2{
    display: block;
    grid-area: center;
    background-color: white;
    width: 100%;

}
.div3{
    grid-area: bottom;
     min-width: 100%;
    min-height: 100%;
    background-color: #274dfe;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas: "top top top end"
    "left center middle right";
    place-items: center;
}
.div3 h3{
    grid-area: top;
    color: white;
}
.Input0{
    grid-area: left;
    height: 30px;
    width: 200px;
    border-radius: 5px;
    border: 1px solid white;
    padding: 3px;
    margin-bottom: 5px;
}
.Input1{
    grid-area: center;
    height: 30px;
    width: 200px;
    border-radius: 5px;
    border: 1px solid white;
    padding: 3px;
    margin-bottom: 5px;
}
.Input2{
    grid-area: middle;
     height: 30px;
     width: 200px;
    border-radius: 5px;
    border: 1px solid white;
     padding: 3px;
     margin-bottom: 5px;
}
.Input3{
    grid-area: right;
     height: 30px;
     width: 200px;
    border-radius: 5px;
    border: 1px solid white;
     padding: 3px;
     margin-bottom: 5px;
}
.div3 button{
    grid-area: end;
    display: inline;
    background-color: white;
    color: #274dfe;
    height: 30px;
     width: 125px;
    border-radius: 5px;
    border: 1px solid white;
}


.mileage{
    display: none;
    height: 100%;
    background-color: #F3F4F6;
    padding:20px
}
.mileageGraph{
    padding: 5px;
    border-radius: 10px;
    background-color: white;
    align-items:center;
    height: 70%;
}

.speedGraph{
    display: none;
    border-radius: 10px;
    border-radius: 10px;
    background-color:#F3F4F6;
    align-items:center;
    height: auto;
    overflow-y: scroll;
    margin: 5px;
}
.accGraph{
    margin: 5px;
    display: none;
    height: auto;
    background-color:#F3F4F6;
    border-radius: 10px;
     align-items: center;
     overflow-y: scroll;
}

.hublist{
    grid-area: left;
    background-color: white;
    border-radius: 5px;
    margin: 5px;
    height: 100%;
    overflow-y: auto;
}

/* Container holding each car row */
.hublist_item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 8px;
  background-color: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

/* Hover state for rows */
 .hublist_item:hover { 
            border-color: #007bff;
             background: #f1f7ff; 
             cursor: pointer;
            }
/* Vehicle Car Image styling */
.hublist_item .image {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-right: 16px; /* Creates clean space between car and text */
}

/* Text wrapper to stack ID and timestamp */
.tracker-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Main tracking identifier text */
.tracker-name {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a; /* Sharp slate color */
}

/* Subtle, cleaner timestamp styling */
.tracker-time {
  font-size: 12px;
  color: #64748b; /* Cool gray */
}
.hublist_item.moving .status {
    color: #ffffff;
  background-color: lime;
}

.hublist_item.parked .status {
    color: #ffffff;
  background-color: red;
}
.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-online{
    background-color: #dcfce7;
    color:#15803d;
}
.badge-offline{
    background-color: #f1f5f9;
    color:#64748b;
}
.hublist_item.tapped_list_item{
            border-color: #007bff;
             border-width: 2px; 
             background: #e7f1ff; 
    border-radius: 5px;
    color: white;
    font-size: larger;
}
.hublist h2{
    margin: 5px;
color: #274dfe ;
font-size: medium;
}
  .icon-style {
    margin: 5px;
               /* size of the icon */
      color: white;             /* icon color */
      background-color:#274dfe;   /* background color */
      border: 0.5px solid #274dfe;  /* border around the icon */
      border-radius: 8px;       /* rounded corners */
      padding: 10px;            /* spacing inside the border */
    }
.alertListArea button{
    display: inline;
}
.alertListArea{
    border: 1px solid white;
    background-color: white;
    width: 100%;
    height: 100%;
    border-radius: 5px;
    margin: 7px;
    
}
.ParkingListArea {
    border: 1px solid white;
    background-color: white;
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 0;
}
.ParkingListArea button{
    display: inline;
}
#parkingTable{
    display: table;
    width: 100%;
    border: 1px solid black;
}
#alarmTable{
    display: table;
    width: 100%;
    border: 1px solid black;
}
.p1 {
    display: none;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.p1.is-active {
    display: flex;
    flex-direction: column;
}
.RoutePage{
     display:grid;
  width: 100%; height: 100%; 
  padding: 5px; 
    grid-template-rows: 80% 20%;
    grid-template-areas: 
    "top"
    "bottom"
    ;
    overflow-y: scroll;
     background-color:#F3F4F6;
}
.routeMap {
    grid-area: top;
    display: block;
    background-color: white;
    width: 100%;
    flex: 1 1 auto;
    min-height: 280px;
}

.routeDiv {
    grid-area: bottom;
    flex-shrink: 0;
    overflow-y: auto;
    max-height: 40%;
}

.features {
    padding: 5px;
     grid-column: 2;
    display: grid;
    grid-template-rows: 1.5fr 0.5fr;
    grid-template-areas: "top"
    "bottom";
     gap: 5px;
     overflow-y: scroll;
}

.best_route{
     /* Explicitly place in second row */
    grid-area: bottom;
    display: flex;
    align-items: center; /* Vertical center */
    justify-content: center; /* Horizontal center */
padding-bottom: 15px;
    border-top: 1px solid #ddd;
    padding: 5px;
    
}
/* 4. Style the label to look like a button */
.route_Laabel {
     display: block;
    background-color: #007bff;
    color: white;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    padding: 10px;
}
.space {
    grid-area: top;
    display: flex;
    flex-direction: row; /* Align items horizontally */
    gap: 5px;
    
    /* Horizontal scroll settings */
    overflow-x: auto; 
    overflow-y: hidden;
    white-space: nowrap; 
    
    /* Ensure items don't shrink */
    align-items: center; 
}

.space > * {
    flex: 1; /* Forces all items to grow and shrink equally to fill the width */
    min-width: 0; /* Prevents items from bulging out of the flex container */
    height: 100%; /* Ensures they fill the vertical 80% area */
}

/* Optional: Style the scrollbar for a cleaner look */
.space::-webkit-scrollbar {
    height: 6px;
}
.space::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
/*end of hub tab*/

#map4 {
    flex: 1 1 auto;
    width: 100%;
    min-height: 280px;
    z-index: 1;
}

.control-group {
             padding: 20px; 
             background: white; 
             border-bottom: 1px solid #dee2e6;
             }
       #search-form input, #search-form button { 
            width: 100%; 
            padding: 12px; 
            margin-top: 8px; 
            box-sizing: border-box; 
            border: 1px solid #ced4da; 
            border-radius: 4px; 
            font-size: 14px; 
        }
        #search-form button { 
            display: block;
            background: #28a745;
             color: white; 
             border: none; 
             cursor: pointer; 
             font-weight: bold;
             }
        #search-form button:hover { 
            background: #218838; 
        }
        .content-area { 
            flex-grow: 1; 
            overflow-y: auto; 
            padding: 20px; }
        .route-tab { 
            background: white; 
            border: 1px solid #dee2e6; 
            padding: 12px; 
            border-radius: 6px; 
            margin-bottom: 10px;
             cursor: pointer; 
             transition: all 0.2s; 
            }
        .route-tab:hover { 
            border-color: #007bff;
             background: #f1f7ff; 
            }
        .route-tab.active { 
            border-color: #007bff;
             border-width: 2px; 
             background: #e7f1ff; 
            }
        .route-title {
             font-weight: bold;
              color: #333; 
              margin-bottom: 5px; 
            }
        .route-meta { 
            font-size: 13px; 
            color: #666; 
        }
        .steps-container { 
            margin-top: 15px; 
            border-top: 1px dashed #ccc; 
            padding-top: 10px; 
            display: none; 
        }
        .route-tab.active .steps-container {
             display: block;
             }
        .step-item { 
            font-size: 13px; 
            padding: 6px 0; 
            color: #495057; 
            border-bottom: 1px solid #f1f3f5; 
        }
        .step-item:last-child {
             border-bottom: none; 
            }
        #status { font-size: 13px; 
            color: #6c757d; 
            font-style: italic;
         }

         .suggestion-item:hover {
    background-color: #f0f0f0;
}
#suggestions-list {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    
}

.metric-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  align-items: center;
  height: 100px;
}
.metric-card2 {
    height: 100px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  align-items: center;
}
.device-label {
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.speed-display-container {
  margin-bottom: 2px;
}

.speed-value {
  font-size: 32px;
  font-weight: 700;
  color: #1a202c;
}

.speed-unit {
  font-size: 16px;
  font-weight: 500;
  color: #718096;
  margin-left: 4px;
}

.period-badge {
  display: inline-block;
  background-color: #ebf8ff;
  color: #2b6cb0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 9999px;
}


/* Theme Variables */
:root {
  --bg-color: #ffffff;
  --text-color: #0f0f0f;
  --hover-color: #f2f2f2;
  --active-color: #e5e5e5;
  --sidebar-width: 240px;
}

[data-theme="dark"] {
  --bg-color: #0f0f0f;
  --text-color: #f1f1f1;
  --hover-color: #272727;
  --active-color: #3d3d3d;
}

/* Sidebar Container */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  padding: 12px;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  transition: background-color 0.3s, color 0.3s;
  overflow-y: auto;
}

/* Header Elements */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 12px 16px 12px;
}

.menu-btn {
  background: none;
  border: none;
  color: inherit;
  font-size: 20px;
  cursor: pointer;
}

.logo {
  font-weight: bold;
  font-size: 18px;
}

/* Navigation Links Layout */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.nav-item {
    background-color: inherit;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  transition: background 0.2s;
  cursor: pointer;
}

.nav-item:hover {
  background-color: var(--hover-color);
}

.sidebar-nav input:checked + .nav-item {
  background-color: var(--active-color);
  font-weight: 600;
}

.active {
  background-color: var(--active-color);
  font-weight: 500;
  display: block;
}

.divider {
  border: none;
  border-top: 1px solid var(--hover-color);
  margin: 12px 0;
}

/* Bottom Toggle Switch */
.sidebar-footer {
  padding: 12px;
  display: flex;
  justify-content: center;
}

.theme-toggle {
  background-color: var(--hover-color);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-size: 18px;
}



/* Ensure sidebar has fixed structural width */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  flex-shrink: 0; /* Prevents sidebar from squeezing */
}

/* Right Side Content Container */
.main-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 16px 20px;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

:root:has(#CommandPage:checked) .commandPage {
    display: block;
}

#car-choice {
    margin: 5px;
}
.kk {
    background-color: white;
    border-radius: 10px;
    margin: 0;
    padding: 16px;
    width: 100%;
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}
/* Container styling */
.table-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
  height: auto;
  box-sizing: border-box;
}

/* Header & Controls */
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.table-header h3 {
  margin: 0;
  color: #1e293b;
  font-size: 1.25rem;
}

.btn-fetch {
  display: block;
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-fetch:hover {
  background-color: #1d4ed8;
}

/* Table Architecture */
.table-wrapper {
  overflow-x: auto;
  height: auto;
}

.log-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.log-table th {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 600;
  padding: 14px 16px;
  border-bottom: 2px solid #e2e8f0;
}

.log-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
}

/* Row Interactions */
.log-table tbody tr:hover {
  background-color: #f8fafc;
}

.mono-text {
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
}

/* Visual Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background-color: #dcfce7;
  color: #15803d;
}

.badge-warning {
  background-color: #fef3c7;
  color: #b45309;
}

/* Inline Actions */
.text-right {
  text-align: right;
}

.btn-action {
  background: none;
  border: 1px solid #cbd5e1;
  color: #64748b;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-action:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}
/* Filter Bar Layout */
.filter-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.searchForm,
.search-form {
  display: flex;
  gap: 8px;
  flex-grow: 1;
  flex-wrap: wrap;
  align-items: center;
  max-width: 100%;
}
.input-plate {
  flex-grow: 1;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
}

.input-plate:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.btn-submit {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
}

.icon {
  display: inline-flex;  /* Centers the icon perfectly */
  align-items: center;
  justify-content: center;
  width: 24px;           /* Set your desired width here */
  height: 24px;          /* Set your desired height here */
}

.icon img {
  width: 100%;           /* Forces image to fill the parent width */
  height: 100%;          /* Forces image to fill the parent height */
  object-fit: contain;   /* Scales the image without distorting its aspect ratio */
}




/*add device*/
/* Component Container Wrapper */
#div-add {
  
    max-width: 500px;
    margin: 40px auto;
    padding: 32px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header Typography */
.table-header {
    text-align: center;
    margin-bottom: 32px;
}

.table-header h3 {
    font-size: 24px;
    color: #1a1f36;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.table-header .subtitle {
    font-size: 14px;
    color: #697386;
    margin: 0;
}

/* Layout Form Layout */
.device-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #3c4257;
}

/* Input Fields */
.device-form input[type="text"],
.device-form input[type="password"] {
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    color: #1a1f36;
    background-color: #fff;
    transition: all 0.2s ease;
}

.device-form input:focus {
    outline: none;
    border-color: #5469d4;
    box-shadow: 0 0 0 3px rgba(84, 105, 212, 0.15);
}

/* Custom Grid Icon Selector */
.icon-selector-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.icon-tile {
    position: relative;
    cursor: pointer;
}

.icon-tile input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.icon-tile .tile-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 14px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    text-align: center;
    transition: all 0.2s ease;
    gap: 6px;
}

.icon-tile .icon-visual {
    font-size: 22px;
}

.icon-tile .tile-label {
    font-size: 12px;
    color: #4f566b;
    font-weight: 500;
}

/* Selection State Changes */
.icon-tile input:checked + .tile-content {
    border-color: #5469d4;
    background-color: #f8f9ff;
    box-shadow: 0 0 0 1px #5469d4;
}

.icon-tile input:checked + .tile-content .tile-label {
    color: #5469d4;
    font-weight: 600;
}

/* Standardized Buttons */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    border-top: 1px solid #f3f3f5;
    padding-top: 24px;
}

.btn {
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.btn-secondary {
    background-color: #fff;
    color: #4f566b;
    border: 1px solid #d9d9d9;
}

.btn-secondary:hover {
    background-color: #f7f8fa;
    color: #1a1f36;
}

.btn-primary {
    background-color: #5469d4;
    color: #fff;
}

.btn-primary:hover {
    background-color: #2840be;
}

/*geofence page*/
:root {
    --geo-app-blue: #0f62fe;
    --geo-app-blue-hover: #0043ce;
    --geo-app-bg-light: #f4f4f6;
    --geo-app-card-bg: #ffffff;
    --geo-app-border: #dde1e6;
    --geo-app-text-main: #161616;
    --geo-app-text-muted: #525252;
}

.geo-dashboard-container.stack-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 480px;
    background: var(--geo-app-bg-light);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--geo-app-text-main);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--geo-app-border);
}

.geo-map-viewport {
    flex: 1; /* Pushes the controls firmly to the bottom */
    position: relative;
    background: #e5e5e5;
}

/* Compact Bottom Panel Configuration */
.geo-bottom-panel-compact {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Tightly pack elements vertical sequence */
    padding: 12px 16px; /* Reduced internal spacing to fit perfectly */
    background: var(--geo-app-card-bg);
    border-top: 1px solid var(--geo-app-border);
}

.geo-compact-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.geo-compact-row.fields-bg {
    background: var(--geo-app-bg-light);
    padding: 6px;
    border-radius: 4px;
    border: 1px solid var(--geo-app-border);
    flex-wrap: wrap;
}

.geo-control-item {
    display: flex;
    flex-direction: column;
}

.dropdown-full {
    flex: 1;
}

.field-item {
    flex: 1 1 120px;
    min-width: 0;
}

@media (max-width: 900px) {
    :root {
        --sidebar-width: 72px;
    }

    .sidebar-header .logo,
    .nav-item .text {
        display: none;
    }

    .nav-item {
        justify-content: center;
        gap: 0;
        padding: 10px 8px;
    }

    .sidebar {
        padding: 8px 6px;
    }

    .main-content {
        padding: 12px;
    }

    .filter-header {
        flex-direction: column;
        align-items: stretch;
    }

    .icon-selector-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    :root {
        --sidebar-width: 100%;
    }

    :root:has(.tabradio2:checked) .tabcontent2 {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 42vh;
        flex-shrink: 0;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        overflow-y: auto;
    }

    .sidebar-footer {
        display: none;
    }
}

.geo-label-compact {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--geo-app-text-muted);
    margin-bottom: 4px;
}

.geo-dropdown-compact {
    width: 100%;
    padding: 8px 12px;
    background: var(--geo-app-bg-light);
    border: 1px solid var(--geo-app-border);
    border-radius: 4px;
    color: var(--geo-app-text-main);
    font-size: 0.85rem;
    outline: none;
    height: 36px;
}

.geo-input-compact {
    width: 100%;
    padding: 8px 10px;
    background: var(--geo-app-card-bg);
    border: 1px solid var(--geo-app-border);
    border-radius: 4px;
    color: var(--geo-app-text-main);
    font-size: 0.85rem;
    outline: none;
    height: 34px;
}

.geo-input-compact:focus, .geo-dropdown-compact:focus {
    border-color: var(--geo-app-blue);
}

.geo-btn-compact {
  display: block;
    padding: 0 20px;
    background: var(--geo-app-blue);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    height: 34px; /* Perfectly aligns with input height */
    cursor: pointer;
    transition: background 0.15s ease;
}

.geo-btn-compact:hover {
    background: var(--geo-app-blue-hover);
}

.geo-btn-delete {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    background: #dc2626;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    height: 36px;
    margin-top: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.geo-btn-delete:hover {
    background: #b91c1c;
}

.geo-btn-delete:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.geo-marker-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.25));
}