@import url('https://fonts.googleapis.com/css2?family=Roboto&family=Roboto+Mono:ital@0;1&display=swap');

html,
body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-container {
    background-color: #A4967B;
    background-image: url('/images/GY6Trac-LandingPageBackground.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100vh;
    width: 100vw;
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    top: 20vh;
    margin: auto auto 1rem auto;
}

.loading-image {
    display: block;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
    margin-top: 50vh;
}

.loading-progress circle {
    fill: none;
    /*stroke: #e0e0e0;*/
    stroke: var(--bs-light);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--bs-status-inprocess);
    /*stroke: #1b6ec2;*/
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bolder;
    color: white;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, 'Loading');
    }


code {
    color: #c02d76;
}

.nav-active-link {
    border-style: dotted;
    border-radius: 5px;
    border-width: 2px;
    border-color: white;
}

a.nav-link {
    color: white;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

button.navbar-toggler {
    color: white;
    border-color: lightgray;
}

.desktop-body-height {
    height: calc(100vh - 120px);
}

@media screen and (min-width: 768px) {
    .map-box {
        height: calc(100vh - 200px);
        width: calc(100vw - 250px);
    }

    .search-window {
        height: 75vh;
        width: 75vw;
    }

    .map-window {
        height: 90vh;
        width: 75vw;
    }
}

/* Small screen */
@media screen and (max-width: 767px) {
    .map-box {
        height: calc(70vh - 100px);
        width: 100vw;
    }

    .search-window {
        height: 99vh;
        width: 99vw;
    }

    .map-window {
        height: 99vh;
        width: 99vw;
    }
}

.roboto-mono {
    font-family: "Roboto Mono", monospace;
    font-weight: 400;
    font-style: normal;
    font-size: 0.75rem;
}

.icon-cell {
    cursor: pointer;
}

.k-link:has(.k-column-title .header-icon) {
    flex-flow: column;
}

.map-container-modal {
    display: contents;
}

.map-container {
    max-height: calc(80vh - 100px);
    min-height: calc(80vh - 100px);
}

/* ===========================================
   GY6Trac Color Guide - Trackboxes Page
   =========================================== */

/* Color Variables */
:root {
    --gy6-olive-green: #5F5D2D;
    --gy6-desert-tan: #A9967B;
    --gy6-orange: #E05C12;
    --gy6-light-olive: #9B9650;
}

/* Grid Header - Light Olive */
.grid-header {
    background-color: var(--gy6-light-olive) !important;
    color: white !important;
}

.grid-header .k-column-title {
    color: white !important;
}

/* Buttons - Olive Green (override Telerik theme colors) */
.k-grid .k-toolbar .k-button.k-button-solid-success,
.k-grid .k-toolbar .k-button.k-button-solid-base {
    background-color: var(--gy6-olive-green) !important;
    border-color: var(--gy6-olive-green) !important;
    color: white !important;
}

.k-grid .k-toolbar .k-button.k-button-solid-success:hover,
.k-grid .k-toolbar .k-button.k-button-solid-base:hover {
    background-color: #4a4823 !important;
    border-color: #4a4823 !important;
}

/* Edit buttons in grid cells */
.k-grid td .k-button.k-button-solid-success {
    background-color: var(--gy6-olive-green) !important;
    border-color: var(--gy6-olive-green) !important;
}

.k-grid td .k-button.k-button-solid-success:hover {
    background-color: #4a4823 !important;
    border-color: #4a4823 !important;
}

/* Toggle/Switch - Green when on, Grey when off */
.k-switch-on .k-switch-track {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

/* Grid toolbar styling */
.k-grid .k-toolbar {
    background-color: #f8f9fa;
    border-bottom: 2px solid var(--gy6-light-olive);
}

/* Custom GY6 Olive Button */
.btn-gy6-olive.k-button {
    background-color: var(--gy6-olive-green) !important;
    border-color: var(--gy6-olive-green) !important;
    color: white !important;
}

.btn-gy6-olive.k-button:hover {
    background-color: #4a4823 !important;
    border-color: #4a4823 !important;
}

.btn-gy6-olive.k-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(95, 93, 45, 0.5) !important;
}

/* Custom GY6 Olive Icon */
.icon-gy6-olive {
    color: var(--gy6-olive-green) !important;
}

/* Map marker icon - Orange accent */
.icon-gy6-orange {
    color: var(--gy6-orange) !important;
}

/* ===========================================
   Trackboxes Page - Mobile Responsive Styles
   =========================================== */

/* Mobile-first: Hide grid, show cards on small screens */
.trackbox-grid-container {
    display: block;
}

.trackbox-cards-container {
    display: none;
}

/* Responsive toolbar adjustments */
.trackbox-toolbar-text {
    display: inline;
}

.trackbox-toolbar-icon {
    display: none;
}

/* Mobile Card Styles */
.trackbox-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.trackbox-card:active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.trackbox-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.trackbox-card-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--gy6-olive-green);
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trackbox-card-status {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.trackbox-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.875rem;
}

