/* Main Styles */
:root {
    --primary-color: #0ea5e9;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --sidebar-bg: #1e293b;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --transition-speed: 0.3s;
}

body {
    font-family: 'League Spartan', sans-serif;
    background-color: #f1f5f9;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Admin Layout - FIXED */
.admin-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1),
                transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    left: 0;
    top: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.admin-sidebar.collapsed {
    width: var(--sidebar-collapsed-width) !important;
}

/* MAIN CONTENT AREA - FIXED: This is the key fix */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
    position: relative;
    transition: margin-left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1),
                width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1),
                transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f1f5f9;
    width: calc(100% - var(--sidebar-width));
    box-sizing: border-box;
    overflow: hidden;
    will-change: margin-left, width;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* When sidebar is collapsed, expand main content */
.admin-sidebar.collapsed ~ .admin-main {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

/* Ensure all content inside admin-main expands properly */
.admin-main > * {
    box-sizing: border-box;
    flex-grow: 1;
}

/* Sidebar Header */
.sidebar-header {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    transition: all var(--transition-speed) ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ==================== SIDEBAR TOGGLE BUTTON FIXES ==================== */
.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
    border: none;
    color: white;
    cursor: pointer;
    flex-shrink: 0;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
    opacity: 1 !important;
    visibility: visible !important;
    text-decoration: none;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

/* Toggle button icon */
.sidebar-toggle-icon {
    font-size: 16px;
    transition: transform var(--transition-speed) ease;
}

/* When sidebar is collapsed, make the toggle button more prominent */
.admin-sidebar.collapsed .sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

.admin-sidebar.collapsed .sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

/* Rotate the chevron when collapsed */
.admin-sidebar.collapsed .sidebar-toggle-icon {
    transform: rotate(180deg);
}

/* Header adjustments for collapsed state */
.admin-sidebar.collapsed .sidebar-header {
    position: relative;
    padding: 15px !important;
    min-height: 80px;
}

.admin-sidebar.collapsed .sidebar-header-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.admin-sidebar.collapsed .sidebar-subtitle {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Make sure the toggle button stays on top */
.admin-sidebar.collapsed .sidebar-header .d-flex {
    justify-content: flex-end !important;
}

/* Make sure the header content is properly hidden in collapsed state */
.admin-sidebar.collapsed .sidebar-logo,
.admin-sidebar.collapsed .sidebar-title {
    display: none !important;
}

.admin-sidebar.collapsed .sidebar-subtitle,
.admin-sidebar.collapsed .sidebar-title {
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
    position: relative;
}

.sidebar-menu > li > a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    border-left: 4px solid transparent;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-menu > li > a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--primary-color);
}

.sidebar-menu > li > a.active {
    background: rgba(14, 165, 233, 0.2);
    color: white;
    border-left-color: var(--primary-color);
}


.sidebar-menu i {
    width: 24px;
    margin-right: 12px;
    font-size: 18px;
    flex-shrink: 0;
    min-width: 24px;
}

.menu-text {
    transition: opacity var(--transition-speed) ease;
    white-space: nowrap;
    display: inline-block;
}

.admin-sidebar.collapsed .menu-text {
    opacity: 0;
    visibility: hidden;
    width: 0;
    position: absolute;
    left: -9999px;
}

/* Fix for menu items in collapsed state */
.admin-sidebar.collapsed .sidebar-menu > li > a {
    justify-content: center;
    padding: 12px 15px;
}

.admin-sidebar.collapsed .sidebar-menu > li > a i {
    margin-right: 0;
}

/* Submenu Styles */
.has-submenu {
    position: relative;
}

.submenu-toggle {
    position: relative;
    cursor: pointer;
}

.submenu-icon {
    margin-left: auto;
    font-size: 12px;
    transition: transform var(--transition-speed) ease;
    min-width: 12px;
}

.has-submenu.open .submenu-icon {
    transform: rotate(90deg);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-height: 0;
    transition: max-height var(--transition-speed) ease;
}

.has-submenu.open .submenu {
    max-height: 200px;
}

.submenu li a {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 60px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    font-size: 14px;
    border-left: 4px solid transparent;
}

.submenu li a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-left-color: var(--primary-color);
}

