/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    position: relative;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
}

/* Dashboard */
.dashboard h1 {
    margin-bottom: 2rem;
    color: var(--text-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-icon {
    font-size: 3rem;
}

.stat-content h3 {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.dashboard-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.dashboard-card h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--text-color);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-bg);
}

thead {
    background-color: var(--bg-color);
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-color);
}

tbody tr:hover {
    background-color: var(--bg-color);
}

code {
    background-color: var(--bg-color);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Records Page */
.records-page h1, .form-page h1, .record-detail h1 {
    margin-bottom: 2rem;
}

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

.search-box {
    margin-bottom: 2rem;
}

.search-box form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
}

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

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-info {
    font-weight: 500;
}

/* Forms */
.form-card, .detail-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    max-width: 900px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
}

/* Record Detail */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item label {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.detail-item span {
    font-size: 1rem;
    color: var(--text-color);
}

.map-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.map-info h3 {
    margin-bottom: 1rem;
}

.action-buttons {
    margin-top: 2rem;
}

/* User Menu Dropdown */
.nav-user-menu {
    position: relative;
    cursor: pointer;
}

.nav-username {
    padding: 0.5rem 1rem;
    background-color: var(--bg-color);
    border-radius: 0.375rem;
    font-weight: 500;
    display: inline-block;
}

.nav-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background-color: var(--card-bg);
    border-radius: 0.375rem;
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    z-index: 1000;
}

.nav-user-menu:hover .nav-dropdown {
    display: block;
}

.nav-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s;
}

.nav-dropdown a:hover {
    background-color: var(--bg-color);
}

.nav-dropdown a:first-child {
    border-radius: 0.375rem 0.375rem 0 0;
}

