.btn-action {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.08) 0%, rgba(23, 162, 184, 0.04) 100%) !important;
    color: #17a2b8 !important;
    border: 2px solid rgba(23, 162, 184, 0.3) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 22px;
    border-radius: 8px;
    transition: all 0.3s;
    min-width: 220px;
    text-align: center;
}
.btn-action:hover, .btn-action:focus {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.12) 0%, rgba(23, 162, 184, 0.06) 100%) !important;
    color: #17a2b8 !important;
    border-color: rgba(23, 162, 184, 0.4) !important;
    box-shadow: 0 4px 16px rgba(23, 162, 184, 0.2);
    transform: translateY(-1px);
}
/* ==============================================
   IMPROVED UI ENHANCEMENTS FOR GAGETRAC
   Professional, clean, and responsive design
   ============================================== */

/* === FILTER IMPROVEMENTS === */
.filters-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #a0a0a0;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-actions .btn {
    min-width: 100px;
}

.btn-clear {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #a0a0a0;
    transition: all 0.2s;
}

.btn-clear:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    color: #e0e0e0;
}

/* === FORM IMPROVEMENTS === */
.form-control, .form-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
    color: #ffffff;
    outline: none;
}

.form-control::placeholder {
    color: #666;
    opacity: 1;
}

.form-select option {
    background: #1a1a1a;
    color: #e0e0e0;
}

/* === CARD IMPROVEMENTS === */
/* CARD STYLES MOVED TO static/css/master-colors.css */
/* DO NOT ADD CARD STYLES HERE - USE MASTER-COLORS.CSS ONLY */

.card-header h2,
.card-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #ffffff !important;
}

.card-header h3 {
    font-size: 1.25rem;
}

.card-body {
    padding: 24px;
}

/* === DASHBOARD STATS === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Default - DARK MODE - very transparent */
.stat-card {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05) 0%, rgba(74, 144, 226, 0.02) 100%);
    border: 2px solid rgba(74, 144, 226, 0.15);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(74, 144, 226, 0.1);
    border-color: rgba(74, 144, 226, 0.25);
}

.stat-card.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05) 0%, rgba(255, 193, 7, 0.02) 100%);
    border-color: rgba(255, 193, 7, 0.15);
}

.stat-card.warning:hover {
    box-shadow: 0 6px 12px rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.25);
}

.stat-card.danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05) 0%, rgba(220, 53, 69, 0.02) 100%);
    border-color: rgba(220, 53, 69, 0.15);
}

.stat-card.danger:hover {
    box-shadow: 0 6px 12px rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.25);
}

.stat-card.success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(40, 167, 69, 0.02) 100%);
    border-color: rgba(40, 167, 69, 0.15);
}

.stat-card.success:hover {
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.25);
}

/* Light mode ONLY - solid colors */
/* Light mode - muted solid colors */
:root .stat-card,
body:not(.dark-theme) .stat-card {
    background: #232a32 !important;
    border-color: #34495e !important;
}

:root .stat-card.success,
body:not(.dark-theme) .stat-card.success {
    background: #206644 !important;
    border-color: #2ecc71 !important;
}

:root .stat-card.danger,
body:not(.dark-theme) .stat-card.danger {
    background: #7a2a1d !important;
    border-color: #e74c3c !important;
}