.submenu li a.active {
    background: rgba(14, 165, 233, 0.15);
    color: white;
    border-left-color: var(--primary-color);
}

.submenu li a i {
    font-size: 14px;
    margin-right: 10px;
    width: 20px;
}

/* Collapsed sidebar adjustments */
.admin-sidebar.collapsed .submenu {
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 200px;
    background: var(--sidebar-bg);
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    display: none !important;
    z-index: 1001;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.admin-sidebar.collapsed .has-submenu:hover .submenu {
    display: block !important;
    animation: fadeIn 0.2s ease;
    max-height: 200px;
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.admin-sidebar.collapsed .submenu li a {
    padding: 10px 20px;
}

/* Sidebar Footer */
.sidebar-footer .user-info {
    transition: opacity var(--transition-speed) ease;
    white-space: nowrap;
    overflow: hidden;
}

.admin-sidebar.collapsed .user-info {
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}



/* User info items in grid */
.user-info-item, .station-info-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    width: 100%;
    margin-bottom: 12px;
    background: var(--light-color);
    border-radius: 8px;
    padding: 10px 15px;
}

.user-info-item:last-child,
.station-info-item:last-child {
    border-bottom: none;
}

.user-info-item i,
.station-info-item i {
    width: 24px;
    margin-right: 12px;
    color: #6b7280;
}

/* USER INFO IN COLLAPSED STATE */
.admin-sidebar.collapsed .sidebar-footer {
    padding: 15px !important;
    display: flex;
    justify-content: center;
}

.admin-sidebar.collapsed .user-info {
    display: none;
}

.admin-sidebar.collapsed .user-avatar {
    margin: 0 !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    transition: opacity var(--transition-speed) ease;
    cursor: pointer;
}

/* Mobile Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.sidebar-toggle i {
    font-size: 20px;
    color: var(--dark-color);
}

/* ==================== TOOLTIP ENHANCEMENTS ==================== */
.admin-sidebar.collapsed .sidebar-menu > li > a:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--dark-color);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    margin-left: 10px;
    z-index: 1001;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    animation: fadeInTooltip 0.2s ease;
}

@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* ==================== ACCESSIBILITY IMPROVEMENTS ==================== */
.sidebar-toggle-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==================== ENHANCED CARD ANIMATIONS ==================== */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    background: white;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-header {
    background: white;
    border-bottom: 2px solid var(--border-color);
    padding: 20px 25px;
    border-radius: 15px 15px 0 0 !important;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover .card-header {
    background: linear-gradient(135deg, #f8fafc 0%, white 100%);
}

.card-body {
    padding: 25px;
    min-width: 0;
    overflow: visible;
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 8px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0284c7);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.4);
}

/* Tables */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100%;
    table-layout: auto;
}