.nav-dropdown a:last-child {
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Footer */
footer {
    background-color: var(--card-bg);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer p {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .search-box form {
        flex-direction: column;
    }

    .actions {
        flex-direction: column;
    }

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

/* Filter Panel */
.filter-panel {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.filter-panel h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.25rem;
}

.filter-form {
    width: 100%;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-height: 100px; /* Ensure enough space for badges */
}

.filter-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.875rem;
}

.filter-group input,
.filter-group select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background-color: white;
    transition: border-color 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.active-filters {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.active-filters strong {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 0.5rem;
}

.filter-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Results Section */
.results-section {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.results-header h2 {
    font-size: 1.25rem;
    color: var(--text-color);
    margin: 0;
}

.results-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-bg);
}

.data-table thead {
    background-color: var(--bg-color);
}

.data-table th {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.875rem;
    white-space: nowrap;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.data-table tbody tr:hover {
    background-color: var(--bg-color);
}

.data-table .timestamp {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.data-table .monospace {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.data-table .monospace a {
    color: var(--primary-color);
    text-decoration: none;
}

.data-table .monospace a:hover {
    text-decoration: underline;
}

.data-table .station-name {
    font-weight: 500;
    color: var(--text-color);
}

.data-table .duration {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.data-table .data-size {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    text-align: right;
}

.data-table .location {
    color: var(--secondary-color);
    font-size: 0.85rem;
}

.data-table .isp {
    color: var(--secondary-color);
    font-size: 0.8rem;
}

.data-table .text-muted {
    color: var(--secondary-color);
    font-style: italic;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.pagination .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.page-numbers a,
.page-numbers .current-page {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.page-numbers a {
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.page-numbers a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-numbers .current-page {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.page-numbers .ellipsis {
    padding: 0 0.5rem;
    color: var(--secondary-color);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--secondary-color);
}

.no-results p {
    margin-bottom: 1rem;
}

.no-results a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.no-results a:hover {
    text-decoration: underline;
}

/* Quick Stats */
.quick-stats {
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.quick-stats h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.quick-stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 0;
}

.quick-stats .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.quick-stats .stat-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.quick-stats .stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Page Header */
.page-header .subtitle {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Responsive adjustments for filters */
@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
        width: 100%;
    }

    .filter-actions .btn {
        width: 100%;
    }

    .active-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .page-numbers {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

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

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

/* Interactive Filter Input Groups */
.filter-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.filter-input-group .filter-select {
    flex: 1;
}

.btn-add-filter {
    padding: 0.5rem 0.75rem;
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 40px;
}

.btn-add-filter:hover {
    background-color: #059669;
    transform: scale(1.05);
}

.btn-add-filter:active {
    transform: scale(0.95);
}

/* Filter Badges Container */
.filter-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    min-height: 32px;
    position: relative;
    z-index: 1;
}

.filter-badge-removable {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.remove-badge {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    transition: transform 0.2s;
    font-weight: bold;
}

.remove-badge:hover {
    transform: scale(1.2);
}

.remove-badge:active {
    transform: scale(0.9);
}

/* Empty state for filter badges */
.filter-badges:empty::before {
    content: 'No filters selected';
    color: var(--secondary-color);
    font-size: 0.75rem;
    font-style: italic;
}

/* Mountpoints Dashboard Styles */
.container-fluid {
    max-width: 1600px;
    padding: 0 2rem;
}

.container-fluid h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.container-fluid h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.container-fluid h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Bootstrap-style Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.col-12, .col-md-3, .col-md-4, .col-md-6, .col-md-8 {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

/* Spacing utilities */
.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* Card Styles for Mountpoints */
.card {
    background-color: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-body {
    padding: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.card-header h5 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.card-text {
    margin: 0;
}

/* Colored Cards */
.text-white {
    color: white !important;
}

.bg-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.display-4 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.display-6 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.h5 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Form Elements */
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-select {
    display: block;
    width: 100%;
    padding: 0.6rem 2.5rem 0.6rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-color);
    background-color: white;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    appearance: none;
}

.form-select:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Enhanced Table Styles */
.table-responsive {
    overflow-x: auto;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.table {
    width: 100%;
    margin-bottom: 0;
    background-color: white;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead {
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
}

.table thead th {
    padding: 1rem 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(248, 250, 252, 0.5);
}

.table-hover tbody tr {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.table-hover tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.05);
}

.table-sm th,
.table-sm td {
    padding: 0.5rem;
    font-size: 0.875rem;
}

.text-end {
    text-align: right !important;
}

.text-muted {
    color: var(--secondary-color) !important;
}

/* Mountpoint Selector Enhancement */
#mountpoint-selector {
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Overview Cards Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: slideUp 0.4s ease-out;
}

.card:nth-child(1) {
    animation-delay: 0s;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.2s;
}

.card:nth-child(4) {
    animation-delay: 0.3s;
}

/* Improve readability for large numbers */
.display-4, .display-6 {
    font-variant-numeric: tabular-nums;
}

/* Enhance code elements in tables */
code {
    background-color: var(--bg-color);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
    font-size: 0.85em;
    color: #e74c3c;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Strong emphasis in tables */
strong {
    font-weight: 600;
    color: var(--text-color);
}

/* Responsive Design for Mountpoints Dashboard */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0 1rem;
    }

    .container-fluid h1 {
        font-size: 1.75rem;
    }

    .container-fluid h2 {
        font-size: 1.5rem;
    }

    .col-md-3, .col-md-4, .col-md-6, .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .row {
        margin-right: -0.5rem;
        margin-left: -0.5rem;
    }

    .col-12, .col-md-3, .col-md-4, .col-md-6, .col-md-8 {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-6 {
        font-size: 1.5rem;
    }

    .table {
        font-size: 0.875rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.5rem;
    }

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

/* Data visualization enhancements */
.stat-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.stat-indicator.primary {
    background-color: var(--primary-color);
}

.stat-indicator.success {
    background-color: var(--success-color);
}

.stat-indicator.info {
    background-color: var(--info-color);
}

.stat-indicator.warning {
    background-color: var(--warning-color);
}

/* Map Styles for Mountpoints Dashboard */
#mountpoint-map {
    border-radius: 0;
}

/* Custom styling for Leaflet popups */
.leaflet-popup-content-wrapper {
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Marker cluster styling */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(37, 99, 235, 0.6);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background-color: rgba(37, 99, 235, 0.8);
    color: white;
    font-weight: 600;
}

/* Loading state for map */
.map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--secondary-color);
    font-size: 1rem;
}

.map-loading::after {
    content: '...';
    display: inline-block;
    animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}
