/* ============================================
   OTMS - Clean Professional Theme
   ============================================ */

:root {
    /* Green & Dark Red Color Palette */
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #22c55e;

    --accent: #991b1b;
    --accent-dark: #7f1d1d;
    --accent-light: #b91c1c;

    --sidebar-bg: #1f2937;
    --sidebar-hover: #374151;
    --sidebar-active: #16a34a;
    --sidebar-text: #9ca3af;
    --sidebar-text-active: #ffffff;

    --navbar-bg: #16a34a;
    --navbar-border: #15803d;

    --bg-main: #f9fafb;
    --bg-card: #ffffff;

    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    --border-color: #e5e7eb;
    --border-light: #f3f4f6;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #991b1b;
    --info: #3b82f6;

    /* Layout */
    --navbar-height: 64px;
    --sidebar-width: 260px;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

/* ============================================
   Base Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.125rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary-dark);
}

.ls-1 {
    letter-spacing: 0.05em;
}

/* ============================================
   Hero & Landing Page
   ============================================ */

.hero-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f0fdf4 0%, #f9fafb 100%);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.tracking-card {
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    margin-top: -40px;
}

.tracking-input-group {
    display: flex;
    background: var(--border-light);
    border-radius: var(--radius-md);
    padding: 4px;
    border: 1px solid var(--border-color);
}

.tracking-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-primary);
}

.tracking-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.btn-track {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 0 32px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-track::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-track:hover::before {
    left: 100%;
}

.btn-track:hover {
    background: linear-gradient(135deg, #15803d 0%, #14532d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
}

/* ============================================
   Login Page
   ============================================ */

.login-body {
    background: linear-gradient(45deg, #064e3b 0%, #7f1d1d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

/* ============================================
   Navbar
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: linear-gradient(135deg, #16a34a 0%, #15803d 50%, #14532d 100%);
    border-bottom: 1px solid rgba(21, 128, 61, 0.3);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.15);
    z-index: 1030;
    display: flex;
    align-items: center;
    padding: 0 var(--space-6);
}

.navbar .container-fluid {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
}

.navbar-brand i {
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Sidebar Toggle Buttons */
#sidebarToggleMobile,
#sidebarToggleDesktop {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#sidebarToggleMobile i,
#sidebarToggleDesktop i {
    color: #ffffff !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

#sidebarToggleMobile::before,
#sidebarToggleDesktop::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

#sidebarToggleMobile:hover::before,
#sidebarToggleDesktop:hover::before {
    width: 200%;
    height: 200%;
}

#sidebarToggleMobile:hover,
#sidebarToggleDesktop:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#sidebarToggleMobile:hover i,
#sidebarToggleDesktop:hover i {
    transform: scale(1.1);
}

#sidebarToggleMobile:active,
#sidebarToggleDesktop:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    transition: all 0.15s ease;
    font-size: 0.875rem;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 1.125rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-collapse {
    flex-grow: 1;
}

/* User avatar in navbar */
.navbar .rounded-circle {
    flex-shrink: 0;
}

/* Dropdown styling */
.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    margin-top: var(--space-2);
}

.dropdown-item {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background-color: var(--border-light);
    color: var(--text-primary);
}

/* Notification dropdown */
#notificationDropdown {
    max-height: 400px;
    overflow-y: auto;
}

/* Mobile navbar improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--navbar-bg);
        padding: var(--space-3);
        margin-top: var(--space-2);
        border-radius: var(--radius-md);
    }
    
    .navbar-nav {
        gap: var(--space-1);
    }
    
    .nav-link {
        padding: var(--space-3);
    }
    
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0.1);
        margin-top: var(--space-1);
    }
    
    .dropdown-item {
        color: rgba(255, 255, 255, 0.9);
    }
    
    .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background-color: var(--sidebar-bg);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1020;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Collapsed State (icon-only) */
.sidebar-collapsed .sidebar {
    width: 80px;
    overflow-x: hidden;
}

