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

body {
    background-color: #f5f7fa;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

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

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.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."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Fiber Panel Container */
.fiber-optic-container {
    width: 100%;
    min-height: 100%;
}

/* Content Area */
.content-area {
    padding-left: 180px;
    padding-right: 24px;
    margin-top: 5.5rem !important;
}

.breadcrumb {
    color: #5f6368;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.btn-menu {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

    .btn-menu:hover {
        background: #0056b3;
    }

.icon {
    width: 16px;
    height: 16px;
}

.icon-sm {
    width: 12px;
    height: 12px;
}

.dropdown-content {
    position: absolute;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    z-index: 100;
    top: 100%;
    margin-top: 0.25rem;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.9rem;
}

    .dropdown-item:hover {
        background: #f5f5f5;
    }

/* Entries Control */
.entries-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #5f6368;
}

.select-sm {
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Search Group */
.search-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .search-group label {
        font-size: 0.9rem;
        color: #5f6368;
    }

.filter-input {
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 200px;
}

/* Table */
.table-container {
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

    .data-table thead {
        background: #f8f9fa;
    }

    .data-table th {
        padding: 0.75rem;
        text-align: left;
        font-weight: 600;
        color: #495057;
        border-bottom: 2px solid #dee2e6;
        white-space: nowrap;
    }

.th-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sort-icons {
    font-size: x-small;
}

.sort-icons svg {
    width: 14px;
    height: 14px;
    color: #adb5bd;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    color: #212529;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.link-primary {
    color: #007bff;
    text-decoration: none;
}

    .link-primary:hover {
        text-decoration: underline;
    }

.link-info {
    color: #17a2b8;
    text-decoration: none;
}

    .link-info:hover {
        text-decoration: underline;
    }

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    background: transparent;
    border: 1px solid #dee2e6;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    width: 30px;
    height: 30px;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

    .btn-outline-primary:hover {
        background: #007bff;
        color: white;
    }

.btn-edit {
    color: #28a745;
    border-color: #28a745;
}

    .btn-edit:hover {
        background: #28a745;
        color: white;
    }

.btn-delete {
    color: #dc3545;
    border-color: #dc3545;
}

    .btn-delete:hover {
        background: #dc3545;
        color: white;
    }
/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: #5f6368;
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    gap: 0.25rem;
}

.btn-page {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #007bff;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 4px;
}

    .btn-page:hover:not(:disabled) {
        background: #e9ecef;
    }

    .btn-page.active {
        background: #007bff;
        color: white;
        border-color: #007bff;
    }

    .btn-page:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fafafa;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #17a2b8;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-note {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 1rem;
    font-style: italic;
}

.btn-add-small {
    background: transparent;
    border: none;
    color: #17a2b8;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-add-small svg {
        width: 18px;
        height: 18px;
    }

    .btn-add-small:hover {
        color: #138496;
    }

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

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

    .form-group.flex-1 {
        grid-column: span 1;
    }

    .form-group label {
        font-size: 0.9rem;
        font-weight: 500;
        color: #495057;
        margin-bottom: 0.5rem;
    }

.form-control {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
}

    .form-control:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

textarea.form-control {
    resize: vertical;
    font-family: inherit;
}

/* Tracing Table */
.tracing-table {
    overflow-x: auto;
}

.table-bordered {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.875rem;
}

    .table-bordered th,
    .table-bordered td {
        padding: 0.75rem;
        border: 1px solid #dee2e6;
        text-align: left;
    }

    .table-bordered th {
        background: #f8f9fa;
        font-weight: 600;
        color: #495057;
    }

.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d!important;
}

.action-cell {
    text-align: center;
    width: 100px;
}

.btn-icon {
    background: transparent;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.25rem;
}

    .btn-icon svg {
        width: 16px;
        height: 16px;
    }

.btn-icon-edit {
    color: #007bff;
}

    .btn-icon-edit:hover {
        color: #0056b3;
    }

.btn-icon-delete {
    color: #dc3545;
}

    .btn-icon-delete:hover {
        color: #c82333;
    }

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.btn {
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    border: none;
}

.btn-primary {
    background: #007bff;
    color: white;
}

    .btn-primary:hover {
        background: #0056b3;
    }

.btn-secondary {
    background: #6c757d;
    color: white;
}

    .btn-secondary:hover {
        background: #5a6268;
    }