:root .stat-card.warning,
body:not(.dark-theme) .stat-card.warning {
    background: #8a6d00 !important;
    border-color: #ffc107 !important;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 1;
    color: #ffffff !important;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

body.dark-theme .stat-icon {
    opacity: 1;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 8px 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: #e0e0e0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* === TABLE IMPROVEMENTS === */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.table {
    margin-bottom: 0;
    color: var(--table-text);
}

.table thead th {
    background: var(--table-header-bg);
    color: var(--table-header-text);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 16px;
    border-bottom: 2px solid rgba(74, 144, 226, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Override sticky positioning for browse gages list view */
#gagesTable thead th {
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
}

.table tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table tbody tr:hover {
    background: var(--table-row-hover);
    transform: scale(1.002);
}

.table tbody tr.active {
    background: rgba(74, 144, 226, 0.15);
    border-left: 3px solid #4a90e2;
}

.table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    color: var(--table-text);
}

/* === LIST GROUP IMPROVEMENTS === */
.list-group {
    background: var(--list-bg);
    border-radius: 10px;
}

.list-group-item {
    background: var(--list-bg) !important;
    color: var(--list-text) !important;
    border-color: var(--list-border) !important;
    padding: 14px 16px;
    transition: all 0.2s;
}

.list-group-item:hover {
    background: var(--bg-hover) !important;
}

.list-group-item.active {
    background: rgba(74, 144, 226, 0.2) !important;
    border-color: #4a90e2 !important;
}

.list-group-flush .list-group-item {
    border-left: 0;
    border-right: 0;
}

/* === BADGE IMPROVEMENTS === */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.badge.bg-success {
    background: rgba(40, 167, 69, 0.9) !important;
}

.badge.bg-warning {
    background: rgba(255, 193, 7, 0.9) !important;
    color: #000 !important;
}

.badge.bg-danger {
    background: rgba(220, 53, 69, 0.9) !important;
}

.badge.bg-secondary {
    background: rgba(108, 117, 125, 0.9) !important;
}

.badge.bg-info {
    background: rgba(23, 162, 184, 0.9) !important;
}

/* === BUTTON IMPROVEMENTS === */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: #4a6b8a !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.btn-primary:hover {
    background: #3a5570 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    transform: translateY(-1px) !important;
}

.btn-success {
    background: #3d6b4a !important;
    border: 2px solid #5a9d6f !important;
    color: #e0e0e0 !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.btn-success:hover {
    background: #4a7c59 !important;
    border-color: #6bb080 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 12px rgba(90, 157, 111, 0.3);
    transform: translateY(-1px);
}

.btn-danger {
    background: #7a2a1d !important;
    border: 2px solid #e87c7c !important;
    color: #ffffff !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.btn-danger:hover {
    background: #5c1f16 !important;
    border-color: #e87c7c !important;
    color: #ffffff !important;
    box-shadow: 0 6px 12px rgba(232, 124, 124, 0.3);
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #000;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #c69500 100%);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-group .btn {
    margin: 0 2px;
}

/* === PAGINATION IMPROVEMENTS === */
.pagination {
    gap: 6px;
}

.pagination .page-item .page-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border-radius: 6px;
    padding: 8px 14px;
    transition: all 0.2s;
}

.pagination .page-item .page-link:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: #4a90e2;
    color: #ffffff;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-color: #4a90e2;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.pagination .page-item.disabled .page-link {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
    color: #666;
}

/* === LOADING STATES === */
.loading-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: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(74, 144, 226, 0.2);
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === TOOLTIP IMPROVEMENTS === */
[data-bs-toggle="tooltip"] {
    cursor: help;
}

.tooltip .tooltip-inner {
    background: #1e1e1e;
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.tooltip .tooltip-arrow::before {
    border-top-color: #1e1e1e !important;
}

/* === ALERT IMPROVEMENTS === */
.alert {
    border-radius: 10px;
    padding: 16px 20px;
    border: none;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(40, 167, 69, 0.95);
    color: #ffffff;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.95);
    color: #ffffff;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.95);
    color: #000000;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: rgba(23, 162, 184, 0.95);
    color: #ffffff;
    border-left: 4px solid #17a2b8;
}

/* === MODAL IMPROVEMENTS === */
.modal-content {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    background: linear-gradient(135deg, #252525 0%, #2a2a2a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
}

.modal-header .modal-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.7;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 24px;
    color: #e0e0e0;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 24px;
}

/* === RESPONSIVE IMPROVEMENTS === */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 16px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 10px 16px;
        border: none;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #a0a0a0;
        text-transform: uppercase;
        font-size: 0.85rem;
    }
}

/* === ACCESSIBILITY IMPROVEMENTS === */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #4a90e2;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* === FOCUS STYLES === */
*:focus-visible {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
.btn:focus-visible {
    outline: 2px solid #4a90e2;
    outline-offset: 3px;
}

/* === SMOOTH SCROLL === */
html {
    scroll-behavior: smooth;
}

/* === PRINT STYLES === */
@media print {
    .sidebar,
    .filters-container,
    .btn,
    .pagination {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    body {
        background: #fff;
        color: #000;
    }
}

/* ===================================================================
   ALL SIDEBAR AND COLOR STYLES MOVED TO: static/css/master-colors.css
   DO NOT ADD COLOR RULES HERE - USE MASTER-COLORS.CSS ONLY
   =================================================================== */