.table thead th {
    background: var(--light-color);
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
    color: var(--dark-color);
    padding: 15px;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    min-width: 100px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.table tbody tr:hover {
    background: rgba(14, 165, 233, 0.05);
}

.table td:last-child,
.table th:last-child {
    min-width: 150px; /* More space for action buttons */
}

/* Allow text wrap where needed */
.table td.allow-wrap {
    white-space: normal;
    word-break: break-word;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

/* ==================== ENHANCED FORM ANIMATIONS ==================== */
.form-control, .form-select {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
    transform: translateY(-2px);
}

/* File Input Styling */
.form-control[type="file"] {
    padding: 10px;
}

.form-control[type="file"]::file-selector-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.form-control[type="file"]::file-selector-button:hover {
    background: #0284c7;
    transform: translateY(-2px);
}

/* Fix for scrollbar in collapsed state */
.admin-sidebar.collapsed::-webkit-scrollbar {
    width: 3px;
}

.admin-sidebar.collapsed::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Ensure content flows properly */
.admin-main > * {
    max-width: 100%;
    overflow-x: hidden;
}

/* Dashboard specific styles for proper sizing */
.dashboard-welcome,
.page-header {
    width: 100%;
    box-sizing: border-box;
}

.quick-stats,
.quick-actions,
.user-grid {
    width: 100%;
    box-sizing: border-box;
}

/* Fix for tables to be responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Remove any max-width constraints on main content children */
.admin-main .container,
.admin-main .container-fluid {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Grid item expansion */
.admin-main .col,
.admin-main [class*="col-"] {
    flex: 1;
    min-width: 0; /* Important for text truncation */
}

/* Fix for rows and columns */
.admin-main .row {
    margin-left: -10px;
    margin-right: -10px;
    width: calc(100% + 20px);
}

.admin-main .col-md-3,
.admin-main .col-md-4,
.admin-main .col-md-6,
.admin-main .col-md-8,
.admin-main .col-md-12 {
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
}

/* Ensure flex containers expand */
.admin-main .d-flex {
    width: 100%;
}

/* Stats cards should expand */
.admin-main .stats-card {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

/* Stats number should be responsive */
.admin-main .stats-number {
    font-size: clamp(24px, 3vw, 32px);
}

/* Action bar should expand */
.admin-main .action-bar {
    width: 100%;
}


.admin-sidebar.collapsed ~ .admin-main .search-container {
    max-width: 350px;
}

/* Button groups should wrap if needed */
.admin-main .btn-group {
    flex-wrap: wrap;
    gap: 5px;
}

/* Action buttons should not wrap too early */
.admin-main .action-buttons {
    flex-wrap: nowrap;
    min-width: 120px;
}

/* ==================== USER AVATAR STYLES (Updated) ==================== */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #0284c7);
    color: white;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

/* .user-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #0284c7);
    color: white;
    font-weight: bold;
    font-size: 24px;
    margin-bottom: 16px;
} */

/* User avatar image styles */
.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-avatar-img-large {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-initials-large {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User avatar in table rows */
.table .user-avatar {
    margin-right: 12px;
}

/* ==================== IMAGE PREVIEW STYLES ==================== */
.img-thumbnail {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 4px;
    background: white;
}

.image-preview-container {
    margin-top: 10px;
    min-height: 100px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.current-image-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--light-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.current-image-preview img {
    max-width: 80px;
    max-height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.current-image-info {
    font-size: 12px;
    color: var(--secondary-color);
}

/* Form text for image upload */
.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Image upload preview */
.image-upload-preview {
    width: 100px;
    height: 100px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 10px;
    background: var(--light-color);
}

.image-upload-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ==================== USER GRID STYLES ==================== */
.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.user-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.user-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(14, 165, 233, 0.15);
    border-color: #0ea5e9;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}


/* ==================== MODAL AVATAR STYLES ==================== */
.modal .user-avatar-large {
    width: 120px;
    height: 120px;
    font-size: 48px;
    margin-bottom: 20px;
}

.modal .user-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ==================== STATUS INDICATORS ==================== */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-active {
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.status-inactive {
    background: var(--danger-color);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ==================== ACTION BUTTONS ==================== */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--secondary-color);
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

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

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

/* Button group adjustments */
.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
}

.empty-state i {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 20px;
}

/* ==================== FIX FOR SIDEBAR COLLAPSE EXPANSION ==================== */
.admin-sidebar:not(.collapsed) ~ .admin-main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

.admin-sidebar.collapsed ~ .admin-main {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

/* Ensure smooth transitions for width changes */
.admin-main {
    transition: margin-left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1),
                width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fix for content expansion */
.admin-main > .row,
.admin-main > .card,
.admin-main > .dashboard-welcome,
.admin-main > .page-header {
    width: 100%;
    max-width: 100%;
}

/* ==================== PAGE HEADER STYLES ==================== */
.page-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ==================== DASHBOARD STYLES ==================== */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 5px solid #0ea5e9;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #1f2937;
}

.stat-card p {
    color: #6b7280;
    margin-bottom: 0;
}

.stat-card i {
    font-size: 24px;
    color: #0ea5e9;
    margin-bottom: 15px;
}

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

.action-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.action-card:hover {
    transform: translateY(-5px);
    border-color: #0ea5e9;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.1);
}

.action-card i {
    font-size: 32px;
    color: #0ea5e9;
    margin-bottom: 15px;
}

.action-card h4 {
    margin-bottom: 10px;
    color: #1f2937;
}

.action-card p {
    color: #6b7280;
    font-size: 14px;
}

/* ==================== USER MANAGEMENT STYLES ==================== */
/* Stats Cards */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 15px;
}

.stats-number {
    font-size: 32px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
}

.stats-label {
    color: #6b7280;
    font-size: 14px;
    margin-top: 5px;
}

/* Search and Filter */
.search-container {
    position: relative;
    width: 300px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    z-index: 10;
}

.search-input {
    padding-left: 45px;
    min-width: 200px;
    width: 200px;
}

.filter-dropdown {
    min-width: 200px;
    width: 200px;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 10px;
}

.view-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--border-color);
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.view-toggle-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.view-toggle-btn:hover:not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
        transition: transform var(--transition-speed) ease;
    }
    
    .admin-sidebar.collapsed {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }
    
    .admin-main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px;
        transition: transform var(--transition-speed) ease;
    }
    
    .admin-sidebar.collapsed ~ .admin-main {
        margin-left: 0 !important;
        width: 100% !important;
        transform: none !important;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar-open .admin-sidebar {
        transform: translateX(0);
    }
    
    .sidebar-open .admin-main {
        transform: translateX(var(--sidebar-width));
    }
    
    .sidebar-open .sidebar-overlay {
        display: block;
        opacity: 1;
    }
    
    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden;
    }
    
    /* Dashboard grid adjustments */
    .quick-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Mobile sidebar toggle button positioning */
    .sidebar-toggle-btn {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .admin-sidebar.collapsed .sidebar-toggle-btn {
        right: 15px;
    }
    
    /* Search container adjustments */
    .search-container {
        width: 100%;
        max-width: 100%;
    }
    
    .filter-dropdown,
    .search-input {
        width: 100%;
        max-width: 100%;
    }

    
    /* User grid adjustments */
    .user-grid {
        grid-template-columns: 1fr;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 10px;
    }
}

@media (max-width: 576px) {
    .admin-main {
        padding: 10px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .action-card,
    .stats-card {
        padding: 15px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .user-grid {
        grid-template-columns: 1fr;
    }
    
    /* Action buttons in table */
    .action-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn-action {
        width: 35px;
        height: 35px;
    }
}

/* Responsive text sizing */
@media (min-width: 1200px) {
    .admin-sidebar.collapsed ~ .admin-main {
        padding: 25px 30px;
    }
    
    .admin-sidebar.collapsed ~ .admin-main .card {
        padding: 25px;
    }
    
    .admin-sidebar.collapsed ~ .admin-main .quick-stats,
    .admin-sidebar.collapsed ~ .admin-main .quick-actions {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Media queries for very large screens */
@media (min-width: 1400px) {
    .admin-main {
        padding: 30px;
    }
    
    .admin-sidebar.collapsed ~ .admin-main {
        padding: 30px 40px;
    }
    
    .admin-main .quick-stats {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
    
    .admin-main .quick-actions {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .admin-main .user-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

/* Fix for print view */
@media print {
    .admin-sidebar {
        display: none;
    }
    
    .admin-main {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .admin-main .card {
        break-inside: avoid;
    }
    
    /* Hide action buttons when printing */
    .action-buttons {
        display: none;
    }
}

/* ==================== FADE IN ANIMATIONS ==================== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== SCROLLBAR STYLING ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}


/* ==================== STATION MANAGEMENT STYLES ==================== */

/* Station avatar styles */
.station-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #0ea5e9);
    color: white;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.station-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #0ea5e9);
    color: white;
    font-weight: bold;
    font-size: 24px;
    margin-bottom: 16px;
    overflow: hidden;
}

/* Station avatar image styles */
.station-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.station-avatar-img-large {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.station-avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.station-avatar-initials-large {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


.station-info-item span {
    flex: 1;
    word-break: break-word;
}

/* Station grid */
.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.station-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.station-card:hover {
    transform: translateY(-5px);
    border-color: #10b981;
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.15);
}

/* Image preview for modals */
.user-avatar-large,
.station-image-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #0ea5e9);
    color: white;
    font-size: 48px;
    font-weight: bold;
}

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

/* Form preview containers */
.image-upload-preview {
    width: 120px;
    height: 120px;
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8fafc;
}

.image-upload-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.current-image-preview {
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Station-specific status indicators */
.status-active {
    background: #10b981;
}

.status-inactive {
    background: #ef4444;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .station-grid {
        grid-template-columns: 1fr;
    }
    
    .station-avatar-large {
        width: 80px;
        height: 80px;
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .station-card {
        padding: 15px;
    }
    
    .station-info-item {
        font-size: 14px;
    }
}

/* ==================== TANK MANAGEMENT STYLES ==================== */

/* Tank card styles */
.tank-card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    height: 100%;
}

.tank-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Volume circle styles */
.volume-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    position: relative;
}

.volume-progress {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        #10b981 0%,
        #10b981 var(--percentage, 0%),
        #e2e8f0 var(--percentage, 0%) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.volume-progress::before {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    background: white;
    border-radius: 50%;
}

.volume-text {
    position: relative;
    z-index: 1;
    font-weight: bold;
    font-size: 1.5rem;
    color: #1e293b;
}

.volume-circle.low .volume-progress {
    background: conic-gradient(
        #ef4444 0%,
        #ef4444 var(--percentage, 0%),
        #fee2e2 var(--percentage, 0%) 100%
    );
}

.volume-circle.warning .volume-progress {
    background: conic-gradient(
        #f59e0b 0%,
        #f59e0b var(--percentage, 0%),
        #fef3c7 var(--percentage, 0%) 100%
    );
}

/* Tank status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background-color: #f3f4f6;
    color: #6b7280;
}

.status-low {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Tank stats card */
.tank-stats-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.tank-stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

/* Tank actions */
.tank-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tank-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    flex: 1;
    min-width: 70px;
    text-align: center;
}

/* Tank details grid */
.tank-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

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

.tank-detail-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.tank-detail-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.875rem;
}


.info-item i {
    width: 24px;
    color: #6b7280;
    margin-right: 10px;
}


.info-label {
    font-weight: 600;
    color: #6b7280;
    margin-right: 5px;
}

.info-value {
    color: #1e293b;
    font-weight: 500;
    word-break: break-word;
}

/* Toast notifications */
.toast-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 5px;
    color: white;
    z-index: 9999;
    min-width: 250px;
    max-width: 90%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast-alert.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-alert.success {
    background-color: #10b981;
    border-left: 4px solid #059669;
}

.toast-alert.error {
    background-color: #ef4444;
    border-left: 4px solid #dc2626;
}

.toast-alert.info {
    background-color: #0ea5e9;
    border-left: 4px solid #0284c7;
}

/* Responsive adjustments for tanks */
@media (max-width: 1200px) {
    .volume-circle {
        width: 100px;
        height: 100px;
    }
    .volume-text {
        font-size: 1.25rem;
    }
}

@media (max-width: 992px) {
    .tank-details-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .volume-circle {
        width: 90px;
        height: 90px;
    }
    .volume-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .tank-card .card-body {
        padding: 1rem;
    }
    
    .volume-circle {
        width: 80px;
        height: 80px;
    }
    
    .volume-text {
        font-size: 1rem;
    }
    
    .tank-actions .btn {
        min-width: 60px;
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .toast-alert {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        transform: translateY(-100%);
    }
    
    .toast-alert.show {
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    .tank-card {
        margin-bottom: 1rem;
    }
    
    .volume-circle {
        width: 70px;
        height: 70px;
    }
    
    .volume-text {
        font-size: 0.9rem;
    }
    
    .tank-actions {
        gap: 0.25rem;
    }
    
    .tank-actions .btn {
        min-width: 50px;
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
}

/* Grid adjustments for tanks */
@media (min-width: 1200px) {
    #tanksGrid .col-lg-4 {
        flex: 0 0 auto;
        width: 33.33333333%;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    #tanksGrid .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    #tanksGrid .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
    }
}

@media (max-width: 767px) {
    #tanksGrid .col-md-6 {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* Delete choice modal styles */
.delete-choice-modal .modal-footer {
    justify-content: space-between;
}

.delete-choice-modal .btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #d97706;
    color: white;
}

.delete-choice-modal .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #dc2626;
    color: white;
}

.delete-choice-modal .alert {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
}

.delete-choice-modal .alert i {
    font-size: 18px;
}

/* ==================== RESPONSIVE STATS CARD STYLES ==================== */

/* Base styles for stats cards */


/* Responsive adjustments for stats cards */
@media (max-width: 1200px) {
    .stats-number {
        font-size: 28px;
    }
    
    .stats-icon {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
}

@media (max-width: 992px) {
    /* Medium screens: 2 cards per row */
    .stats-card {
        padding: 18px 15px;
    }
    
    .stats-number {
        font-size: 26px;
    }
    
    .stats-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .stats-label {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    /* Small screens: 2 cards per row */
    .stats-card {
        padding: 16px 12px;
    }
    
    .stats-number {
        font-size: 24px;
    }
    
    .stats-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .stats-label {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    /* Extra small screens: 1 card per row */
    .stats-card {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .stats-number {
        font-size: 28px;
    }
    
    .stats-icon {
        width: 55px;
        height: 55px;
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .stats-label {
        font-size: 14px;
    }
}

@media (max-width: 375px) {
    /* Very small screens */
    .stats-card {
        padding: 15px 10px;
    }
    
    .stats-number {
        font-size: 24px;
    }
    
    .stats-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .stats-label {
        font-size: 12px;
    }
}

/* Grid system adjustments for consistent spacing */
.row.mb-4 {
    margin-bottom: 1.5rem !important;
}

.row.mb-4 > div {
    margin-bottom: 15px;
}

/* Remove default Bootstrap column padding for better control */
.row.mb-4 [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
}

/* Ensure consistent card heights in same row */
.row.mb-4 .col-xl-3,
.row.mb-4 .col-lg-4,
.row.mb-4 .col-md-6,
.row.mb-4 .col-sm-6 {
    display: flex;
}

.row.mb-4 .stats-card {
    flex: 1;
}


/* ==================== PUMP MANAGEMENT STYLES ==================== */
.pump-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    height: 100%;
}

.pump-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #0ea5e9;
}

.pump-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pump-status.active {
    background-color: #d1fae5;
    color: #065f46;
}

.pump-status.inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.pump-status.unassigned {
    background-color: #fef3c7;
    color: #92400e;
}

.pump-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 15px;
}

.price-badge {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.info-item {
    margin-bottom: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #0ea5e9;
}

/* Grid View Styles */
.pump-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.pump-card-grid {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pump-card-grid:hover {
    transform: translateY(-5px);
    border-color: #0ea5e9;
    box-shadow: 0 15px 40px rgba(14, 165, 233, 0.15);
}

.pump-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}

.pump-detail-item {
    display: flex;
    flex-direction: column;
    word-break: break-word;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
}

.pump-detail-label {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 2px;
}

.pump-detail-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 12px;
}

/* Hide table/grid based on view */
.tableView {
    display: none;
}

.gridView {
    display: none;
}

.activeView {
    display: block !important;
}

.view-toggle-btn.active {
    background: #0ea5e9 !important;
    color: white !important;
    border-color: #0ea5e9 !important;
}

/* Modal error styles */
/* .modal-error {
    margin: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
} */


.modal-error {
    margin: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
    position: relative;
    z-index: 1061; /* Higher than modal backdrop (1050) */
    animation: shake 0.5s ease-in-out;
}


@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Ensure modal content has proper stacking context */
.modal-content {
    position: relative;
    z-index: 1060;
}

.modal-backdrop {
    z-index: 1050;
}

/* Loading spinner for modal buttons */
.btn-loading {
    position: relative;
}

.btn-loading .spinner-border {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-loading .btn-text {
    opacity: 0;
}


/* Alert styles for modals */
.alert {
    position: relative;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

/* Ensure modal backdrop doesn't interfere */
.modal-backdrop {
    z-index: 1050 !important;
}

.modal {
    z-index: 1060 !important;
}

/* Make sure modal errors are on top */
.modal-content .alert {
    z-index: 1061 !important;
    position: relative;
}