.trackbox-card-field {
    display: flex;
    flex-direction: column;
}

.trackbox-card-label {
    color: #6c757d;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trackbox-card-value {
    color: #212529;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trackbox-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
}

.trackbox-card-actions .k-button {
    flex: 1;
    justify-content: center;
}

/* Status icons in cards - larger touch targets */
.trackbox-card .status-icon {
    font-size: 1.25rem;
    min-width: 2rem;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile edit mode in cards */
.trackbox-card-edit {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trackbox-card-edit .k-textbox {
    width: 100%;
}

.trackbox-card-edit-buttons {
    display: flex;
    gap: 0.5rem;
}

.trackbox-card-edit-buttons .k-button {
    flex: 1;
}

/* Mobile Search Box */
.trackbox-mobile-search {
    padding: 0.75rem;
    background: #f8f9fa;
    border-bottom: 2px solid var(--gy6-light-olive);
}

.trackbox-mobile-search .k-textbox {
    width: 100%;
}

/* Mobile toolbar */
.trackbox-mobile-toolbar {
    display: none;
    padding: 0.75rem;
    background: #f8f9fa;
    border-bottom: 2px solid var(--gy6-light-olive);
    gap: 0.5rem;
    align-items: center;
}

.trackbox-mobile-toolbar .trackbox-count {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Cards scroll container */
.trackbox-cards-scroll {
    overflow-y: auto;
    padding: 0.75rem;
    background: #f5f5f5;
}

/* Small screen breakpoint */
@media screen and (max-width: 1368px) {
    /* Switch from grid to cards */
    .trackbox-grid-container {
        display: none;
    }

    .trackbox-cards-container {
        display: block;
        height: calc(100vh - 130px);
        height: calc(100dvh - 130px); /* Dynamic viewport height for mobile browsers */
    }

    .trackbox-cards-scroll {
        height: calc(100vh - 200px);
        height: calc(100dvh - 200px);
    }

    .trackbox-mobile-toolbar {
        display: flex;
    }

    /* Hide text button, show icon button */
    .trackbox-toolbar-text {
        display: none;
    }

    .trackbox-toolbar-icon {
        display: inline-flex;
    }

    /* Ensure grid toolbar is hidden on mobile */
    .trackbox-grid-container .k-toolbar {
        display: none;
    }
}

/* Medium screens - hide some columns but keep grid */
@media screen and (min-width: 1369px) and (max-width: 1599px) {
    .col-hide-md {
        display: none !important;
    }

    /* Adjust grid column headers for hidden columns */
    .k-grid .k-grid-header .col-hide-md,
    .k-grid .k-grid-content .col-hide-md {
        display: none !important;
    }
}

/* Large screens - full experience */
@media screen and (min-width: 1600px) {
    .col-hide-lg {
        display: table-cell !important;
    }
}

/* Touch-friendly improvements */
@media (pointer: coarse) {
    /* Larger touch targets for icons */
    .trackbox-card .fa-solid,
    .trackbox-card .fa-regular {
        padding: 0.25rem;
    }

    /* Larger buttons */
    .trackbox-card .k-button {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
}

/* Pull-to-refresh indicator (visual only - functionality in Blazor) */
.trackbox-refresh-indicator {
    text-align: center;
    padding: 0.5rem;
    color: var(--gy6-olive-green);
    font-size: 0.875rem;
    display: none;
}

.trackbox-refresh-indicator.visible {
    display: block;
}

/* Empty state for mobile */
.trackbox-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.trackbox-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gy6-light-olive);
}

/* Connection status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.online {
    background: #d4edda;
    color: #155724;
}

.status-badge.offline {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.enabled {
    background: #d4edda;
    color: #155724;
}

.status-badge.disabled {
    background: #e9ecef;
    color: #6c757d;
}

/* Health Indicator Styles */
.health-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    vertical-align: middle;
}

.health-indicator.health-healthy {
    background-color: #28a745; /* Green */
}

.health-indicator.health-fair {
    background-color: #ffc107; /* Yellow */
}

.health-indicator.health-unreachable {
    background-color: #dc3545; /* Red */
}

/* Mobile card health indicator */
.trackbox-card-value .health-indicator {
    width: 12px;
    height: 12px;
    margin-right: 0.25rem;
}

.k-grid-header .k-grid-filter.k-active, .k-grid-header .k-header-column-menu.k-active, .k-grid-header .k-grid-header-menu.k-active, .k-grid-header .k-hierarchy-cell .k-icon.k-active, .k-grid-header .k-hierarchy-cell .k-svg-icon.k-active {
    background: #E05C12 !important; 
}

.dropdown-item.active, .dropdown-item:active {
    background: #E05C12 !important;
}

/* ===========================================
   QR Code Scanner Styles
   =========================================== */

#qr-reader {
    width: 100%;
    border-radius: 8px;
}