.sidebar-collapsed .sidebar .sidebar-header h5,
.sidebar-collapsed .sidebar .nav-link span,
.sidebar-collapsed .sidebar .accordion-button span,
.sidebar-collapsed .sidebar .accordion-button::after {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sidebar-collapsed .sidebar .nav-link,
.sidebar-collapsed .sidebar .accordion-button,
.sidebar-collapsed .sidebar button.nav-link {
    justify-content: center;
    padding: var(--space-3) 0;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-collapsed .sidebar .nav-link i,
.sidebar-collapsed .sidebar .accordion-button i,
.sidebar-collapsed .sidebar button.nav-link i {
    font-size: 1.25rem;
    width: auto;
    margin: 0;
}

/* Hide all collapse/dropdown content when sidebar is collapsed */
.sidebar-collapsed .sidebar .collapse,
.sidebar-collapsed .sidebar .collapsing {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
}

/* Hide arrow indicators when sidebar is collapsed (icon-only mode) */
.sidebar-collapsed .sidebar button.nav-link[data-bs-toggle="collapse"]::after,
.sidebar-collapsed .sidebar .accordion-button::after {
    display: none !important;
}

/* Center the icons for collapse toggle buttons in collapsed state */
.sidebar-collapsed .sidebar button.nav-link[data-bs-toggle="collapse"] {
    justify-content: center;
    padding: var(--space-3) 0;
}

.sidebar-collapsed .main-content {
    margin-left: 80px;
    width: calc(100% - 80px);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tooltip for collapsed sidebar items */
.sidebar-collapsed .nav-link,
.sidebar-collapsed .accordion-button,
.sidebar-collapsed button.nav-link {
    position: relative;
}

.sidebar-collapsed .nav-link:hover::after,
.sidebar-collapsed button.nav-link:hover::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-primary);
    color: white;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    white-space: nowrap;
    margin-left: var(--space-2);
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    font-size: 0.875rem;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease-in-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* Scrollbar styling */
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-header {
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h5 {
    color: var(--sidebar-text-active);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin: 0;
}

.sidebar .nav {
    padding: var(--space-4) 0;
}

.sidebar .nav-item {
    margin: 0 var(--space-3);
}

.sidebar .nav-link,
.sidebar button.nav-link {
    color: var(--sidebar-text);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: var(--space-1);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    position: relative;
}

.sidebar .nav-link i,
.sidebar button.nav-link i {
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

/* Arrow indicator for collapsible menu items */
.sidebar button.nav-link[data-bs-toggle="collapse"]::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.7rem;
    margin-left: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
}

/* Rotate arrow when menu is expanded */
.sidebar button.nav-link[data-bs-toggle="collapse"]:not(.collapsed)::after {
    transform: rotate(180deg);
    opacity: 1;
}

.sidebar .nav-link:hover {
    background: linear-gradient(135deg, rgba(55, 65, 81, 1) 0%, rgba(55, 65, 81, 0.8) 100%);
    color: var(--sidebar-text-active);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link.active,
.sidebar button.nav-link:not(.collapsed) {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: var(--sidebar-text-active);
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.3);
    font-weight: 600;
}

/* Accordion in Sidebar */
.sidebar .accordion {
    --bs-accordion-bg: transparent;
    --bs-accordion-border-width: 0;
}

.sidebar .accordion-item {
    background: transparent;
    border: none;
    margin: 0 var(--space-3);
}

.sidebar .accordion-button {
    background-color: transparent;
    color: var(--sidebar-text);
    border: none;
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: none !important;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 0 var(--space-1) 0;
}

.sidebar .accordion-button i {
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.sidebar .accordion-button:hover {
    background: linear-gradient(135deg, rgba(55, 65, 81, 1) 0%, rgba(55, 65, 81, 0.8) 100%);
    color: var(--sidebar-text-active);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: var(--sidebar-text-active);
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.3);
}

.sidebar .accordion-button::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.7rem;
    margin-left: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
    background-image: none;
}

.sidebar .accordion-button:not(.collapsed)::after {
    transform: rotate(180deg);
    opacity: 1;
}

.sidebar .collapse,
.sidebar .collapsing {
    transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar .collapse .nav,
.sidebar .collapsing .nav {
    padding: var(--space-2) 0;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    margin: 0 var(--space-1);
}

.sidebar .collapse .nav-link,
.sidebar .collapsing .nav-link {
    padding: var(--space-2) var(--space-4);
    padding-left: calc(var(--space-4) + 20px + var(--space-3));
    font-size: 0.8125rem;
    font-weight: 400;
    margin: 0;
}

.sidebar .collapse .nav-link.active,
.sidebar .collapse .nav-link.sub-link.active {
    background-color: rgba(22, 163, 74, 0.3);
    color: var(--sidebar-text-active);
}

/* ============================================
   Main Content
   ============================================ */

.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--sidebar-width));
    max-width: 100%;
    overflow-x: hidden;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-wrapper {
    flex: 1 0 auto;
    max-width: 100%;
    overflow-x: hidden;
}

.content-wrapper .container-fluid {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: linear-gradient(to bottom, #ffffff 0%, #fefefe 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 4px 8px rgba(0, 0, 0, 0.02);
    margin-bottom: var(--space-6);
    max-width: 100%;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
}

.card-header {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-4) var(--space-6);
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: var(--space-6);
    max-width: 100%;
    overflow-x: auto;
}

.card-footer {
    background-color: var(--border-light);
    border-top: 1px solid var(--border-color);
    padding: var(--space-4) var(--space-6);
}

/* Chart containers */
.chart-container {
    background: linear-gradient(to bottom, #ffffff 0%, #fefefe 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 4px 8px rgba(0, 0, 0, 0.02);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
}

.chart-wrapper {
    position: relative;
    height: 300px;
    margin-top: var(--space-4);
}

.chart-wrapper canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.5;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(22, 163, 74, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #15803d 0%, #14532d 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(22, 163, 74, 0.3);
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #4b5563;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.btn-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-success:hover::before {
    left: 100%;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(153, 27, 27, 0.2);
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(153, 27, 27, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(245, 158, 11, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.btn-info:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.btn-sm {
    padding: var(--space-1) var(--space-3);
    font-size: 0.8125rem;
}

.btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: 1rem;
}

/* Button groups */
.btn-group {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.btn-group .btn {
    flex: 0 1 auto;
}

/* Responsive button adjustments */
@media (max-width: 767.98px) {
    .btn {
        font-size: 0.8125rem;
        padding: var(--space-2) var(--space-3);
    }
    
    .btn-lg {
        font-size: 0.875rem;
        padding: var(--space-2) var(--space-4);
    }
    
    .btn-block-mobile {
        width: 100%;
        display: flex;
    }
    
    /* Stack button groups on mobile */
    .btn-group-mobile-stack {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group-mobile-stack .btn {
        width: 100%;
    }
}

/* Icon-only buttons */
.btn-icon {
    padding: var(--space-2);
    width: 38px;
    height: 38px;
    justify-content: center;
}

.btn-icon-sm {
    padding: var(--space-1);
    width: 32px;
    height: 32px;
}

/* Outline buttons */
.btn-outline-primary {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}

.btn-outline-secondary {
    background-color: transparent;
    border: 1px solid #6b7280;
    color: #6b7280;
}

.btn-outline-secondary:hover {
    background-color: #6b7280;
    color: white;
}

/* ============================================
   Forms
   ============================================ */

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    font-size: 0.875rem;
}

.form-control,
.form-select {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.15s ease;
    background-color: white;
    width: 100%;
    max-width: 100%;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Form groups responsive */
.form-group {
    margin-bottom: var(--space-4);
}

@media (max-width: 767.98px) {
    .form-group {
        margin-bottom: var(--space-3);
    }
    
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Input groups */
.input-group {
    display: flex;
    width: 100%;
}

.input-group > .form-control {
    flex: 1;
}

/* Textarea auto-resize */
textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

/* Modal responsiveness */
.modal-dialog {
    max-width: 600px;
    margin: 1.75rem auto;
}

.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-4);
}

.modal-body {
    padding: var(--space-4);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: var(--space-4);
    gap: var(--space-2);
}

@media (max-width: 767.98px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-fullscreen-sm-down {
        width: 100vw;
        max-width: none;
        height: 100vh;
        margin: 0;
    }
    
    .modal-fullscreen-sm-down .modal-content {
        height: 100vh;
        border-radius: 0;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--space-3);
    }
    
    .modal-body {
        max-height: calc(100vh - 140px);
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Select2 responsive adjustments */
.select2-container {
    width: 100% !important;
}

.select2-container--bootstrap4 .select2-selection {
    min-height: 38px;
}

@media (max-width: 767.98px) {
    .select2-dropdown {
        font-size: 16px;
    }
}

/* ============================================
   Tables
   ============================================ */

.table {
    width: 100%;
    font-size: 0.875rem;
}

.table thead th {
    background-color: var(--border-light);
    color: var(--text-primary);
    font-weight: 600;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    white-space: normal;
    word-wrap: break-word;
    min-width: 80px;
    max-width: 200px;
}

.table tbody td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    max-width: 200px;
}

/* Smaller columns for specific content */
.table thead th:first-child,
.table tbody td:first-child {
    min-width: 50px;
    max-width: 70px;
}

.table thead th:last-child,
.table tbody td:last-child {
    min-width: 180px;
    max-width: 240px;
    white-space: normal;
    padding: var(--space-2);
}

/* Optimize column widths for common table structures */
.table thead th,
.table tbody td {
    padding: var(--space-2) var(--space-3);
}

/* Phone columns - narrower */
.table td:nth-child(4),
.table th:nth-child(4) {
    min-width: 100px;
    max-width: 130px;
}

/* Status column - compact */
.table td:nth-last-child(2),
.table th:nth-last-child(2) {
    min-width: 120px;
    max-width: 150px;
    text-align: center;
}

/* Tracking ID and product columns */
.table td:nth-child(2),
.table td:nth-child(5),
.table th:nth-child(2),
.table th:nth-child(5) {
    min-width: 100px;
    max-width: 140px;
}

/* Tracking badge styling */
.tracking-cell {
    cursor: pointer;
    word-break: break-all;
    white-space: normal;
    line-height: 1.4;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    transition: all 0.2s ease;
    user-select: all;
}

.tracking-cell:hover {
    background-color: var(--primary-light);
    color: white;
}

.tracking-cell:active {
    background-color: var(--primary-dark);
}

/* Quantity and Price - very compact */
.table td:nth-child(6),
.table td:nth-child(7),
.table th:nth-child(6),
.table th:nth-child(7) {
    min-width: 60px;
    max-width: 80px;
    text-align: right;
}

/* Status badges in tables */
.table .badge {
    white-space: nowrap;
}

/* Clickable status badge */
.status-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.status-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-clickable:active {
    transform: scale(0.98);
}

/* Action buttons group in tables */
.action-buttons-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-start;
    max-width: 100%;
}

.action-buttons-group .btn {
    flex: 0 1 auto;
    min-width: 60px;
    font-size: 0.75rem;
    padding: 4px 8px;
}

.action-buttons-group .btn i {
    font-size: 0.85rem;
}

/* Responsive action buttons */
@media (max-width: 1199.98px) {
    .action-buttons-group .btn .btn-text {
        font-size: 0.7rem;
    }
    
    .action-buttons-group .btn {
        padding: 3px 6px;
        min-width: 55px;
    }
}

@media (max-width: 991.98px) {
    .action-buttons-group {
        flex-direction: column;
        gap: 3px;
    }
    
    .action-buttons-group .btn {
        width: 100%;
        justify-content: center;
    }
    
    .action-buttons-group .btn .btn-text {
        display: inline;
    }
    
    .table thead th:last-child,
    .table tbody td:last-child {
        min-width: 100px;
        max-width: 120px;
    }
}

@media (max-width: 767.98px) {
    .action-buttons-group .btn .btn-text {
        display: none;
    }
    
    .action-buttons-group .btn {
        padding: 6px;
        min-width: 32px;
        justify-content: center;
    }
    
    .action-buttons-group .btn i {
        margin: 0;
    }
    
    .table thead th:last-child,
    .table tbody td:last-child {
        min-width: 90px;
        max-width: 100px;
    }
}

.table tbody tr:hover {
    background-color: var(--border-light);
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    max-width: 100%;
}

.table-responsive > .table {
    width: 100%;
    margin-bottom: 0;
    table-layout: auto;
}

/* Scrollbar styling for table */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive table - Stack on mobile */
@media (max-width: 767.98px) {
    .table-responsive-stack {
        display: block;
        width: 100%;
    }
    
    .table-responsive-stack .table {
        min-width: auto;
    }
    
    .table-responsive-stack thead {
        display: none;
    }
    
    .table-responsive-stack tbody,
    .table-responsive-stack tr,
    .table-responsive-stack td {
        display: block;
        width: 100%;
    }
    
    .table-responsive-stack tr {
        margin-bottom: var(--space-4);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: var(--space-2);
        background: var(--bg-card);
    }
    
    .table-responsive-stack td {
        text-align: right;
        padding: var(--space-2);
        border-bottom: 1px solid var(--border-light);
        position: relative;
        padding-left: 50%;
    }
    
    .table-responsive-stack td:last-child {
        border-bottom: none;
    }
    
    .table-responsive-stack td:before {
        content: attr(data-label);
        position: absolute;
        left: var(--space-2);
        width: 45%;
        text-align: left;
        font-weight: 600;
        color: var(--text-primary);
    }
}

/* ============================================
   Badges
   ============================================ */

.badge {
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    flex-shrink: 0;
    padding: var(--space-6) 0;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: auto;
}

.footer a {
    color: var(--text-primary);
    font-weight: 500;
}

.footer a:hover {
    color: var(--primary);
}

/* ============================================
   Responsive
   ============================================ */

/* Prevent horizontal scroll */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Flexible images */
img {
    max-width: 100%;
    height: auto;
}

/* Flexible containers */
.container-fluid,
.container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* Ensure rows don't cause overflow */
.row {
    margin-left: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
    margin-right: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
    max-width: 100%;
}

.row > * {
    max-width: 100%;
}

/* Large Desktop - 1200px and above */
@media (min-width: 1200px) {
    :root {
        --sidebar-width: 280px;
    }
    
    .main-content {
        padding: var(--space-8);
    }
}

/* Tablets and Small Desktops - 992px to 1199px */
@media (max-width: 1199.98px) {
    :root {
        --sidebar-width: 260px;
    }
    
    .main-content {
        padding: var(--space-6);
    }
    
    .card-body {
        padding: var(--space-4);
    }
}

/* Tablets - Below 992px */
@media (max-width: 991.98px) {
    /* Sidebar mobile behavior */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        max-width: 85vw;
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 1010;
        backdrop-filter: blur(2px);
    }

    .sidebar-overlay.show {
        display: block;
    }
    
    /* Disable collapsed state on mobile */
    .sidebar-collapsed .sidebar {
        width: 280px;
        max-width: 85vw;
    }
    
    .sidebar-collapsed .main-content {
        margin-left: 0 !important;
    }
    
    /* Show all sidebar text on mobile */
    .sidebar-collapsed .sidebar .sidebar-header h5,
    .sidebar-collapsed .sidebar .nav-link span,
    .sidebar-collapsed .sidebar .accordion-button span,
    .sidebar-collapsed .sidebar .accordion-button::after {
        display: block;
    }
    
    .sidebar-collapsed .sidebar .nav-link {
        justify-content: flex-start;
        padding: var(--space-3) var(--space-4);
    }
    
    /* Navbar improvements for tablets */
    .navbar-brand {
        font-size: 1.125rem;
    }
    
    .navbar {
        padding: 0 var(--space-4);
    }
    
    /* Card spacing */
    .card {
        margin-bottom: var(--space-4);
    }
    
    /* Table wrapper */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-color);
    }
    
    /* Button stacking */
    .btn-group {
        flex-wrap: wrap;
    }
}

/* Mobile Devices - Below 768px */
@media (max-width: 767.98px) {
    :root {
        --navbar-height: 56px;
        --space-8: 1.5rem;
    }
    
    body {
        font-size: 13px;
    }
    
    /* Main content mobile adjustments */
    .main-content {
        padding: var(--space-3);
        margin-top: var(--navbar-height);
    }

    .navbar {
        padding: 0 var(--space-3);
        height: 56px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand i {
        font-size: 1rem;
    }

    /* Typography scaling */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.125rem;
    }
    
    h4 {
        font-size: 1rem;
    }
    
    h5 {
        font-size: 0.9rem;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: var(--space-3);
        border-radius: var(--radius-md);
    }
    
    .card-header,
    .card-body,
    .card-footer {
        padding: var(--space-3);
    }
    
    /* Form controls */
    .form-control,
    .form-select,
    .btn {
        font-size: 0.875rem;
    }
    
    /* Button improvements */
    .btn {
        padding: var(--space-2) var(--space-3);
        white-space: nowrap;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: var(--space-2);
    }
    
    /* Table responsiveness */
    .table {
        font-size: 0.8125rem;
    }
    
    .table thead th {
        padding: var(--space-2);
        font-size: 0.7rem;
        white-space: nowrap;
    }
    
    .table tbody td {
        padding: var(--space-2);
    }
    
    /* Make tables horizontally scrollable */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive > .table {
        margin-bottom: 0;
        min-width: 600px; /* Minimum width before scrolling */
    }
    
    /* Dropdown menus */
    .dropdown-menu {
        min-width: 200px;
        font-size: 0.875rem;
    }
    
    /* Modal improvements */
    .modal-dialog {
        margin: var(--space-2);
    }
    
    .modal-content {
        border-radius: var(--radius-md);
    }
    
    /* Form groups stacking */
    .row > [class*='col-'] {
        margin-bottom: var(--space-3);
    }
    
    /* Sidebar mobile specific */
    .sidebar {
        width: 260px;
    }
    
    .sidebar .nav-link,
    .sidebar .accordion-button {
        font-size: 0.875rem;
        padding: var(--space-2) var(--space-3);
    }
    
    /* Login page mobile */
    .login-card {
        padding: var(--space-6);
        margin: var(--space-3);
    }
    
    /* Hero section mobile */
    .hero-section {
        padding: 80px 0 40px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .tracking-card {
        padding: var(--space-4);
    }
}

/* Small Mobile Devices - Below 576px */
@media (max-width: 575.98px) {
    :root {
        --navbar-height: 52px;
    }
    
    body {
        font-size: 12px;
    }
    
    .main-content {
        padding: var(--space-2);
    }
    
    .navbar {
        padding: 0 var(--space-2);
        height: 52px;
    }
    
    /* Smaller typography */
    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.125rem;
    }

    h3 {
        font-size: 1rem;
    }
    
    /* Compact cards */
    .card-header,
    .card-body,
    .card-footer {
        padding: var(--space-2);
    }
    
    /* Smaller buttons */
    .btn {
        font-size: 0.8125rem;
        padding: var(--space-1) var(--space-2);
    }
    
    .btn-lg {
        font-size: 0.875rem;
        padding: var(--space-2) var(--space-4);
    }
    
    /* Compact table */
    .table {
        font-size: 0.75rem;
    }
    
    .table thead th {
        padding: var(--space-1);
        font-size: 0.65rem;
    }
    
    .table tbody td {
        padding: var(--space-1);
    }
    
    /* Make action buttons icon-only on very small screens */
    .action-buttons-group {
        gap: var(--space-1);
    }
    
    .action-buttons-group .btn {
        padding: 4px 6px;
        font-size: 0.7rem;
    }
    
    .action-buttons-group .btn i {
        font-size: 0.9rem;
    }
    
    /* Smaller sidebar */
    .sidebar {
        width: 240px;
    }
    
    /* Form elements */
    .form-control,
    .form-select {
        font-size: 0.8125rem;
        padding: var(--space-1) var(--space-2);
    }
    
    .form-label {
        font-size: 0.8125rem;
        margin-bottom: var(--space-1);
    }
    
    /* Compact badges */
    .badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    /* Hero section very small screens */
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    /* Tracking card */
    .tracking-card {
        padding: var(--space-3);
        margin-top: -20px;
    }
    
    /* Login page */
    .login-card {
        padding: var(--space-4);
    }
}

/* Utility classes for responsive visibility */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 767.98px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
}