/* Selection Section */
.selection-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.selection-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.selection-group {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

    .selection-group label {
        font-size: 0.9rem;
        font-weight: 500;
        color: #495057;
        margin-bottom: 0.5rem;
    }

.btn-icon-action {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

    .btn-icon-action svg {
        width: 20px;
        height: 20px;
    }

    .btn-icon-action:hover {
        background: #0056b3;
    }

/* Report Table */
.report-table-container {
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: white;
}

    .report-table thead {
        background: #f8f9fa;
        top: 0;
        z-index: 10;
    }

    .report-table th {
        padding: 0.75rem;
        text-align: left;
        font-weight: 600;
        color: #495057;
        border-bottom: 2px solid #dee2e6;
        white-space: nowrap;
    }

    .report-table td {
        padding: 1rem 0.75rem;
        border-bottom: 1px solid #dee2e6;
        color: #212529;
        vertical-align: top;
    }

    .report-table tbody tr:hover {
        background: #f8f9fa;
    }

/* Connection Details */
.connection-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

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

    .connection-icon svg {
        width: 18px;
        height: 18px;
        stroke-width: 2.5;
    }

.target-icon {
    background: #28a745;
    color: white;
}

.source-icon {
    background: #17a2b8;
    color: white;
}

.connection-text {
    flex: 1;
    line-height: 1.5;
    padding-top: 0.35rem;
}

.connection-details {
    margin-left: 2.5rem;
    margin-top: 0.5rem;
}

.btn-toggle-details {
    background: #e9ecef;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    color: #495057;
    font-size: 0.8rem;
    transition: background 0.2s;
}

    .btn-toggle-details svg {
        width: 16px;
        height: 16px;
    }

    .btn-toggle-details:hover {
        background: #dee2e6;
    }

.details-list {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007bff;
    font-size: 0.85rem;
    line-height: 1.6;
}

    .details-list div {
        padding: 0.2rem 0;
        color: #495057;
    }

.no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

    .no-data svg {
        width: 64px;
        height: 64px;
        margin-bottom: 1rem;
        opacity: 0.5;
    }

    .no-data p {
        font-size: 1.1rem;
        margin: 0;
    }

/* Reports Toolbar */
.reports-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.building-selector {
    flex: 1;
    max-width: 400px;
}

.select-building {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

    .select-building:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

.report-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-report {
    background: white;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .btn-report:hover {
        background: #f8f9fa;
        border-color: #007bff;
    }

    .btn-report svg {
        width: 18px;
        height: 18px;
        color: #5f6368;
    }

    .btn-report:hover svg {
        color: #007bff;
    }

/* Floor Plans Container */
.floor-plans-container {
    width: 100%;
    height: 100%;
    background-color: #f7f9fc;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

    .content-header h2 {
        color: #2c3e50;
        font-size: 1.5rem;
        font-weight: 400;
        margin: 0;
    }

.search-box input {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
    font-size: 0.9rem;
}

    .search-box input:focus {
        outline: none;
        border-color: #4a90e2;
    }

/* Buildings Grid */
.buildings-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

.building-card {
    background: white;
    border: 2px solid #e0e7ef;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    width:130px;
}

    .building-card:hover {
        border-color: #4a90e2;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

.building-icon {
    margin-bottom: 1rem;
}

    .building-icon svg {
        width: 48px;
        height: 48px;
        color: #6c8aa7;
    }

.building-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.floor-count {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

/*.modal-content {
    background: white;
    border-radius: 8px;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}*/

.modal-header {
    background: #004b84;
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-name {
    font-size: 0.9rem;
}

.btn-overlay {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

    .btn-overlay:hover {
        background: #357abd;
    }

.btn-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

    .btn-close:hover {
        opacity: 0.8;
    }

.modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.floor-plan-viewer {
    flex: 1;
    background: #f5f5f5;
    overflow: auto;
    padding: 1rem;
}

.floor-plan-image {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
}

    .floor-plan-image img {
        height: 75vh;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

.floor-sidebar {
    width: 280px;
    background: #e8ecf0;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-header {
    background: #7d8a96;
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    border-radius: 4px;
}

.building-info h3 {
    color: #2c3e50;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.floor-item {
    background: white;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

    .floor-item:hover {
        background: #e3e7eb;
    }

    .floor-item.active {
        background: #4a90e2;
        color: white;
        font-weight: 600;
    }

.file-list {
    margin: 0.5rem 0 1rem 1rem;
}

.file-entry {
    font-size: 0.85rem;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .file-entry:hover {
        background: #e3e7eb;
    }

    .file-entry.active {
        background: #d4e6f7;
        color: #004b84;
        font-weight: 600;
    }

.btn-go-building {
    background: #f39c12;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin-top: auto;
}

    .btn-go-building:hover {
        background: #e08e0b;
    }

.map-thumbnail {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
}

.compass {
    margin-bottom: 0.5rem;
}

    .compass svg {
        width: 60px;
        height: 60px;
        color: #4a90e2;
    }

.location-text {
    font-size: 0.85rem;
    color: #2c3e50;
    font-weight: 600;
}

.card-meta {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.meta-section {
    border-right: 1px solid #e2e8f0;
}

.meta-section:last-child {
    border-right: none;
}

.icon-box {
    background-color: #eff6ff;
    color: #2563eb;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* Print Styles */
@media print {
    .toolbar-right,
    .breadcrumb,
    .action-buttons,
    .sidebar,
    .navbar-toggler,
    .navbar-brand,
    .nav-item {
        display: none !important;
    }

    .content-area {
        padding: 0;
    }

    .report-table {
        font-size: 0.75rem;
    }

        .report-table th,
        .report-table td {
            padding: 0.5rem;
        }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar-right {
        width: 100%;
    }

    .filter-input {
        flex: 1;
    }

    .table-container {
        font-size: 0.8rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 1rem;
    }

    .action-cell {
        width: auto;
    }

    .selection-row {
        flex-direction: column;
    }

    .reports-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .building-selector {
        width: 100%;
        max-width: 100%;
    }

    .report-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .report-table {
        font-size: 0.8rem;
    }

        .report-table th,
        .report-table td {
            padding: 0.5rem;
        }

    .connection-detail {
        flex-direction: column;
        gap: 0.25rem;
    }

    .connection-details {
        margin-left: 0;
    }

    .buildings-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    .modal-body {
        flex-direction: column;
    }

    .floor-sidebar {
        width: 100%;
        max-height: 300px;
    }

    .dropdown-menu.manage-menu .dropdown-item:hover {
        color: var(--bs-dropdown-link-color);
        background-color: var(--bs-gray-500);
    }
}

/* Upload Modal Styles */
.upmodal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.upmodal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    width: 90%;
    max-width: 500px;
}

.upmodal-content {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.upmodal-header {
    padding: 1rem 1.5rem;
    background-color: #004b84;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upmodal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.5;
    color: white;
}

.upmodal-btn-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: white;
    opacity: 0.8;
    cursor: pointer;
    padding: 0;
    width: 1em;
    height: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .upmodal-btn-close:hover {
        opacity: 1;
    }

.upmodal-body {
    padding: 1.5rem;
    position: relative;
}

.upmodal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background-color: #f8f9fa;
}

/* Progress bar for upload */
.progress {
    height: 20px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    background-color: #28a745;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }

    100% {
        background-position: 0 0;
    }
}

/* Alert messages in upload modal */
.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}
.existing-images {
    margin-bottom: 2rem;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.image-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s;
}

    .image-card:hover {
        border-color: #004b84;
    }

    .image-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.btn-remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-card:hover .btn-remove-image {
    opacity: 1;
}

.image-upload-section {
    border: 2px dashed #ccc;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.upload-area ::deep input[type="file"] {
    display: block;
    margin-bottom: 0.5rem;
}

.selected-files {
    padding: 1rem;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.image-gallery-container {
    position: relative;
    display: inline-block;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s, transform 0.2s;
}

    .gallery-item:hover {
        border-color: #004b84;
        transform: scale(1.02);
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.gallery-more {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 75, 132, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

    .image-modal-content img {
        max-width: 100%;
        max-height: 90vh;
        object-fit: contain;
    }

.btn-close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    background: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

    .btn-close-modal:hover {
        background-color: #f0f0f0;
    }

.all-images-modal {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
}

.all-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 20px;
}

.all-images-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s;
}

    .all-images-item:hover {
        border-color: #004b84;
    }

    .all-images-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.all-images-item-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.all-images-item:hover .all-images-item-remove {
    opacity: 1;
}

/* Search Control Styling */
.leaflet-control-search {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin: 20px;
}

    .leaflet-control-search .search-input {
        width: 250px;
        padding: 10px 40px 10px 15px;
        border: 2px solid #e0e0e0;
        border-radius: 6px;
        font-size: 14px;
        outline: none;
        transition: border-color 0.3s;
    }

        .leaflet-control-search .search-input:focus {
            border-color: #004b84;
        }

    .leaflet-control-search .search-button {
        width: 32px;
        height: 32px;
        background: #004b84;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        position: absolute;
        right: 6px;
        top: 6px;
    }

        .leaflet-control-search .search-button:hover {
            background: #003a66;
        }

    .leaflet-control-search .search-tooltip {
        background: white;
        border-radius: 6px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        max-height: 300px;
        overflow-y: auto;
        margin-top: 5px;
    }

.search-tip {
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .search-tip:hover {
        background-color: #f5f5f5;
    }

.search-tip-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 3px;
}

.search-tip-category {
    font-size: 12px;
    color: #666;
}

.leaflet-control-search .search-cancel {
    position: absolute;
    right: 40px;
    top: 10px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    color: #666;
    display: none;
}

.leaflet-control-search.search-load .search-cancel {
    display: block;
}

/* User Card Mini Buttons */
.action-buttons-mini {
    display: flex;
    gap: 0.5rem;
}

.btn-mini {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 14px;
}

.btn-mini.btn-edit {
    background-color: #ffc107; /* Yellow */
    color: #000;
}

.btn-mini.btn-delete {
    background-color: #dc3545; /* Red */
    color: white;
}

.btn-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.user-card .card-header {
    background-color: #dfdfdf !important; /* Darker grey than background */
    border-bottom: 1px solid #ccc;
}

.user-card .card-header h6 {
    color: #000 !important; /* Black name */
    font-weight: 800 !important;
}

.user-details p {
    font-weight: 700 !important; /* Bold email/phone */
    color: #333 !important;
}

.user-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

@media (min-width: 768px) {
    #sidebarMenu {
        display: block !important;
    }
}

/* =============================================
   MOBILE RESPONSIVE STYLES
   ============================================= */

@media (max-width: 768px) {

    /* Remove the 180px sidebar left gap so content fills the screen */
    .content-area {
        padding-left: 12px !important;
        padding-right: 12px !important;
        margin-top: 4.5rem !important;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    /* --- TOOLBAR --- */
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .toolbar-left {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .toolbar-right {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start;
    }

    /* Make search inputs full width on mobile */
    .search-group {
        width: 100%;
        flex-wrap: wrap;
    }

    .filter-input {
        width: 100% !important;
        min-width: 0;
        flex: 1 1 0;
    }

    /* Make buttons smaller but still tappable */
    .toolbar-left .btn,
    .toolbar-right .btn {
        font-size: 0.82rem;
        padding: 0.35rem 0.65rem;
    }

    /* Entries control wraps nicely */
    .entries-control {
        font-size: 0.82rem;
        gap: 0.35rem;
    }

    /* --- TABLES --- */
    .table-container {
        -webkit-overflow-scrolling: touch;
        border-radius: 4px;
    }

    /* Allow table text to wrap to avoid ultra-wide cells */
    .data-table th,
    .data-table td {
        white-space: normal;
        font-size: 0.8rem;
        padding: 0.5rem 0.5rem;
    }

    /* Keep action button column from wrapping awkwardly */
    .data-table td:last-child,
    .data-table th:last-child {
        white-space: nowrap;
    }

    /* Tighten action buttons */
    .action-buttons {
        gap: 0.3rem;
    }

    .btn-action {
        width: 26px;
        height: 26px;
        padding: 0.25rem;
    }

    /* --- PAGINATION --- */
    .pagination-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .pagination-controls {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .btn-page {
        padding: 0.35rem 0.6rem;
        font-size: 0.82rem;
    }

    /* --- DROPDOWN MENU --- */
    .dropdown-menu.manage-menu {
        min-width: 140px;
        font-size: 0.85rem;
    }

    /* --- CARD AREAS (Add/Edit forms on mobile) --- */
    .card-area .card {
        margin-top: 0.75rem;
    }

    .card-area .card-body {
        padding: 1rem;
    }

    /* Stack two-col form rows on mobile */
    .card-area .row > [class*="col-md-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Extra-small screens (phones in portrait) */
@media (max-width: 576px) {

    .content-area {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* Hide sort icons to save header space */
    .sort-icons {
        display: none;
    }

    .th-content {
        justify-content: flex-start;
    }

    .data-table th,
    .data-table td {
        font-size: 0.75rem;
        padding: 0.4rem 0.35rem;
    }

    .breadcrumb {
        font-size: 0.75rem;
    }

    /* Placement Index cards go full width on small phones */
    .placement-card {
        min-width: 100% !important;
    }
}