#qr-reader video {
    width: 100% !important;
    border-radius: 8px;
}

#qr-reader__scan_region {
    min-height: 250px;
}

#qr-reader__dashboard_section_csr button {
    background-color: var(--gy6-olive-green) !important;
    border: none !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
}

#qr-reader__dashboard_section_csr button:hover {
    background-color: #4a4823 !important;
}

/* ===========================================
   QR Scan Card - Add Asset Modal
   =========================================== */

.qr-scan-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    margin: 1rem 0;
    border: 2px dashed var(--gy6-light-olive);
    border-radius: 8px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qr-scan-card:hover {
    border-color: var(--gy6-olive-green);
    background-color: #f0f1e8;
    box-shadow: 0 2px 8px rgba(95, 93, 45, 0.15);
}

.qr-scan-card:active {
    transform: scale(0.98);
    background-color: #e8e9df;
}

.qr-scan-icon {
    color: var(--gy6-olive-green);
    margin-bottom: 0.5rem;
    font-size: 48px;
    line-height: 1;
}

.qr-scan-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gy6-olive-green);
    margin-bottom: 0.25rem;
}

.qr-scan-hint {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
}

/* ===========================================
   Add Asset Modal - Responsive Layout
   =========================================== */

/* Base modal styling - Desktop/Portrait default */
.add-asset-modal {
    width: 400px !important;
    max-width: 90vw !important;
}

/* Content container - single column by default */
.add-asset-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.add-asset-form-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.add-asset-tags-panel {
    display: flex;
    flex-direction: column;
}

.add-asset-tags-panel .tags-label {
    margin-bottom: 0.5rem;
}

/* Desktop-only elements - shown by default */
.desktop-only {
    display: flex;
}

/* Landscape-only elements - hidden by default */
.landscape-only {
    display: none !important;
}

/* RFID input row */
.rfid-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.rfid-input-row .rfid-input-group {
    flex: 1;
}

.qr-scan-btn {
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.qr-scan-btn .qr-btn-text {
    display: none;
}

/* Field styling */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.field-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gy6-olive-green);
}

.field-hint {
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0 0 0.5rem 0;
}

.rfid-section {
    display: flex;
    flex-direction: column;
}

/* Tag item in list */
.tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

/* ===========================================
   Mobile Landscape Mode - Two Column Layout (< 1368px only)
   =========================================== */

@media (orientation: landscape) and (min-width: 500px) and (max-width: 1367px) {
    /* Show landscape elements, hide desktop elements */
    .desktop-only {
        display: none !important;
    }

    .landscape-only {
        display: flex !important;
    }

    .add-asset-modal {
        width: 85vw !important;
        max-width: 700px !important;
        max-height: 90vh !important;
    }

    .add-asset-modal .k-window-content {
        max-height: calc(90vh - 100px);
        overflow-y: auto;
    }

    /* Two column layout */
    .add-asset-content {
        flex-direction: row;
        gap: 1.5rem;
        align-items: stretch;
    }

    .add-asset-form-panel {
        flex: 1;
        min-width: 0;
    }

    .add-asset-tags-panel {
        flex: 1;
        min-width: 0;
    }

    .add-asset-tags-panel .tags-listbox {
        height: 180px !important;
        min-height: 150px;
    }

    .qr-scan-btn .qr-btn-text {
        display: inline;
    }

    .field-hint {
        margin-bottom: 0.35rem;
    }
}

/* Tablet landscape - wider layout */
@media (orientation: landscape) and (min-width: 768px) and (max-width: 1367px) {
    .add-asset-modal {
        max-width: 750px !important;
    }

    .add-asset-tags-panel .tags-listbox {
        height: 200px !important;
    }
}