/* Flexbox utilities for responsive layouts */
.d-flex-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

@media (max-width: 767.98px) {
    .d-flex-responsive {
        flex-direction: column;
    }
    
    .d-flex-responsive > * {
        width: 100%;
    }
}

/* ============================================
   Utilities
   ============================================ */

.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.bg-primary {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
}

.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.bg-danger {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%) !important;
}

.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.bg-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow {
    box-shadow: var(--shadow);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* Responsive Utilities */
.w-100 {
    width: 100% !important;
}

.h-100 {
    height: 100% !important;
}

.overflow-hidden {
    overflow: hidden !important;
}

.overflow-auto {
    overflow: auto !important;
}

.overflow-x-auto {
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

.overflow-y-auto {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Flexible Grid System */
.flex-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin: 0 calc(var(--space-4) * -0.5);
}

.flex-grid-item {
    flex: 1 1 auto;
    min-width: 250px;
    padding: 0 calc(var(--space-4) * 0.5);
}

@media (max-width: 767.98px) {
    .flex-grid {
        gap: var(--space-2);
        margin: 0;
    }
    
    .flex-grid-item {
        flex: 1 1 100%;
        min-width: 100%;
        padding: 0;
        margin-bottom: var(--space-2);
    }
}

/* Responsive Text Alignment */
@media (max-width: 767.98px) {
    .text-md-start {
        text-align: left !important;
    }
    
    .text-md-center {
        text-align: center !important;
    }
    
    .text-md-end {
        text-align: right !important;
    }
}

/* Responsive Spacing */
@media (max-width: 767.98px) {
    .mt-mobile-0 {
        margin-top: 0 !important;
    }
    
    .mb-mobile-2 {
        margin-bottom: var(--space-2) !important;
    }
    
    .mb-mobile-3 {
        margin-bottom: var(--space-3) !important;
    }
    
    .p-mobile-2 {
        padding: var(--space-2) !important;
    }
    
    .px-mobile-2 {
        padding-left: var(--space-2) !important;
        padding-right: var(--space-2) !important;
    }
    
    .py-mobile-2 {
        padding-top: var(--space-2) !important;
        padding-bottom: var(--space-2) !important;
    }
}

/* Prevent text overflow */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-break {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive image containers */
.img-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.img-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Action buttons container - responsive */
.action-buttons {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 575.98px) {
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Responsive card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-4);
}

@media (max-width: 767.98px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
}

@media (max-width: 575.98px) {
    .card-grid {
        gap: var(--space-2);
    }
}

/* Stats card responsive layout */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

@media (max-width: 767.98px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }
}

@media (max-width: 575.98px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Accessible hiding */
.sr-only,
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}