:root {
    --r: 0;
    --g: 0;
    --b: 255;
    --text-color: rgb(var(--r), var(--g), var(--b));
    --account-color: rgb(39, 131, 252);
    --truck-color: rgb(255, 183, 74);
    --trailer-color: rgb(99, 231, 121);
    --eLock-color: rgb(176, 44, 44);       
    --location-color: rgb(150, 112, 255);
    --trip-color: rgb(112, 255, 131);
}

body {
    background: white;
    background-image:url('img/background.jpg');
}

.clock {
    font-size: 48px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;

    font-family: 'Courier New', Courier, monospace;
    font-size: medium;
    color: black;
}
.login-title {
    color: var(--text-color);
}
.login-button {
    color: black;
}

.logout-button {
    float: right;
    box-shadow: inset 0px -3px 7px 0px #ff2929;
    background: linear-gradient(to bottom, #f92d2d 5%, #fa0606 100%);
    background-color: #f92d2d;
    border-radius: 5px; 
    border: 1px solid #0b0e07;
    display: inline-block;
    cursor: pointer;
    color: #ffffff;
    font-family: Arial;
    font-size: 15px; 
    padding: 10px 30px; 
    text-decoration: none;
    text-shadow: 0px 1px 0px #263666;
    width: 150px; 
    text-align: center;
}
.logout-button:hover {
    background: linear-gradient(to bottom, #fa0606 5%, #f92d2d 100%);
    background-color: #fa0606a8;
}
.logout-button.refresh {
	background-color:#f92d2d00;
}
.corner-button {
    background-color: #555;
    color: white;
    padding: 16px 20px;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    position: fixed;
    bottom: 23px;
    left: 28px;
    width: 280px;
}
.corner-button:hover {
    opacity: 1;
}
.schedtablinks {
    background-color: #1b239c;
    color: white;
    padding: 16px 20px;
    border: none;
    cursor: pointer;
    opacity: 0.8;
}
.schedtablinks:hover {
    opacity: 1;
}

.main-title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0; /* Reduced from 20px to 10px */
}

.main-title {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 32px; /* Reduced from 48px to 32px */
    font-weight: bold;
    color: var(--text-color);
    padding: 5px 15px; /* Reduced vertical padding from 10px to 5px */
    margin: 0;
    font-family: Arial, sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1; /* Reduces line spacing */
}

.main-title:hover {
    opacity: 0.8;
    text-decoration: underline;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.tab {
    background-color: #0b0e07;
    padding: 2px 0; 
}
.tablinks {
	box-shadow:inset 0px -3px 7px 0px #29bbff;
	background:linear-gradient(to bottom, #2dabf9 5%, #0688fa 100%);
	background-color:#2dabf9;
	border-radius:5px;
	border:1px solid #0b0e07;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:15px;
	padding:10px 30px;
	text-decoration:none;
	text-shadow:0px 1px 0px #263666;
}
.tablinks:hover {
	background:linear-gradient(to bottom, #0688fa 5%, #2dabf9 100%);
	background-color:#0688fa;
}
.tablinks.active {
    background-color: #555; 
    color: white; 
    border-bottom: 2px solid #0004ff; 
}
.notifications {    
	box-shadow:inset 0px -3px 7px 0px #662626;
	background-color:#dd3d3d;
	background:linear-gradient(to bottom, #dd3d3d 5%, #dd0505 100%);
	text-shadow:0px 1px 0px #662626;
	color:#000000;
}
.notifications:hover {
	background:linear-gradient(to bottom, #dd0505 5%, #662626 100%);
	background-color:#dd0505;
}

.add-schedule {
    background-color: #555;
    color: white;
    padding: 16px 20px;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    position: fixed;
    bottom: 23px;
    right: 28px;
    width: 280px;
}
.add-schedule:hover {
    opacity: 1;
}
.remove-schedule {
    background-color: #555;
    color: white;
    padding: 16px 20px;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    position: fixed;
    bottom: 81px;
    right: 28px;
    width: 280px;
}
.remove-schedule:hover {
    opacity: 1;
}

/*
 *  Form container
 */
.form-popup {
    display: none;
    position: fixed;
    bottom: 0;
    right: 15px;
    border: 3px solid #f1f1f1;
    z-index: 9;
}
.form-container {
    max-width: 300px;
    padding: 10px;
    background-color: white;
}
.form-container input[type=text] {
    width: 250px;
    padding: 15px;
    margin: 5px 0 22px 0;
    border: none;
    background: #f1f1f1;
}
.form-container input[type=text]:focus, .form-container input[type=password]:focus {
    background-color: #ddd;
    outline: none;
}
.form-container .btn {
    background-color: #04AA6D;
    color: white;
    padding: 16px 20px;
    border: none;
    cursor: pointer;
    width: 100%;
    margin-bottom:10px;
    opacity: 0.8;
}
.form-container .submit {
    background-color: rgb(27, 238, 19);
}  
.form-container .cancel {
    background-color: red;
}  
.form-container .btn:hover, .open-button:hover {
    opacity: 1;
}

/*
 *  Admin form container
 */
 .admin-form-container {
    height: 250px;
    width: 90%;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.658);
 }
 .admin-form-container fieldset{
    height: 80%;
 }
 .admin-form-container input[type=text], 
 .admin-form-container input[type=number],
 .admin-form-container select {
     width: 200px;
     padding: 5px;
     border: none;
 }
 .admin-form-container.trip {
    background-color: rgba(255, 255, 255, 0.5);
    height: auto;    
	border:1px solid #000000;
 }
 .admin-form-container.trip input[type=text],
 .admin-form-container.trip input[type=number],
 .admin-form-container.trip select {
    background: var(--trip-color);
    color: black;
 }
 .admin-form-container.truck input[type=text],
 .admin-form-container.truck input[type=number],
 .admin-form-container.truck select {
    background: var(--truck-color);
    color: black;
 }
 .admin-form-container.eLock input[type=text],
 .admin-form-container.eLock input[type=number],
 .admin-form-container.eLock select {
    background: var(--eLock-color);
    color: black;
 }
 .admin-form-container.trailer input[type=text],
 .admin-form-container.trailer input[type=number],
 .admin-form-container.trailer select {
    background: var(--trailer-color);
    color: black;
 }
 .admin-form-container.account input[type=text],
 .admin-form-container.account input[type=number],
 .admin-form-container.account select {
    background: var(--account-color);
    color: black;
 }
 .admin-form-container.location {
    background-color: rgba(255, 255, 255, 0.5);
    height: auto;
    min-height: 800px;
    max-width: 1000px;
    width: 95%;
    margin: 0 auto;
 }
 .admin-form-container.location input[type=text],
 .admin-form-container.location input[type=number],
 .admin-form-container.location select,
 .admin-form-container.location thead {
    box-shadow: var(--location-color);
    background: var(--location-color);
    color: black;
 }
 
 /* Circle Location Form - Similar to Location Form */
 .admin-form-container.circle-location {
    background-color: rgba(255, 255, 255, 0.5);
    height: auto;
    min-height: 800px;
    max-width: 1200px;
    width: 95%;
    margin: 0 auto;
    border: 1px solid #000000;
 }
 .admin-form-container.circle-location input[type=text],
 .admin-form-container.circle-location input[type=number],
 .admin-form-container.circle-location select {
    background: var(--location-color);
    color: black;
 }
 
.admin-form-container .submit {
    background-color: green;
}  
.admin-form-container .cancel {
    background-color: yellow;
}  
.admin-form-container .remove {
    background-color: red;
}  

/*
 *  Display form container
 */
 .display-form-container {
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.658);
 }
 .display-form-container fieldset{
    height: 80%;
 }
 .display-form-container input[type=text], 
 .display-form-container input[type=number],
 .display-form-container select {
     width: 200px;
     padding: 5px;
     border: none;
 }
 .display-form-container.trip input[type=text],
 .display-form-container.trip input[type=number],
 .display-form-container.trip select {
    background: var(--trip-color);
    color: black;
 }
 .display-form-container.truck input[type=text],
 .display-form-container.truck input[type=number],
 .display-form-container.truck select {
    background: var(--truck-color);
    color: black;
 }
 .display-form-container.trailer input[type=text],
 .display-form-container.trailer input[type=number],
 .display-form-container.trailer select {
    background: var(--trailer-color);
    color: black;
 }
 .display-form-container.eLock input[type=text],
 .display-form-container.eLock input[type=number],
 .display-form-container.eLock select {
    background: var(--eLock-color);
    color: black;
 }
 .display-form-container.account input[type=text],
 .display-form-container.account input[type=number],
 .display-form-container.account select {
    background: var(--account-color);
    color: black;
 }
 
.display-form-container .submit {
    background-color: green;
}  
.display-form-container .cancel {
    background-color: yellow;
}  
.display-form-container .remove {
    background-color: red;
}  

/*
 *  Trip Table
 */
.trip-header {
    border: 1px solid black;
}
.trip-table {
    width: 100%;
    border-collapse: collapse;
    margin: 50px 50px;
    font-size: 0.9em;
    min-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    border-top-width: 50px;
    border-left-width: 50px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 10px;
    height: auto; /* Adjust height dynamically */
    max-height: 800px; /* Increase max height */
    overflow-y: auto; /* Add scroll for overflow */
}

.trip-table th {
    padding: 12px;
    text-align: left;
    background-color: #006103; /* Dark Green */
    color: white;
    border: 1px solid #ddd;
}
.trip-table td {
    padding: 8px;
    border: 1px solid #ddd;
}
.trip-table tbody tr {
    border-bottom: 1px solid #dddddd;
}
.trip-table tr {
    background-color: white; /* Default row color */
}
.trip-table .past-row {
    background-color: #d3d3d3 !important; /* Grey for past rows */
    color: #808080;
}
.trip-table .highlight-row {
    background-color: yellow !important; /* Yellow for highlighted rows */
    color: black;
}
.trip-table tbody tr:hover {
    background-color: #f1f1f1; /* Light grey for hover effect */
    cursor: pointer;
}


/*
 *  Styled table
 */
 .styled-table {
    border-collapse: collapse;
    margin: 25px 0;
    margin-left: 25px;
    font-size: 0.95em;
    min-width: 400px;
    width: 95%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    background: white;
 }
.styled-table thead tr {
    background: linear-gradient(135deg, #009879, #007a63);
    color: #ffffff;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85em;
}
.styled-table.live {
    thead th {
        background: linear-gradient(135deg, #dc3545, #b02a37);
    }
    tr {
        background-color: white;
    }
}
.styled-table th,
.styled-table td {
    padding: 16px 20px;
    text-align: left;
    vertical-align: middle;
}
.styled-table th {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}
.styled-table th:hover {
    background: rgba(255, 255, 255, 0.1);
}
.styled-table th:last-child {
    border-right: none;
}
.styled-table tbody tr {
    border-bottom: 1px solid #e8f4f8;
    transition: all 0.3s ease;
}
.styled-table tbody tr:nth-of-type(even) {
    background: linear-gradient(135deg, #f8fcff, #f0f8ff);
}
.styled-table tbody tr:nth-of-type(odd) {
    background: linear-gradient(135deg, #ffffff, #fafcff);
}
.styled-table tbody tr:hover {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.styled-table td {
    color: #333;
    font-weight: 500;
}
.styled-table tbody tr:last-child {
    border-bottom: none;
}

/* Specific header colors for each entity type */
.styled-table.truck {
    border: 3px solid var(--truck-color);
}
.styled-table.truck thead tr {
    background: linear-gradient(135deg, var(--truck-color), #e6a947);
    color: #2c1810;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}
.styled-table.truck tbody tr:nth-of-type(even) {
    background: linear-gradient(135deg, #fff8f0, #fef5e7);
}
.styled-table.truck tbody tr:nth-of-type(odd) {
    background: linear-gradient(135deg, #ffffff, #fffaf5);
}
.styled-table.truck tbody tr:hover {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2) !important;
}

.styled-table.trailer {
    border: 3px solid var(--trailer-color);
}
.styled-table.trailer thead tr {
    background: linear-gradient(135deg, var(--trailer-color), #66cc7a);
    color: #1b4332;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}
.styled-table.trailer tbody tr:nth-of-type(even) {
    background: linear-gradient(135deg, #f1f8e9, #e8f5e8);
}
.styled-table.trailer tbody tr:nth-of-type(odd) {
    background: linear-gradient(135deg, #ffffff, #f9fff9);
}
.styled-table.trailer tbody tr:hover {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9) !important;
}

.styled-table.eLock {
    border: 3px solid var(--eLock-color);
}
.styled-table.eLock thead tr {
    background: linear-gradient(135deg, var(--eLock-color), #cc5555);
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.styled-table.eLock tbody tr:nth-of-type(even) {
    background: linear-gradient(135deg, #ffebee, #fce4ec);
}
.styled-table.eLock tbody tr:nth-of-type(odd) {
    background: linear-gradient(135deg, #ffffff, #fff5f5);
}
.styled-table.eLock tbody tr:hover {
    background: linear-gradient(135deg, #ffcdd2, #f8bbd9) !important;
}

.styled-table.location {
    border: 3px solid var(--location-color);
}
.styled-table.location thead tr {
    background: linear-gradient(135deg, var(--location-color), #a68cff);
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.styled-table.location tbody tr:nth-of-type(even) {
    background: linear-gradient(135deg, #f3f0ff, #ede7ff);
}
.styled-table.location tbody tr:nth-of-type(odd) {
    background: linear-gradient(135deg, #ffffff, #faf8ff);
}
.styled-table.location tbody tr:hover {
    background: linear-gradient(135deg, #e1d5ff, #d1c4e9) !important;
}

.styled-table.trip {
    border: 3px solid var(--trip-color);
}
.styled-table.trip thead tr {
    background: linear-gradient(135deg, var(--trip-color), #7dff98);
    color: #1b4332;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}
.styled-table.trip tbody tr:nth-of-type(even) {
    background: linear-gradient(135deg, #f1fff4, #e8f8ea);
}
.styled-table.trip tbody tr:nth-of-type(odd) {
    background: linear-gradient(135deg, #ffffff, #f9fff9);
}
.styled-table.trip tbody tr:hover {
    background: linear-gradient(135deg, #e8f8ea, #c8e6c9) !important;
}

.styled-table.account {
    border: 3px solid var(--account-color);
}
.styled-table.account thead tr {
    background: linear-gradient(135deg, var(--account-color), #5ba3ff);
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.styled-table.account tbody tr:nth-of-type(even) {
    background: linear-gradient(135deg, #e3f2fd, #e1f5fe);
}
.styled-table.account tbody tr:nth-of-type(odd) {
    background: linear-gradient(135deg, #ffffff, #f8fcff);
}
.styled-table.account tbody tr:hover {
    background: linear-gradient(135deg, #bbdefb, #90caf9) !important;
}

.styled-table tbody tr.active-row {
    font-weight: bold;
    color: #009879;
}

#packet-table-container {
    max-height: 600px; 
    overflow-y: auto;
    border: 1px solid #ccc;
}
#packet-table-container table {
    width: 100%;
    border-collapse: collapse;
}
#packet-table-container thead, 
#packet-table-container th, 
#packet-table-container td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

/* 
 *  Demo Section
 */
.demo-header {
    width: 100%;
    text-align: center;
    background-color: #333;
    color: white;
    padding: 10px 0;
    font-size: 24px;
    font-weight: bold;
}
.demo-container {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center vertically */
    align-items: center; /* Center horizontally */
    height: 70vh; /* Reduce the height from 100vh to 70vh */
}
.demo-container .lights {
    display: flex;
    justify-content: center;
    gap: 20px; /* Space between the lights */
    margin-bottom: 20px;
}
.demo-container .light-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.demo-container .light {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: gray;
}
.demo-container .open-unlocked {
    background-color: red;
}
.demo-container .closed-locked {
    background-color: green;
}
.demo-container .label {
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: bold;
}
.demo-container .buttons {
    display: flex;
    flex-direction: column; 
    gap: 10px;
}
.demo-container .buttons button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    width: 200px;
    margin: 0 auto; 
}
.lights-buttons-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
}
.light-row {
    display: flex;
    justify-content: space-between;
    gap: 20px; /* Space between Locked and Open lights */
}
.light-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px;
}
.demo-container .buttons {
    margin-top: 20px;
    text-align: center;
}
.light-on {
    background-color: green;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.light-off {
    background-color: red;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* 
 *  Google Map
 */
.google-map {
    padding-bottom: 50%;
    position: relative;
}

.google-map iframe {
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    position: absolute;
}

/* 
 *  Copyright Footer
 */
.copyright-footer {
    position: static;
    width: 100%;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 12px;
    border-top: 1px solid #555;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    margin-top: 50px;
}

.copyright-footer p {
    margin: 0;
}

.copyright-footer:hover {
    background-color: #444;
    transition: background-color 0.3s ease;
}

/* Add padding to body to ensure content doesn't get cut off */
body {
    padding-bottom: 20px;
}

/* Navigation Buttons */
.nav-buttons-container {
    text-align: center;
    margin: 8px 0;
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-block;
    margin: 0;
    padding: 8px 16px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: #007bff;
    border-color: #0056b3;
    min-width: 65px;
    text-align: center;
    flex: 1;
    max-width: 80px;
}

.nav-btn:hover {
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    background: #0056b3;
}

/* All buttons have the same base color - no individual colors */
.nav-btn.main,
.nav-btn.live,
.nav-btn.dycor {
    background: #007bff;
    border-color: #0056b3;
}

/* Active state styles - distinctive active appearance */
.nav-btn.active {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: #1e7e34;
    box-shadow: 0 0 12px rgba(40, 167, 69, 0.6);
    font-weight: bold;
    transform: scale(1.05);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.nav-btn.active:hover {
    background: linear-gradient(135deg, #1e7e34, #17a2b8);
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.8);
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted black;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    
    /* Position the tooltip */
    position: absolute;
    z-index: 1;
    top: -5px;
    left: 105%;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
}

/* Admin Section Improvements */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.admin-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    height: 60vh;
    display: flex;
    flex-direction: column;
}

.admin-card h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    font-size: 18px;
    flex-shrink: 0;
}

/* Default admin card form container behavior */
.admin-card .admin-form-container {
    flex: 1;
}

/* Specific styling for Add New Account card only */
.admin-card.add-new-account .admin-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-card.add-new-account .form-fields-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 15px;
}

.admin-card.add-new-account .form-buttons-container {
    flex-shrink: 0;
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
    margin-top: auto;
}

.admin-section {
    margin-bottom: 30px;
}

.admin-section-title {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
}

.admin-form-container.modern {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    border: 1px solid #e9ecef;
}

.admin-form-container.modern .form-group {
    margin-bottom: 15px;
}

.admin-form-container.modern label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.admin-form-container.modern select,
.admin-form-container.modern input[type="text"],
.admin-form-container.modern input[type="email"],
.admin-form-container.modern input[type="password"] {
    width: 90%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out;
}

.admin-form-container.modern select:focus,
.admin-form-container.modern input[type="text"]:focus,
.admin-form-container.modern input[type="email"]:focus,
.admin-form-container.modern input[type="password"]:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.admin-form-container.modern .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    margin-right: 10px;
}

.admin-form-container.modern .btn.submit {
    background: #28a745;
    color: white;
}

.admin-form-container.modern .btn.submit:hover {
    background: #218838;
}

.admin-form-container.modern .btn.remove {
    background: #dc3545;
    color: white;
}

.admin-form-container.modern .btn.remove:hover {
    background: #c82333;
}

.form-divider {
    margin: 20px 0;
    text-align: center;
    color: #6c757d;
    font-weight: 500;
}

.add-account-link {
    display: inline-block;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.add-account-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-decoration: none;
    color: white;
}

/* Compact styling for Change Password form */
.admin-form-container.modern.account {
    padding: 10px;
}

.admin-form-container.modern.account .form-group {
    margin-bottom: 8px;
}

.admin-form-container.modern.account label {
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 500;
}

.admin-form-container.modern.account select {
    padding: 5px 8px;
    font-size: 12px;
    height: 28px;
    width: 100%;
}

.admin-form-container.modern.account input[type="password"] {
    padding: 5px 8px;
    font-size: 12px;
    height: 28px;
    width: 70%;
}

.admin-form-container.modern.account .btn {
    padding: 10px 20px;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 600;
}

/* Generate Code Button Styling */
.packet-form-container .btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.packet-form-container .btn:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.packet-form-container .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.packet-form-container .btn.submit {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.packet-form-container .btn.submit:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
}

/* Timezone button styling */
.timezone-btn {
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    min-width: 140px !important;
}

.timezone-btn.submit {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
}

.timezone-btn.submit:hover {
    background: linear-gradient(135deg, #218838, #1ea087) !important;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3) !important;
    transform: translateY(-1px) !important;
}

.timezone-btn.cancel {
    background: linear-gradient(135deg, #6c757d, #5a6268) !important;
    color: white !important;
}

.timezone-btn.cancel:hover {
    background: linear-gradient(135deg, #5a6268, #495057) !important;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3) !important;
    transform: translateY(-1px) !important;
}

.timezone-buttons {
    text-align: center !important;
    margin: 20px 0 !important;
    display: flex !important;
    justify-content: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
}

/* Live Page Specific Styles */
.alert-item {
    background: white;
    border-left: 4px solid #007bff;
    margin: 10px 0;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.alert-item.alert-critical {
    border-left-color: #dc3545;
}

.alert-item.alert-warning {
    border-left-color: #ffc107;
}

.alert-item.alert-info {
    border-left-color: #17a2b8;
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
}

.alert-time {
    color: #6c757d;
    font-size: 12px;
}

.alert-type {
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.alert-item.alert-critical .alert-type {
    background: #dc3545;
}

.alert-item.alert-warning .alert-type {
    background: #ffc107;
    color: #212529;
}

.alert-item.alert-info .alert-type {
    background: #17a2b8;
}

.alert-message {
    color: #495057;
    font-size: 14px;
    line-height: 1.4;
}

.monitoring-controls,
.elock-controls,
.map-controls,
.alert-controls {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.monitoring-controls select,
.elock-controls select,
.map-controls select,
.alert-controls select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.status-text {
    font-size: 18px;
    font-weight: 600;
}

.status-text.connected {
    color: #28a745;
}

.status-text.disconnected {
    color: #dc3545;
}

.status-text.sim-mode {
    color: #ffc107;
}

.status-text.live-mode {
    color: #17a2b8;
}

/* Circle Location Styles */
/* Circle Location Table Container */
.circle-location-table-container {
    margin-top: 20px;
    border: 2px solid #28a745;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.1);
}

.styled-table.circle-location {
    border-color: #28a745;
}

.styled-table.circle-location thead {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.styled-table.circle-location tbody tr:hover {
    background-color: rgba(40, 167, 69, 0.1);
}

.add-circle-location {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.add-circle-location:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

.circle-location-controls {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.circle-location-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.circle-location-form input, .circle-location-form button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.circle-location-form button {
    background: #007bff;
    color: white;
    cursor: pointer;
    border: 1px solid #007bff;
}

.circle-location-form button:hover {
    background: #0056b3;
}

.circle-location-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.circle-location-table th, .circle-location-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.circle-location-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.circle-location-table tr:hover {
    background-color: #f5f5f5;
}

.edit-btn, .delete-btn {
    padding: 4px 8px;
    margin: 0 2px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.edit-btn {
    background: #ffc107;
    color: black;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

/* Settings Panel Styles */
.settings-panel {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.settings-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.settings-row label {
    min-width: 150px;
    font-weight: bold;
    color: #333;
}

.settings-row input, .settings-row select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    flex: 1;
    min-width: 200px;
}

.settings-row button {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: 1px solid #007bff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.settings-row button:hover {
    background: #0056b3;
}

.color-preview {
    width: 30px;
    height: 30px;
    border: 2px solid #333;
    border-radius: 5px;
    margin-left: 10px;
}

/* Layout Styles */
.sidebar-container {
    position: relative;
    display: flex;
    min-height: 100vh;
}

.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-size: 16px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 30px 20px 20px 20px;
    border-bottom: 1px solid #3a4a5c;
    text-align: center;
}

.sidebar-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: bold;
    color: #ecf0f1;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 15px 25px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-size: 16px;
    font-weight: 500;
}

.sidebar-nav a:hover {
    background: rgba(52, 73, 94, 0.7);
    color: #ecf0f1;
    border-left-color: #007bff;
    text-decoration: none;
}

.sidebar-nav a.active {
    background: #007bff;
    color: white;
    border-left-color: #0056b3;
}

.main-content {
    margin-left: 250px;
    min-height: 100vh;
    background: #f8f9fa;
    transition: margin-left 0.3s ease;
    width: calc(100% - 250px);
}

.main-content.expanded {
    margin-left: 0;
    width: 100%;
}

.content-section {
    display: none;
    padding: 20px;
    min-height: 100vh;
}

.content-section.active {
    display: block;
}

.content-header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 5px solid #007bff;
}

.content-header h1 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 32px;
    font-weight: bold;
}

.content-header p {
    margin: 0;
    color: #6c757d;
    font-size: 16px;
}

.content-body {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 70vh;
}

/* Title Styles */
.title-cursor-pointer {
    cursor: pointer;
}

/* Text Alignment Styles */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Font Size Styles */
.font-size-13 {
    font-size: 13px;
}

.font-size-14 {
    font-size: 14px;
}

.font-size-1-1em {
    font-size: 1.1em;
}

.font-size-12 {
    font-size: 12px;
}

.font-size-13 {
    font-size: 13px;
}

.font-size-11 {
    font-size: 11px;
}

.font-size-16 {
    font-size: 16px;
}

.font-size-18 {
    font-size: 18px;
}

.font-size-20 {
    font-size: 20px;
}

.font-size-24 {
    font-size: 24px;
}

.font-size-32 {
    font-size: 32px;
}

/* Margin Styles */
.margin-0 {
    margin: 0;
}

.margin-10 {
    margin: 10px;
}

.margin-15 {
    margin: 15px 0;
}

.margin-20 {
    margin: 20px 0;
}

.margin-bottom-0 {
    margin-bottom: 0;
}

.margin-bottom-5 {
    margin-bottom: 5px;
}

.margin-bottom-10 {
    margin-bottom: 10px;
}

.margin-bottom-15 {
    margin-bottom: 15px;
}

.margin-bottom-20 {
    margin-bottom: 20px;
}

.margin-top-0 {
    margin-top: 0;
}

.margin-top-5 {
    margin-top: 5px;
}

.margin-top-8 {
    margin-top: 8px;
}

.margin-top-10 {
    margin-top: 10px;
}

.margin-top-15 {
    margin-top: 15px;
}

.margin-top-20 {
    margin-top: 20px;
}

.margin-top-25 {
    margin-top: 25px;
}

.margin-right-4 {
    margin-right: 4px;
}

.margin-right-6 {
    margin-right: 6px;
}

.margin-left-8 {
    margin-left: 8px;
}

/* Padding Styles */
.padding-0 {
    padding: 0;
}

.padding-5 {
    padding: 5px;
}

.padding-8 {
    padding: 8px;
}

.padding-10 {
    padding: 10px;
}

.padding-15 {
    padding: 15px;
}

.padding-20 {
    padding: 20px;
}

/* Margin Styles */
.margin-5-0 {
    margin: 5px 0;
}

/* Font Size Classes */
.font-size-1em {
    font-size: 1em;
}

/* Map Container Styles */
.map-container-location {
    height: 400px;
    width: 100%;
}

.map-container-circle {
    height: 500px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Form Input Styles */
.form-input-standard {
    width: 100%;
    padding: 10px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 1em;
}

.settings-select {
    width: 100%;
    margin: 5px 0;
    padding: 5px;
}

/* Color Styles */
.color-red {
    color: red;
}

.color-black {
    color: black;
}

.color-white {
    color: white;
}

.color-gray {
    color: #6c757d;
}

.color-green {
    color: #28a745;
}

.color-blue {
    color: #007bff;
}

/* Background Color Styles */
.bg-white {
    background-color: white;
}

.bg-gray {
    background-color: #f8f9fa;
}

.bg-light-gray {
    background-color: #e9ecef;
}

.bg-red {
    background-color: red;
}

.bg-green {
    background-color: #28a745;
}

.bg-blue {
    background-color: #007bff;
}

.bg-yellow {
    background-color: #ffd900;
}

.bg-light-green {
    background-color: #f8fff9;
}

.bg-light-blue {
    background-color: #f8f9fa;
}

/* Background Image Styles */
.bg-image-truck {
    background-image: url('/img/background.jpg');
    background-size: cover;
    background-position: center;
}

/* Display Styles */
.display-none {
    display: none;
}

.display-block {
    display: block;
}

.display-flex {
    display: flex;
}

.display-inline-block {
    display: inline-block;
}

/* Flex Styles */
.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-space-around {
    justify-content: space-around;
}

.align-center {
    align-items: center;
}

.align-flex-start {
    align-items: flex-start;
}

.align-stretch {
    align-items: stretch;
}

/* Gap Styles */
.gap-4 {
    gap: 4px;
}

.gap-10 {
    gap: 10px;
}

.gap-15 {
    gap: 15px;
}

.gap-20 {
    gap: 20px;
}

/* Border Styles */
.border-none {
    border: none;
}

.border-1-gray {
    border: 1px solid #ddd;
}

.border-1-light-gray {
    border: 1px solid #e9ecef;
}

.border-1-yellow {
    border: 1px solid #e6c200;
}

.border-2-green {
    border: 2px solid #28a745;
}

.border-2-blue {
    border: 2px solid #007bff;
}

.border-radius-4 {
    border-radius: 4px;
}

.border-radius-5 {
    border-radius: 5px;
}

.border-radius-6 {
    border-radius: 6px;
}

.border-radius-8 {
    border-radius: 8px;
}

.border-radius-10 {
    border-radius: 10px;
}

/* Preview Card */
.preview-card {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.preview-card h4 {
    margin-top: 0;
    color: #495057;
}

.preview-card p {
    margin: 5px 0;
    font-family: monospace;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
}

/* Form Styles */
.packet-form-container.border-none {
    border: none;
    box-shadow: none;
    background: none;
    padding: 0;
}

.packet-form-container fieldset.border-none {
    border: none;
    box-shadow: none;
    background: none;
    padding: 0;
}

/* Width Styles */
.width-100 {
    width: 100%;
}

.width-300 {
    width: 300px;
}

.width-250 {
    width: 250px;
}

.width-200 {
    width: 200px;
}

.width-150 {
    width: 150px;
}

.width-12 {
    width: 12px;
}

.width-20 {
    width: 20px;
}

.width-30 {
    width: 30px;
}

/* Timezone Select */
.timezone-select {
    width: 300px;
    margin: 10px 0;
    padding: 5px;
}

/* Height Styles */
.height-12 {
    height: 12px;
}

.height-20 {
    height: 20px;
}

.height-28 {
    height: 28px;
}

.height-30 {
    height: 30px;
}

.height-400 {
    height: 400px;
}

.height-500 {
    height: 500px;
}

/* Position Styles */
.position-relative {
    position: relative;
}

.position-fixed {
    position: fixed;
}

.position-absolute {
    position: absolute;
}

/* Box Shadow Styles */
.box-shadow-sm {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.box-shadow-md {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.box-shadow-lg {
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Font Weight Styles */
.font-weight-normal {
    font-weight: normal;
}

.font-weight-500 {
    font-weight: 500;
}

.font-weight-600 {
    font-weight: 600;
}

.font-weight-bold {
    font-weight: bold;
}

/* Cursor Styles */
.cursor-pointer {
    cursor: pointer;
}

.cursor-help {
    cursor: help;
}

/* Overflow Styles */
.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

/* Z-index Styles */
.z-index-10 {
    z-index: 10;
}

.z-index-1000 {
    z-index: 1000;
}

.z-index-1001 {
    z-index: 1001;
}

/* Grid Styles */
.grid-cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.grid-cols-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.grid-auto-fit-250 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-auto-fit-300 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-cols-2-gap-15 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.grid-cols-3-gap-15 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.grid-auto-fit-250-gap-20 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.grid-auto-fit-300-gap-20 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Transition Styles */
.transition-all {
    transition: all 0.3s ease;
}

.transition-border {
    transition: border-color 0.15s ease-in-out;
}

/* Trip Legend Styles */
.trip-legend {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    margin-top: 8px;
}

/* Trip Color Styles */
.trip-finished {
    background-color: #d3d3d3 !important;
}

.trip-current {
    background-color: #ffd900 !important;
}

.trip-future {
    background-color: #fff !important;
}

/* Map Styles */
.map-section {
    margin: 10px 0;
}

.map-instructions {
    margin: 0 0 10px 0;
    font-weight: 500;
    color: #495057;
}

.map-container {
    margin: 10px 0;
    border: 2px solid #007bff;
    border-radius: 8px;
    overflow: hidden;
}

.coordinates-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

/* Helper Icon */
.help-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    color: #fff;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
    font-size: 16px;
    margin-right: 6px;
    vertical-align: middle;
}

/* Small Text */
.small-text {
    color: #6c757d;
    display: block;
    margin-top: 5px;
}

/* Circle Location Labels */
.circle-location-label {
    display: block;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 8px;
}

/* Loading Popup */
.loading-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 10px;
    z-index: 1000;
}

/* Edit Button */
.edit-dest-btn {
    display: block;
}

/* Inventory Section Enhancements */
.inventory-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 25px 0 15px 0;
    padding: 15px 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border-left: 5px solid #007bff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.inventory-title {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Enhanced Add Buttons */
.add_truck_btn,
.add_trailer_btn,
.add_eLock_btn,
.add-location,
.add-circle-location {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
    position: relative;
    overflow: hidden;
}

.add_truck_btn:before,
.add_trailer_btn:before,
.add_eLock_btn:before,
.add-location:before,
.add-circle-location:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.add_truck_btn:hover:before,
.add_trailer_btn:hover:before,
.add_eLock_btn:hover:before,
.add-location:hover:before,
.add-circle-location:hover:before {
    left: 100%;
}

.add_truck_btn:hover,
.add_trailer_btn:hover,
.add_eLock_btn:hover,
.add-location:hover,
.add-circle-location:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.4);
}

/* Enhanced Edit Buttons in Tables */
.styled-table button[id*="open_edit"],
.styled-table button[onclick*="Edit"] {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3);
    min-width: 80px;
}

.styled-table button[id*="open_edit"]:hover,
.styled-table button[onclick*="Edit"]:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.4);
}

/* Table Section Headers */
.inventory-section-header {
    background: linear-gradient(135deg, #495057, #6c757d);
    color: white;
    padding: 12px 20px;
    margin: 30px 0 0 0;
    border-radius: 10px 10px 0 0;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(73, 80, 87, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Table Container Wrapper */
.inventory-table-wrapper {
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-bottom: 40px;
}

/* No Items Found Styling */
.no-items-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
    font-size: 16px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    margin: 20px 0;
    border: 2px dashed #dee2e6;
}

/* Battery Level Indicator */
.battery-level {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
}

.battery-level.high {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.battery-level.medium {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.battery-level.low {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.battery-level.critical {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.circle-location-edit-form {
    display: none;
    max-width: 600px;
    margin: 15px auto;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #28a745;
    border-radius: 10px;
}
.admin-form-container.circle-location {
    border: 2px solid #28a745;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fff9, #e9f7ef);
}

.admin-form-container.circle-location fieldset {
    border: 1px solid #28a745;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
}

.admin-form-container.circle-location .map-container {
    border: 2px solid #28a745 !important;
}

/* Distinguish circle vs rectangle locations */
.location-table-container {
    border: 2px solid #007bff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.1);
    margin-bottom: 30px;
}

.styled-table.location thead {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.styled-table.location tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

/* Map styling */
#circleLocationMap {
    border: 1px solid #28a745;
}

#locationMap {
    border: 1px solid #007bff;
}

.settings-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-section h3 {
    margin-top: 0;
    color: #495057;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.setting-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.setting-item label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 14px;
}

.setting-item select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #495057;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.setting-item select:focus {
    border-color: #007bff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.timezone-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.timezone-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.timezone-btn.submit {
    background-color: #007bff;
    color: white;
}

.timezone-btn.submit:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.timezone-btn.cancel {
    background-color: #6c757d;
    color: white;
}

.timezone-btn.cancel:hover {
    background-color: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(108,117,125,0.3);
}

.timezone-info {
    margin-top: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timezone-info p {
    margin: 5px 0;
    font-size: 14px;
}

/* Edit Mode Indicator */
#edit-mode-indicator {
    background: #ffc107;
    color: #000;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-weight: bold;
}

/* Settings Preview Section - Clean Neutral Styling */
.settings-preview-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    color: #495057;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid #dee2e6;
}

.preview-header {
    text-align: center;
    margin-bottom: 25px;
}

.preview-header h3 {
    color: #495057;
    margin: 0 0 10px 0;
    font-size: 24px;
    text-shadow: none;
}

.preview-header p {
    color: #6c757d;
    margin: 0;
    font-size: 16px;
}

.preview-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.preview-example-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-example-card:hover {
    transform: translateY(-5px);
    background: #f8f9fa;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border-color: #adb5bd;
}

.preview-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.preview-value {
    font-size: 18px;
    font-weight: bold;
    color: #495057;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.preview-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn-preview-update {
    background: #007bff;
    color: white;
    border: 2px solid #007bff;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-preview-update:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: scale(1.05);
}

.preview-status {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-style: italic;
}

/* Color coding for different preview types */
.preview-example-card.coordinates {
    border-left: 4px solid #4CAF50;
}

.preview-example-card.speed {
    border-left: 4px solid #FF9800;
}

.preview-example-card.battery {
    border-left: 4px solid #2196F3;
}

.preview-example-card.duration {
    border-left: 4px solid #9C27B0;
}

/* Trip Table Styles */
.trip-table-buttons {
    margin: 10px 0;
}

.trip-table-forms {
    margin: 15px 0;
}

/* Table sorting indicators - removed arrows */
.styled-table th[onclick] {
    cursor: pointer;
}

.styled-table th[onclick]:hover {
    opacity: 0.8;
}

/* Enhanced table cell spacing and typography */
.styled-table td:first-child {
    font-weight: 600;
    color: #495057;
}

.styled-table td:last-child {
    text-align: center;
    position: relative;
    width: 120px;
    min-width: 120px;
}

/* Edit button styling in inventory tables */
.styled-table td:last-child button:not(.btn) {
    display: block;
    margin: 0 auto;
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.styled-table td:last-child button:not(.btn):hover {
    background: #0056b3;
}

/* Status indicators for different data types */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.status-online {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-offline {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Enhanced coordinate display */
.coordinate-value {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: rgba(0, 123, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: #0056b3;
}

/* Speed indicator styling */
.speed-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.speed-stationary {
    color: #6c757d;
}

.speed-moving {
    color: #28a745;
}

.speed-fast {
    color: #fd7e14;
}

/* Signal strength indicators */
.signal-strength {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.signal-excellent {
    color: #28a745;
}

.signal-good {
    color: #20c997;
}

.signal-fair {
    color: #ffc107;
}

.signal-poor {
    color: #dc3545;
}

/* Enhanced inventory section spacing */
.inventory-section-header {
    margin-top: 40px !important;
}

.inventory-section-header:first-child {
    margin-top: 0 !important;
}

.inventory-table-wrapper {
    margin-bottom: 50px;
}

/* Print styles for tables */
@media print {
    .styled-table {
        box-shadow: none;
        border: 2px solid #000;
    }
    
    .styled-table th {
        background: #f8f9fa !important;
        color: #000 !important;
    }
    
    .add_truck_btn,
    .add_trailer_btn,
    .add_eLock_btn,
    .inventory-header button {
        display: none;
    }
    
    .inventory-section-header {
        background: #f8f9fa !important;
        color: #000 !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .main-content.expanded {
        margin-left: 0;
    }
    
    .content-header {
        padding: 20px;
    }
    
    .content-header h1 {
        font-size: 24px;
    }
    
    /* Mobile table adjustments */
    .styled-table {
        font-size: 0.8em;
        margin-left: 0;
        width: 100%;
    }
    
    .styled-table th,
    .styled-table td {
        padding: 8px 6px;
    }
    
    .inventory-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .inventory-title {
        font-size: 18px;
    }
    
    .inventory-section-header {
        font-size: 16px;
        padding: 15px 20px;
    }
    
    /* Horizontal scroll for wide tables */
    .inventory-table-wrapper {
        overflow-x: auto;
    }
    
    .styled-table {
        min-width: 600px;
    }
    
    .circle-location-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .circle-location-form input, .circle-location-form button {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .settings-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .settings-row label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .settings-row input, .settings-row select {
        min-width: auto;
        width: 100%;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .timezone-buttons {
        flex-direction: column;
    }
    
    .timezone-btn {
        width: 100%;
    }
    
    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .trip-legend {
        margin-top: 15px;
    }
}

/* Tooltip Styles */
.tooltip-hidden {
    visibility: hidden;
    background: #222;
    color: #fff;
    text-align: left;
    border-radius: 4px;
    padding: 6px 12px;
    position: absolute;
    z-index: 10;
    left: 100%;
    top: 0;
    margin-left: 8px;
    white-space: nowrap;
    font-size: 14px;
    transition: visibility 0.2s;
}

/* Instructions Styles */
.instructions-text {
    margin: 0 0 10px 0;
    font-size: 13px;
}

/* Integration Info Styles */
.integration-info {
    font-size: 1.1em;
    margin-bottom: 10px;
}

/* Time Display Styles */
.time-display {
    margin: 5px 0;
    font-size: 14px;
}

/* Display Control Styles */
.display-none {
    display: none;
}

/* Error Styles */
.error-red {
    color: red;
    display: none;
}

/* Help Tooltip Styles */
.help-tooltip {
    border-bottom: 1px dotted #333;
    cursor: help;
    position: relative;
}

/* Map Container Styles */
.map-container-bordered {
    margin: 10px 0;
    border: 2px solid #007bff;
    border-radius: 8px;
    overflow: hidden;
}

/* Coordinates Section Styles */
.coordinates-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

/* Readonly Input Styles */
.input-readonly {
    background: #e9ecef;
}

/* Button Margin Styles */
.btn-margin {
    margin: 5px 0;
}

/* Center Padding Styles */
.center-padding {
    text-align: center;
    padding: 20px;
}

/* Circle Location Styles */
.circle-instructions {
    margin: 0 0 10px 0;
    font-weight: 500;
    color: #495057;
}

.circle-map-container {
    margin: 15px 0;
    border: 2px solid #28a745;
    border-radius: 8px;
    overflow: hidden;
}

.circle-coordinates-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.margin-top-25 {
    margin-top: 25px;
}

.margin-bottom-20 {
    margin-bottom: 20px;
}

.margin-bottom-25 {
    margin-bottom: 25px;
}

.margin-top-10 {
    margin-top: 10px;
}

.flex-center-gap {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-success {
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.empty-row {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

.example-heading {
    margin-top: 0;
    color: #495057;
}

.code-example {
    margin: 5px 0;
    font-family: monospace;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
}

/* Edit Mode Indicator */
.edit-mode-indicator {
    background: #ffc107;
    color: #000;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-weight: bold;
}

/* Trip Header Layout */
.trip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(200, 200, 200, 0.3);
}

.trip-title-section {
    flex: 1;
    text-align: left;
}

.trip-name {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    color: #333;
}

.trip-vehicles-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 8px;
}

.vehicle-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.trip-buttons-section {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Button Styles */
.add_destination_btn, .edit_trip_name_btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.add_destination_btn:hover, .edit_trip_name_btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* View Route Button */
.view_route_btn {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 50%, #ea4335 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.view_route_btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #3367d6 0%, #2d8f47 50%, #d23369 100%);
}

.view_route_btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Route Modal Styles */
.route-modal {
    display: block;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in;
}

.route-modal-content {
    background-color: white;
    margin: 2% auto;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.route-modal-header {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 50%, #ea4335 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.route-modal-header h3 {
    margin: 0;
    font-size: 1.3em;
}

.route-modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.route-modal-close:hover {
    color: #ffeb3b;
}

.route-modal-body {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.route-destinations-list {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.route-destinations-list h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1em;
}

.route-destinations-list ol {
    margin: 0;
    padding-left: 20px;
}

.route-destinations-list li {
    margin: 5px 0;
    color: #666;
    line-height: 1.4;
}

/* Animation keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design for smaller screens */
@media (max-width: 768px) {
    .trip-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .trip-buttons-section {
        justify-content: flex-start;
        margin-top: 15px;
    }
    
    .trip-vehicles-info {
        margin-top: 10px;
    }
    
    .route-modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }
    
    .route-modal-body {
        flex-direction: column;
    }
    
    #routeMap {
        height: 300px !important;
    }
}