/* Portrait mode on larger screens (tablets) */
@media (orientation: portrait) and (min-width: 600px) and (max-width: 1367px) {
    .add-asset-modal {
        max-width: 500px !important;
    }

    .add-asset-tags-panel {
        min-height: 200px;
    }
}

/* ===========================================
   Assets Page - Mobile Responsive Styles
   =========================================== */

/* Mobile Asset Container */
.mobile-asset-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    height: calc(100dvh - 140px);
}

/* Mobile Toolbar */
.mobile-toolbar {
    background: #f8f9fa;
    border-bottom: 2px solid var(--gy6-light-olive);
    padding: 0.75rem;
    flex-shrink: 0;
}

.mobile-search-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.mobile-search-row .search-wrapper {
    flex: 1;
}

.mobile-search-row .k-textbox {
    width: 100%;
}

.mobile-search-btn {
    min-width: 44px;
}

.mobile-action-row {
    display: flex;
    gap: 0.5rem;
}

.mobile-filter-btn {
    flex: 1;
    position: relative;
}

.mobile-add-btn {
    flex: 1;
}

.filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--gy6-orange);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Asset List */
.mobile-asset-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    background: #f5f5f5;
    -webkit-overflow-scrolling: touch;
}

/* Asset Card */
.asset-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.asset-card:active {
    transform: scale(0.99);
}

.asset-card.expanded {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.asset-card-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    gap: 0.75rem;
    min-height: 72px;
}

.asset-card-location {
    flex-shrink: 0;
}

.location-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    background: #e8f4ea;
    border-radius: 8px;
    min-width: 60px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.location-indicator:hover {
    background: #d4edda;
}

.location-indicator.no-location {
    background: #f5f5f5;
    color: #999;
    cursor: default;
}

.location-indicator i {
    font-size: 1.25rem;
    color: var(--gy6-olive-green);
}

.location-indicator.no-location i {
    color: #ccc;
}

.location-text {
    font-size: 0.65rem;
    text-align: center;
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #666;
}

.asset-card-main {
    flex: 1;
    min-width: 0;
}

.asset-id {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gy6-olive-green);
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.asset-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.meta-item i {
    color: var(--gy6-light-olive);
}

.asset-card-expand {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 1rem;
}

/* Asset Card Body (Expanded) */
.asset-card-body {
    padding: 0 1rem 1rem 1rem;
    border-top: 1px solid #eee;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-tags-message {
    padding: 1rem 0;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Tag List */
.tag-list {
    margin-top: 0.75rem;
}

.tag-list-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gy6-light-olive);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 0.5rem;
}

.tag-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.tag-item:last-child {
    border-bottom: none;
}

.tag-info {
    flex: 1;
    min-width: 0;
}

.tag-number {
    font-family: "Roboto Mono", monospace;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    word-break: break-all;
}

.tag-last-scan {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tag-last-scan.no-scan {
    color: #999;
    font-style: italic;
}

.tag-actions {
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.btn-view-map {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    background: var(--gy6-olive-green);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 36px;
}

.btn-view-map:hover {
    background: #4a4823;
}

.btn-view-map:active {
    background: #3a3818;
}

/* Mobile Loading State */
.mobile-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--gy6-olive-green);
    gap: 1rem;
}

/* Mobile Empty State */
.mobile-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: #666;
    gap: 1rem;
}

.mobile-empty-state i {
    font-size: 3rem;
    color: var(--gy6-light-olive);
}

/* Mobile Pagination */
.mobile-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    margin-top: 0.5rem;
}

.pagination-info {
    font-size: 0.85rem;
    color: #666;
}

.load-more-btn {
    width: 100%;
    max-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Mobile Filter Modal */
.mobile-filter-modal .filter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
}

.mobile-filter-modal .filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-filter-modal .filter-field label {
    font-weight: 500;
    color: #333;
}

.mobile-filter-modal .filter-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.mobile-filter-modal .filter-actions .k-button {
    flex: 1;
}

.change-password-modal {
    max-height: 90vh;
    max-height: 90dvh; 
}

.change-password-modal .k-window-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media screen and (max-height: 500px) and (orientation: landscape) {
    .change-password-modal {
        max-height: 85vh;
        max-height: 85dvh;
    }

    .change-password-modal .k-window-content {
        max-height: calc(85vh - 100px);
        max-height: calc(85dvh - 100px);
        padding: 0.5rem 1rem;
    }

    .change-password-modal .mb-3 {
        margin-bottom: 0.5rem !important;
    }

    .change-password-modal .form-label {
        margin-bottom: 0.25rem;
    }

    .change-password-modal small.text-muted {
        font-size: 0.7rem;
    }
}

/* Touch-friendly improvements for mobile */
@media (pointer: coarse) {
    .asset-card-header {
        min-height: 80px;
    }

    .btn-view-map {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }

    .tag-item {
        padding: 1rem 0;
    }

    .mobile-search-btn,
    .mobile-filter-btn,
    .mobile-add-btn {
        min-height: 44px;
    }
}

/* Landscape mobile adjustments */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .mobile-asset-container {
        height: calc(100vh - 100px);
        height: calc(100dvh - 100px);
    }

    .mobile-asset-list {
        padding: 0.5rem;
    }

    .asset-card {
        margin-bottom: 0.5rem;
    }

    .asset-card-header {
        padding: 0.75rem;
        min-height: 60px;
    }
}

/* ===========================================
   Tracking Events Page - Mobile Responsive Styles
   =========================================== */

/* Mobile Event Container */
.mobile-event-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    height: calc(100dvh - 140px);
}

/* Mobile Event List */
.mobile-event-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    background: #f5f5f5;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Refresh Button */
.mobile-refresh-btn {
    flex: 1;
}

/* Event Card */
.event-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.event-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #eee;
    gap: 0.75rem;
}

.event-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

.event-time i {
    color: var(--gy6-olive-green);
}

.area-badge {
    background: var(--gy6-olive-green);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.event-card-body {
    padding: 0.75rem 1rem;
}

.event-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.event-detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.detail-value {
    font-size: 0.85rem;
    color: #333;
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-value.tag-number {
    font-family: "Roboto Mono", monospace;
    font-size: 0.8rem;
}

/* Touch-friendly improvements for event cards */
@media (pointer: coarse) {
    .event-card-header {
        min-height: 60px;
        padding: 1rem;
    }

    .mobile-refresh-btn {
        min-height: 44px;
    }
}

/* Landscape mobile adjustments for events */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .mobile-event-container {
        height: calc(100vh - 100px);
        height: calc(100dvh - 100px);
    }

    .mobile-event-list {
        padding: 0.5rem;
    }

    .event-card {
        margin-bottom: 0.5rem;
    }

    .event-card-header {
        padding: 0.5rem 0.75rem;
        min-height: 48px;
    }

    .event-card-body {
        padding: 0.5rem 0.75rem;
    }

    .event-detail-row {
        padding: 0.35rem 0;
    }
}

/* ===========================================
   Manage Users Page - Mobile Responsive Styles
   =========================================== */

/* Mobile User Container */
.mobile-user-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    height: calc(100dvh - 140px);
}

/* Mobile User List */
.mobile-user-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    background: #f5f5f5;
    -webkit-overflow-scrolling: touch;
}

/* User Card */
.user-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.user-card-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
    border-bottom: 1px solid #eee;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gy6-olive-green) 0%, #4a4823 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar i {
    color: white;
    font-size: 1.25rem;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gy6-olive-green);
    margin-bottom: 0.15rem;
    word-break: break-word;
}

.user-email {
    font-size: 0.8rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-status {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.user-status.active {
    color: #28a745;
}

.user-status.inactive {
    color: #dc3545;
}

.user-status i {
    font-size: 1.25rem;
}

.user-card-body {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
}

.user-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.user-detail-row:last-child {
    border-bottom: none;
}

.role-badge {
    background: var(--gy6-light-olive);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.25rem;
}

.role-badge:first-child {
    margin-left: 0;
}

.user-card-actions {
    display: flex;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    background: #f8f9fa;
}

.user-action-btn {
    flex: 1;
    min-height: 40px;
}

/* Touch-friendly improvements for user cards */
@media (pointer: coarse) {
    .user-card-header {
        min-height: 72px;
    }

    .user-action-btn {
        min-height: 44px;
    }

    .user-avatar {
        width: 52px;
        height: 52px;
    }
}

/* Landscape mobile adjustments for users */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .mobile-user-container {
        height: calc(100vh - 100px);
        height: calc(100dvh - 100px);
    }

    .mobile-user-list {
        padding: 0.5rem;
    }

    .user-card {
        margin-bottom: 0.5rem;
    }

    .user-card-header {
        padding: 0.75rem;
        min-height: 60px;
    }

    .user-card-body {
        padding: 0.5rem 0.75rem;
    }

    .user-card-actions {
        padding: 0.5rem 0.75rem;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
    }

    .user-avatar i {
        font-size: 1rem;
    }
}