/* Button-like radio options for item source selection */
.item-source-option {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: 7px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: border-color 0.16s, background 0.16s, box-shadow 0.16s, color 0.16s;
    margin-bottom: 0;
    box-shadow: 0 1px 5px rgba(226,98,107,0.07);
    user-select: none;
    outline: none;
    position: relative;
    min-width: 180px;
    justify-content: center;
}
.item-source-option:hover, .item-source-option.active {
    border-color: var(--primary-dark);
    background: #f8e6e8;
    color: var(--primary-dark);
    box-shadow: 0 3px 12px rgba(226,98,107,0.13);
    z-index: 2;
}
.item-source-option input[type="radio"] {
    accent-color: var(--primary);
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}
/**
 * R K Fabricator - Global Styles
 * Modern, Professional Design System
 * Version: 1.0.1
 * Based on Bootstrap 5 & Sandbox Theme Architecture
 */

/* ============================================
   CSS RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================ */
:root {
    /* Primary Brand Colors - R K Fabricator Red Theme */
    --red: #e2626b;
    --red-light: #F08080;
    --red-dark: #8B1538;
    --red-darker: #6B0F2A;
    --primary: var(--red);
    --primary-light: var(--red-light);
    --primary-dark: var(--red-dark);
    
    /* Red Color Variations */
    --red-pale: #f8e6e8;      /* Very light red for backgrounds - 92.5% lightness */
    --red-soft: #fceaeb;      /* Soft red background - 94% lightness */
    --red-hover: #d14952;     /* Darker red for hover states */
    --red-active: #c03843;    /* Even darker for active states */
    
    /* Secondary Colors */
    --secondary: #aab0bc;
    
    /* Supporting Color Palette */
    --blue: #3f78e0;
    --sky: #5eb9f0;
    --purple: #747ed1;
    --grape: #605dba;
    --violet: #a07cc5;
    --pink: #d16b86;
    --fuchsia: #e668b3;
    --orange: #f78b77;
    --yellow: #fab758;
    --green: #45c4a0;
    --leaf: #7cb798;
    --aqua: #54a8c7;
    --navy: #343f52;
    --ash: #9499a3;
    
    /* Grayscale */
    --white: #ffffff;
    --gray-100: #fefefe;
    --gray-200: #f6f7f9;
    --gray-300: #cacaca;
    --gray-400: #aab0bc;
    --gray-500: #959ca9;
    --gray-600: #60697b;
    --gray-700: #2f353a;
    --gray-800: #21262c;
    --gray-900: #1e2228;
    --black: #000000;
    --dark: #262b32;
    
    /* Semantic Colors */
    --success: #45c4a0;
    --info: #54a8c7;
    --warning: #fab758;
    --danger: #e2626b;
    --error: #de4747;
    
    /* Background Colors */
    --body-bg: var(--gray-100);
    --light-bg: var(--gray-200);
    --dark-bg: var(--dark);
    
    /* Text Colors */
    --text-primary: var(--gray-600);
    --text-dark: var(--navy);
    --text-light: var(--gray-400);
    --text-muted: var(--gray-500);
    --heading-color: var(--navy);
    
    /* Border & Divider */
    --border-color: #a4aec6;
    --border-light: rgba(164, 174, 198, 0.2);
    --border-width: 1px;
    
    /* Shadows */
    --shadow-sm: 0 0.25rem 0.75rem rgba(30, 34, 40, 0.02);
    --shadow: 0 0 1.25rem rgba(30, 34, 40, 0.04);
    --shadow-md: 0 0 1.25rem rgba(30, 34, 40, 0.06);
    --shadow-lg: 0 0.25rem 1.75rem rgba(30, 34, 40, 0.07);
    --shadow-hover: 0 0.25rem 0.75rem rgba(30, 34, 40, 0.05);
    --btn-shadow: 0 0.25rem 0.75rem rgba(30, 34, 40, 0.15);
    
    /* Border Radius */
    --radius-sm: 0.2rem;
    --radius: 0.4rem;
    --radius-lg: 0.6rem;
    --radius-xl: 0.8rem;
    --radius-pill: 50rem;
    --radius-circle: 50%;
    
    /* Spacing Scale (rem based) */
    --space-0: 0;
    --space-1: 0.25rem;   /* 5px */
    --space-2: 0.5rem;    /* 10px */
    --space-3: 0.75rem;   /* 15px */
    --space-4: 1rem;      /* 20px */
    --space-5: 1.25rem;   /* 25px */
    --space-6: 1.5rem;    /* 30px */
    --space-7: 1.75rem;   /* 35px */
    --space-8: 2rem;      /* 40px */
    --space-9: 2.25rem;   /* 45px */
    --space-10: 2.5rem;   /* 50px */
    --space-11: 3rem;     /* 60px */
    --space-12: 3.5rem;   /* 70px */
    --space-13: 4rem;     /* 80px */
    --space-14: 4.5rem;   /* 90px */
    --space-15: 5rem;     /* 100px */
    --space-16: 6rem;     /* 120px */
    --space-17: 7rem;     /* 140px */
    --space-18: 8rem;     /* 160px */
    --space-19: 9rem;     /* 180px */
    --space-20: 10rem;    /* 200px */
    
    /* Typography */
    --font-family-base: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-monospace: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    --font-size-root: 20px;
    --font-size-base: 0.8rem;   /* 16px */
    --font-size-sm: 0.7rem;     /* 14px */
    --font-size-lg: 1rem;       /* 20px */
    --font-size-xl: 1.2rem;     /* 24px */
    
    /* Font Weights */
    --font-weight-light: 400;
    --font-weight-normal: 500;
    --font-weight-bold: 700;
    
    /* Line Heights */
    --line-height-base: 1.7;
    --line-height-tight: 1.35;
    --line-height-relaxed: 1.9;
    
    /* Letter Spacing */
    --letter-spacing-tight: -0.03em;
    --letter-spacing-normal: -0.01rem;
    --letter-spacing-wide: 0.02rem;
    --letter-spacing-wider: 0.05rem;
    
    /* Transitions */
    --transition-fast: all 0.2s ease-in-out;
    --transition-base: all 0.3s ease-in-out;
    --transition-smooth: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
    
    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ============================================
   BASE STYLES
   ============================================ */
html {
    font-size: var(--font-size-root);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--body-bg);
    letter-spacing: var(--letter-spacing-normal);
    min-height: 100vh;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 50%, var(--primary-red) 100%);
    padding: 20px;
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.company-name {
    font-size: 26px;
    font-weight: bold;
    color: var(--primary-red);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.login-subtitle {
    color: var(--black);
    font-size: 13px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--black);
    font-weight: 500;
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.btn-primary {
    background: var(--primary-red);
    color: var(--white);
    width: 100%;
}

.btn-primary:hover {
    background: var(--dark-red);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.25);
}

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 13px;
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: 240px;
    background: var(--white);
    color: var(--navy);     
    padding: 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.05); 
    border-right: 1px solid var(--border-light);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

/* Ensure the sidebar handles overflow */
.sidebar {
    overflow-y: auto; /* Allows scrolling */
    
    /* Hide scrollbar for Firefox */
    scrollbar-width: none;
    
    /* Hide scrollbar for IE and Edge */
    -ms-overflow-style: none;
}

/* Hide scrollbar for Chrome, Safari, and Opera */
.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-header {
    position: sticky;
    top: 0;
    z-index: 10; /* Ensures it stays on top of the menu items */
    
    /* IMPORTANT: Match this to your sidebar's background color. 
       If you don't add this, the menu items will look like 
       they are sliding underneath transparent text. */
    background-color: #ffffff; 
    
    /* Optional: Adds a subtle shadow when scrolling */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.sidebar-header {
    padding: 15px 16px;       /* Smaller padding */
    background: var(--white); /* White background */
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
    color: var(--red); /* Red Brand Color */
}

.sidebar-header .user-role {
    font-size: 11px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.nav-menu {
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.nav-item {
    margin: 2px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    position: relative; /* Needed for the arrow */
}

/* Hover & Active States */
.nav-link:hover,
.nav-link.active {
    background: var(--red-soft);
    color: var(--red-dark);
    border-left-color: var(--red);
    padding-left: 24px; /* Slight slide effect */
}

/* Icons */
.nav-link i {
    margin-right: 12px;
    font-size: 16px;
    width: 20px; /* Fixed width for alignment */
    text-align: center;
    color: var(--gray-400);
    transition: color 0.2s;
}

.nav-link:hover i,
.nav-link.active i {
    color: var(--red);
}

/* =========================================
   5. Dropdown / Submenu Logic
   ========================================= */
/* The Arrow (Auto-generated via CSS) */
.nav-item.has-submenu > .nav-link::after {
    content: '\f078'; /* FontAwesome Chevron Down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    transition: transform 0.3s ease;
    font-size: 10px;
    color: var(--gray-400);
}

/* Rotate arrow when active */
.nav-item.has-submenu.active > .nav-link::after {
    transform: rotate(180deg);
}

.nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--gray-100);
    
    /* Animation Properties */
    display: block;        /* IMPORTANT: Must be block for max-height to work */
    max-height: 0;         /* Height is 0, so it looks hidden */
    overflow: hidden;      /* Hides content that doesn't fit in 0px */
    opacity: 0;            /* Optional: Fades out */
    transition: all 0.4s ease-in-out;
}

/* Open State: Slide Down */
.nav-item.has-submenu.active .nav-submenu {
    max-height: 1000px;    /* Allow it to grow */
    opacity: 1;            /* Fade in */
    margin-top: 5px;       /* Tiny breathing room */
}

/* Arrow Rotation */
.nav-item.has-submenu > .nav-link::after {
    content: '\f078'; 
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    transition: transform 0.3s ease;
    font-size: 10px;
    color: var(--gray-400);
}

.nav-item.has-submenu.active > .nav-link::after {
    transform: rotate(180deg);
}

.nav-submenu .nav-link {
    /* INDENTATION: Pushes the whole row to the right */
    padding-left: 50px; /* Adjust this number to move it further right */
    
    /* SMALLER TEXT */
    font-size: 13px;
    
    /* COMPACT SPACING: Less height than main menu items */
    padding-top: 8px;
    padding-bottom: 8px;
}

/* 2. Target the Icons inside the Submenu */
.nav-submenu .nav-link i {
    /* SMALLER ICON */
    font-size: 12px; 
    
    /* ALIGNMENT: Keep icon width consistent */
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

/* ============================================
   MAIN CONTENT & COMPACT HEADER
   ============================================ */
.main-content {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-color: var(--light-bg);
}

/* Compact Header Container */
.top-bar {
    background: var(--white);
    padding: 0 24px;
    height: 62px; /* Fixed small height */
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    z-index: 100; /* Ensure header stays above content */
}

.page-title {
    font-size: 18px;
    color: var(--navy);
    font-weight: 600;
    margin: 0;
}

/* ============================================
   NOTIFICATION AREA
   ============================================ */
.notification-wrapper {
    position: relative;
    margin-right: 15px;
    display: flex;
    align-items: center;
    height: 100%;
}

.notification-icon {
    color: var(--gray-600);
    font-size: 1.1rem;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon:hover {
    color: var(--red);
    background-color: var(--red-soft);
}

.notification-badge {
    position: absolute;
    top: 5px; /* Adjusted for compact header */
    right: 5px;
    background-color: var(--red);
    color: var(--white);
    font-size: 9px;
    font-weight: bold;
    padding: 0 4px;
    height: 16px;
    min-width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 2px solid var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ============================================
   USER PROFILE & DROPDOWN
   ============================================ */
.user-dropdown-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Interactive User Strip */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 12px 4px 8px; /* Compact padding */
    border-radius: 30px; /* Pill shape */
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.user-info:hover {
    background-color: var(--light-bg);
    border-color: var(--border-light);
}

/* Avatar - Using your Red Theme */
.user-avatar {
    width: 32px; /* Slightly smaller for compact header */
    height: 32px;
    background-color: var(--red-soft);
    color: var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details h4 {
    font-size: 13px;
    margin: 0;
    color: var(--navy);
    font-weight: 600;
    line-height: 1.2;
}

.user-details p {
    font-size: 11px;
    margin: 0;
    color: var(--gray-500);
}

/* Dropdown Menu Box */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px); /* Just below the header */
    right: 0;
    width: 200px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 6px;
    display: none; /* Hidden by default */
    z-index: 1000;
    border: 1px solid var(--border-light);
}

/* Show state */
.user-dropdown-menu.show {
    display: block;
    animation: fadeInSlide 0.2s ease forwards;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--navy);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 14px;
    color: var(--gray-500);
}

.dropdown-item:hover {
    background-color: var(--red-soft); /* Using your theme variable */
    color: var(--red);
}

.dropdown-item:hover i {
    color: var(--red);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 5px 0;
}

/* =========================================
   Module: Statistics Grid
   ========================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.stat-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: var(--gray-700);
}

.stat-content p {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0;
    font-weight: 500;
}

.stat-icon-box {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Icon Color Variants */
.icon-red { background: #fee2e2; color: #dc2626; }
.icon-orange { background: #ffedd5; color: #ea580c; }
.icon-purple { background: #f3e8ff; color: #9333ea; }
.icon-green { background: #dcfce7; color: #16a34a; }

/* =========================================
   Module: Filters
   ========================================= */
.filter-container {
    padding: 15px 20px;
    background: #f9fafb; /* Very light gray */
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 6px 14px;
    border-radius: 50px; /* Pill shape */
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.filter-tab:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-700);
}

.filter-tab.active {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
    box-shadow: 0 2px 4px rgba(226, 98, 107, 0.4);
}

/* =========================================
   FIX 1: Card Header & Buttons (Smaller & Aligned)
   ========================================= */
.card-header {
    display: flex;
    justify-content: space-between; /* Pushes Title left, Buttons right */
    align-items: center;            /* Vertically centers them */
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.card-actions {
    display: flex;
    gap: 10px;          /* Space between buttons */
    align-items: center;
}

/* Force buttons to be smaller and uniform */
.card-actions .btn {
    padding: 8px 16px !important;  /* Smaller padding */
    font-size: 13px !important;    /* Smaller text */
    line-height: 1.5;
    height: auto;                  /* Stop them from stretching */
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
}

/* =========================================
   Module: Badges & Buttons
   ========================================= */
.badge {
    padding: 6px 12px;       /* A bit more padding */
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;        /* Bold text */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
    
    /* Force White Text for all badges */
    color: #ffffff !important; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.15); /* Adds a tiny shadow to pop */
}

/* Solid Background Colors */
.badge-draft { 
    background-color: #757575; /* Solid Grey */
}

.badge-sent { 
    background-color: #f57c00; /* Solid Orange */
}

.badge-responded { 
    background-color: #1976d2; /* Solid Blue */
}

.badge-quoted { 
    background-color: #8e24aa; /* Solid Purple */
}

.badge-converted { 
    background-color: #2e7d32; /* Solid Green */
}

/* Small Button Helpers */
.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* Specific Colors */
.btn-warning { background: #f59e0b; color: white; }
.btn-warning:hover { background: #d97706; }

.btn-info { background: #3b82f6; color: white; }
.btn-info:hover { background: #2563eb; }

.btn-success { background: #10b981; color: white; }
.btn-success:hover { background: #059669; }

.btn-disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; pointer-events: none; }

/* ============================================
   CONTENT & UTILITIES
   ============================================ */
/* Flash Message Spacing */
.main-content > .alert {
    margin: 20px 24px 0 24px; /* Added top margin so it doesn't touch header */
}

/* Content Area Pushes Footer Down */
.content-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px; /* Matched to header padding */
}

/* Animation */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================
   STICKY FOOTER (New)
   ============================================ */
.app-footer {
    background: var(--white);
    border-top: 1px solid var(--border-light);
    padding: 5px 20px;        /* Very small padding */
    height: 10px;             /* Fixed height */
    font-size: 11px;          /* Small text */
    color: var(--gray-500);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    width: 100%;
}
/* Make the main content area a flex container 
   This ensures the footer sticks to the bottom if content is short */
.main-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    flex: 1; /* Pushes the footer down by taking available space */
    padding: 30px; /* Ensure content has padding */
}

.footer {
    background-color: var(--white);
    border-top: 1px solid #eee;
    padding: 5px 10px;
    margin-top: auto; /* Double check to push to bottom */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--gray-600);
}

.footer strong {
    color: var(--red-dark); /* Using your brand color */
    font-weight: 600;
}

.version {
    color: var(--gray-400);
    font-family: monospace;
}

/* Scrollable Content Container */
.content-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    background: var(--light-gray);
}

.content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.content-wrapper::-webkit-scrollbar-track {
    background: var(--light-gray);
}

.content-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.user-details h4 {
    font-size: 14px;
    color: var(--black);
    margin-bottom: 2px;
}

.user-details p {
    font-size: 11px;
    color: #666;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-red);
}

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

.stat-card.card-red {
    border-left-color: var(--primary-red);
}

.stat-card.card-black {
    border-left-color: var(--black);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-title {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
    background: var(--primary-red);
}

.stat-card.card-black .stat-icon {
    background: var(--black);
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--black);
    margin-bottom: 4px;
}

.stat-change {
    font-size: 12px;
    color: #6b7280;
}

.stat-change.positive {
    color: #4caf50;
}

.stat-change.negative {
    color: #f44336;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--shadow);
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
}

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

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--black);
}

.data-table tbody tr:hover {
    background: var(--light-gray);
}

/* Status Badges */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-warning {
    background: #fff3e0;
    color: #f57c00;
}

.badge-danger {
    background: #ffebee;
    color: #c62828;
}

.badge-info {
    background: #e3f2fd;
    color: #1565c0;
}

/* Activity Feed */
.activity-item {
    padding: 12px;
    border-left: 3px solid var(--primary-red);
    margin-bottom: 12px;
    background: var(--light-gray);
    border-radius: 6px;
}

.activity-item h4 {
    font-size: 13px;
    color: var(--black);
    margin-bottom: 4px;
}

.activity-item p {
    font-size: 12px;
    color: #6b7280;
}

.activity-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 0;
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .page-title {
        font-size: 18px;
    }
}

/* ============================================
   TYPOGRAPHY UTILITIES
   ============================================ */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--heading-color);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-4);
    letter-spacing: var(--letter-spacing-tight);
}

h1, .h1 { font-size: 1.8125rem; line-height: 1.3; }  /* 36.25px */
h2, .h2 { font-size: 1.625rem; line-height: 1.35; }   /* 32.5px */
h3, .h3 { font-size: 1.375rem; line-height: 1.4; }    /* 27.5px */
h4, .h4 { font-size: 1.1875rem; line-height: 1.45; }  /* 23.75px */
h5, .h5 { font-size: 1.125rem; line-height: 1.5; }    /* 22.5px */
h6, .h6 { font-size: 1.0625rem; line-height: 1.55; }  /* 21.25px */

.display-1 { font-size: 2.4rem; font-weight: var(--font-weight-bold); line-height: 1.2; }
.display-2 { font-size: 2.2rem; font-weight: var(--font-weight-bold); line-height: 1.2; }
.display-3 { font-size: 2rem; font-weight: var(--font-weight-bold); line-height: 1.2; }
.display-4 { font-size: 1.8rem; font-weight: var(--font-weight-bold); line-height: 1.2; }

.lead {
    font-size: 1.125rem;
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
}

.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }

.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* ============================================
   COLOR UTILITIES - RED THEME
   ============================================ */

/* Text Colors - Red Variants */
.text-red { color: var(--red) !important; }
.text-red-light { color: var(--red-light) !important; }
.text-red-dark { color: var(--red-dark) !important; }
.text-primary { color: var(--primary) !important; }

/* Text Colors - Grayscale */
.text-white { color: var(--white) !important; }
.text-black { color: var(--black) !important; }
.text-dark { color: var(--navy) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-gray { color: var(--gray-400) !important; }

/* Text Colors - Semantic */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }

/* Background Colors - Red Theme */
.bg-red {
    background-color: var(--red) !important;
    color: var(--white) !important;
}

.bg-red-light {
    background-color: var(--red-light) !important;
    color: var(--white) !important;
}

.bg-red-dark {
    background-color: var(--red-dark) !important;
    color: var(--white) !important;
}

.bg-pale-red {
    background-color: var(--red-pale) !important;
    color: var(--red-dark) !important;
}

.bg-soft-red {
    background-color: var(--red-soft) !important;
    color: var(--red-dark) !important;
}

/* Background Colors - Grayscale */
.bg-white { background-color: var(--white) !important; }
.bg-light { background-color: var(--light-bg) !important; }
.bg-gray { background-color: var(--gray-200) !important; }
.bg-dark { background-color: var(--dark) !important; color: var(--white) !important; }
.bg-black { background-color: var(--black) !important; color: var(--white) !important; }

/* Background Colors - Semantic with Pale variants */
.bg-success { background-color: var(--success) !important; color: var(--white) !important; }
.bg-pale-success { background-color: #e8f5f0 !important; color: var(--success) !important; }
.bg-soft-success { background-color: #edf8f3 !important; color: var(--success) !important; }

.bg-danger { background-color: var(--danger) !important; color: var(--white) !important; }
.bg-pale-danger { background-color: #f8e6e8 !important; color: var(--danger) !important; }
.bg-soft-danger { background-color: #fceaeb !important; color: var(--danger) !important; }

.bg-warning { background-color: var(--warning) !important; color: var(--navy) !important; }
.bg-pale-warning { background-color: #fef5e7 !important; color: var(--warning) !important; }
.bg-soft-warning { background-color: #fef7ed !important; color: var(--warning) !important; }

.bg-info { background-color: var(--info) !important; color: var(--white) !important; }
.bg-pale-info { background-color: #e8f3f8 !important; color: var(--info) !important; }
.bg-soft-info { background-color: #edf6fa !important; color: var(--info) !important; }

/* Gradient Backgrounds */
.bg-gradient-red {
    background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 50%, var(--red-light) 100%) !important;
    color: var(--white) !important;
}

.bg-gradient-primary {
    background: linear-gradient(120deg, #f857a6 10%, var(--red) 100%) !important;
    color: var(--white) !important;
}

/* ============================================
   BORDER UTILITIES
   ============================================ */
.border { border: var(--border-width) solid var(--border-light) !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: var(--border-width) solid var(--border-light) !important; }
.border-bottom { border-bottom: var(--border-width) solid var(--border-light) !important; }
.border-left { border-left: var(--border-width) solid var(--border-light) !important; }
.border-right { border-right: var(--border-width) solid var(--border-light) !important; }

.border-red { border-color: var(--red) !important; }
.border-primary { border-color: var(--primary) !important; }
.border-white { border-color: var(--white) !important; }
.border-light { border-color: var(--border-light) !important; }

/* Border Radius */
.rounded { border-radius: var(--radius) !important; }
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-pill { border-radius: var(--radius-pill) !important; }
.rounded-circle { border-radius: var(--radius-circle) !important; }
.rounded-0 { border-radius: 0 !important; }

/* ============================================
   SHADOW UTILITIES
   ============================================ */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* ============================================
   SPACING UTILITIES
   ============================================ */
/* Margin utilities */
.m-0 { margin: 0 !important; }
.m-1 { margin: var(--space-1) !important; }
.m-2 { margin: var(--space-2) !important; }
.m-3 { margin: var(--space-3) !important; }
.m-4 { margin: var(--space-4) !important; }
.m-5 { margin: var(--space-5) !important; }
.m-6 { margin: var(--space-6) !important; }
.m-8 { margin: var(--space-8) !important; }
.m-10 { margin: var(--space-10) !important; }
.m-auto { margin: auto !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-5 { margin-top: var(--space-5) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mt-8 { margin-top: var(--space-8) !important; }
.mt-10 { margin-top: var(--space-10) !important; }
.mt-20 { margin-top: 20px !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-5 { margin-bottom: var(--space-5) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }
.mb-10 { margin-bottom: var(--space-10) !important; }
.mb-20 { margin-bottom: 20px !important; }

.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: var(--space-1) !important; }
.ml-2 { margin-left: var(--space-2) !important; }
.ml-3 { margin-left: var(--space-3) !important; }
.ml-4 { margin-left: var(--space-4) !important; }
.ml-auto { margin-left: auto !important; }

.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: var(--space-1) !important; }
.mr-2 { margin-right: var(--space-2) !important; }
.mr-3 { margin-right: var(--space-3) !important; }
.mr-4 { margin-right: var(--space-4) !important; }
.mr-auto { margin-right: auto !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* Padding utilities */
.p-0 { padding: 0 !important; }
.p-1 { padding: var(--space-1) !important; }
.p-2 { padding: var(--space-2) !important; }
.p-3 { padding: var(--space-3) !important; }
.p-4 { padding: var(--space-4) !important; }
.p-5 { padding: var(--space-5) !important; }
.p-6 { padding: var(--space-6) !important; }
.p-8 { padding: var(--space-8) !important; }
.p-10 { padding: var(--space-10) !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: var(--space-1) !important; }
.pt-2 { padding-top: var(--space-2) !important; }
.pt-3 { padding-top: var(--space-3) !important; }
.pt-4 { padding-top: var(--space-4) !important; }
.pt-5 { padding-top: var(--space-5) !important; }
.pt-6 { padding-top: var(--space-6) !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: var(--space-1) !important; }
.pb-2 { padding-bottom: var(--space-2) !important; }
.pb-3 { padding-bottom: var(--space-3) !important; }
.pb-4 { padding-bottom: var(--space-4) !important; }
.pb-5 { padding-bottom: var(--space-5) !important; }
.pb-6 { padding-bottom: var(--space-6) !important; }

.pl-0 { padding-left: 0 !important; }
.pl-1 { padding-left: var(--space-1) !important; }
.pl-2 { padding-left: var(--space-2) !important; }
.pl-3 { padding-left: var(--space-3) !important; }
.pl-4 { padding-left: var(--space-4) !important; }

.pr-0 { padding-right: 0 !important; }
.pr-1 { padding-right: var(--space-1) !important; }
.pr-2 { padding-right: var(--space-2) !important; }
.pr-3 { padding-right: var(--space-3) !important; }
.pr-4 { padding-right: var(--space-4) !important; }

/* ============================================
   DISPLAY & FLEXBOX UTILITIES
   ============================================ */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }

.flex-grow-0 { flex-grow: 0 !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.flex-shrink-1 { flex-shrink: 1 !important; }

.gap-0 { gap: 0 !important; }
.gap-1 { gap: var(--space-1) !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-3 { gap: var(--space-3) !important; }
.gap-4 { gap: var(--space-4) !important; }
.gap-5 { gap: var(--space-5) !important; }
.gap-6 { gap: var(--space-6) !important; }

/* ============================================
   WIDTH & HEIGHT UTILITIES
   ============================================ */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }

.h-25 { height: 25% !important; }
.h-50 { height: 50% !important; }
.h-75 { height: 75% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }

.mw-100 { max-width: 100% !important; }
.mh-100 { max-height: 100% !important; }

.min-vh-100 { min-height: 100vh !important; }
.vh-100 { height: 100vh !important; }

/* ============================================
   POSITION UTILITIES
   ============================================ */
.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* ============================================
   OVERFLOW UTILITIES
   ============================================ */
.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll { overflow: scroll !important; }

/* ============================================
   OPACITY UTILITIES
   ============================================ */
.opacity-0 { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }


/* ============================================
   BUTTON COMPONENTS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.2rem;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-base);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 2px solid transparent;
    border-radius: var(--radius);
    letter-spacing: var(--letter-spacing-normal);
    transition: var(--transition-fast);
    transform: translateY(0);
    box-shadow: none;
}

.btn:hover {
    transform: translateY(-0.15rem);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}

.btn:active,
.btn.active {
    transform: translateY(-0.15rem);
}

.btn:focus {
    outline: none;
    box-shadow: none;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.65;
    pointer-events: none;
}

/* Button Sizes */
.btn-sm {
    padding: 0.4rem 1rem;
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: 0.65rem 1.4rem;
    font-size: 0.85rem;
}

/* Button Variants - Red Theme */
.btn-red,
.btn-primary {
    background-color: var(--red);
    border-color: var(--red);
    color: var(--white);
}

.btn-red:hover,
.btn-primary:hover {
    background-color: var(--red-hover);
    border-color: var(--red-hover);
    color: var(--white);
}

.btn-red-dark {
    background-color: var(--red-dark);
    border-color: var(--red-dark);
    color: var(--white);
}

.btn-red-dark:hover {
    background-color: var(--red-darker);
    border-color: var(--red-darker);
    color: var(--white);
}

/* Button Outline Variants */
.btn-outline-red,
.btn-outline-primary {
    background-color: transparent;
    border-color: var(--red);
    color: var(--red);
}

.btn-outline-red:hover,
.btn-outline-primary:hover {
    background-color: var(--red);
    border-color: var(--red);
    color: var(--white);
}

/* Soft Button Variants */
.btn-soft-red {
    background-color: var(--red-soft);
    border-color: var(--red-soft);
    color: var(--red-dark);
}

.btn-soft-red:hover {
    background-color: var(--red);
    border-color: var(--red);
    color: var(--white);
    box-shadow: var(--btn-shadow);
}

/* Other Button Colors */
.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--white);
}

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

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

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

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

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

.btn-light {
    background-color: var(--light-bg);
    border-color: var(--light-bg);
    color: var(--navy);
}

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

.btn-white:hover {
    box-shadow: var(--shadow-sm);
}

/* Button Block */
.btn-block {
    display: flex;
    width: 100%;
}

/* Circular Buttons */
.btn-circle {
    padding: 0;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: var(--radius-circle);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}

.btn-circle.btn-sm {
    width: 1.8rem;
    height: 1.8rem;
    font-size: 0.8rem;
}

.btn-circle.btn-lg {
    width: 3rem;
    height: 3rem;
    font-size: 1.3rem;
}

/* Icon Buttons */
.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-icon i {
    font-size: 1.1em;
}

/* ============================================
   FORM COMPONENTS
   ============================================ */
input,
textarea,
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-control,
.form-select,
textarea.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    color: var(--text-primary);
    background-color: var(--white);
    border-color: var(--red);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(226, 98, 107, 0.15);
}

.form-control::placeholder {
    color: var(--text-light);
    opacity: 1;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--light-bg);
    opacity: 1;
}

/* Form Sizes */
.form-control-sm {
    padding: 0.4rem 0.6rem;
    font-size: var(--font-size-sm);
}

.form-control-lg {
    padding: 0.65rem 1rem;
    font-size: var(--font-size-lg);
}

/* Form Labels */
.form-label {
    display: inline-block;
    margin-bottom: var(--space-2);
    font-weight: var(--font-weight-normal);
    color: var(--text-dark);
    font-size: var(--font-size-base);
}

/* Form Groups */
.form-group {
    margin-bottom: var(--space-4);
}

/* Input Groups */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group > .form-control,
.input-group > .form-select {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.input-group > .btn {
    max-height: 2.6rem;
}

/* Checkboxes & Radios */
.form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5rem;
    margin-bottom: var(--space-2);
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.2rem;
    margin-left: -1.5rem;
    vertical-align: top;
    background-color: var(--white);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid var(--border-light);
    appearance: none;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.form-check-input[type="checkbox"] {
    border-radius: var(--radius-sm);
}

.form-check-input[type="radio"] {
    border-radius: var(--radius-circle);
}

.form-check-input:checked {
    background-color: var(--red);
    border-color: var(--red);
}

.form-check-input:focus {
    border-color: var(--red);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(226, 98, 107, 0.15);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

/* Form Validation States */
.is-invalid {
    border-color: var(--danger);
}

.is-invalid:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 0.2rem rgba(226, 98, 107, 0.15);
}

.is-valid {
    border-color: var(--success);
}

.is-valid:focus {
    border-color: var(--success);
    box-shadow: 0 0 0 0.2rem rgba(69, 196, 160, 0.15);
}

.invalid-feedback,
.valid-feedback {
    display: block;
    margin-top: var(--space-1);
    font-size: var(--font-size-sm);
}

.invalid-feedback {
    color: var(--danger);
}

.valid-feedback {
    color: var(--success);
}

/* ============================================
   CARD COMPONENTS
   ============================================ */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--white);
    background-clip: border-box;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition-fast);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: var(--space-4);
    margin-bottom: 0;
    background-color: transparent;
    border-bottom: 1px solid var(--border-light);
}

.card-body {
    flex: 1 1 auto;
    padding: var(--space-4);
}

.card-footer {
    padding: var(--space-4);
    background-color: transparent;
    border-top: 1px solid var(--border-light);
}

.card-title {
    margin-bottom: var(--space-3);
    font-size: 1.125rem;
    font-weight: var(--font-weight-bold);
    color: var(--heading-color);
}

.card-subtitle {
    margin-top: calc(-0.5 * var(--space-3));
    margin-bottom: 0;
    color: var(--text-muted);
}

.card-text:last-child {
    margin-bottom: 0;
}

/* Card Variants */
.card-red {
    background-color: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.card-red .card-title,
.card-red .card-text {
    color: var(--white);
}

/* ============================================
   BADGE COMPONENTS
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: var(--font-weight-bold);
    line-height: 1;
    color: var(--white);
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-red,
.badge-primary {
    background-color: var(--red);
}

.badge-pale-red {
    background-color: var(--red-pale);
    color: var(--red-dark);
}

.badge-soft-red {
    background-color: var(--red-soft);
    color: var(--red-dark);
}

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

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

.badge-warning {
    background-color: var(--warning);
    color: var(--navy);
}

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

.badge-dark {
    background-color: var(--dark);
}

.badge-light {
    background-color: var(--light-bg);
    color: var(--navy);
}

/* Badge Pill */
.badge-pill {
    border-radius: var(--radius-pill);
}

/* ============================================
   ALERT COMPONENTS
   ============================================ */
.alert {
    position: relative;
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    border: 1px solid transparent;
    border-radius: var(--radius);
}

.alert-red,
.alert-primary {
    background-color: var(--red-soft);
    border-color: var(--red);
    color: var(--red-dark);
}

.alert-success {
    background-color: #edf8f3;
    border-color: var(--success);
    color: #1d7a5a;
}

.alert-danger {
    background-color: var(--red-soft);
    border-color: var(--danger);
    color: var(--red-dark);
}

.alert-warning {
    background-color: #fef7ed;
    border-color: var(--warning);
    color: #8b5e00;
}

.alert-info {
    background-color: #edf6fa;
    border-color: var(--info);
    color: #2b5f7a;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    padding: var(--space-4);
}

/* ============================================
   TABLE COMPONENTS
   ============================================ */
.table {
    width: 100%;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
    vertical-align: top;
    border-color: var(--border-light);
}

.table > :not(caption) > * > * {
    padding: 0.75rem;
    background-color: var(--white);
    border-bottom-width: 1px;
    box-shadow: inset 0 0 0 9999px transparent;
}

.table > thead {
    vertical-align: bottom;
    background-color: var(--light-bg);
    font-weight: var(--font-weight-bold);
    color: var(--heading-color);
}

.table > tbody {
    vertical-align: inherit;
}

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

/* Table Striped */
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Table Bordered */
.table-bordered > :not(caption) > * {
    border-width: 1px 0;
}

.table-bordered > :not(caption) > * > * {
    border-width: 0 1px;
}

/* Table Red Header */
.table-red > thead {
    background-color: var(--red);
    color: var(--white);
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   PAGINATION COMPONENTS
   ============================================ */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    gap: var(--space-2);
}

.page-link {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--red);
    text-decoration: none;
    background-color: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.page-link:hover {
    color: var(--red-dark);
    background-color: var(--red-soft);
    border-color: var(--red);
}

.page-link:focus {
    color: var(--red-dark);
    background-color: var(--light-bg);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(226, 98, 107, 0.15);
}

.page-item.active .page-link {
    color: var(--white);
    background-color: var(--red);
    border-color: var(--red);
}

.page-item.disabled .page-link {
    color: var(--text-light);
    pointer-events: none;
    background-color: var(--white);
    border-color: var(--border-light);
}

/* ============================================
   MODAL COMPONENTS
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-modal);
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal.show {
    display: block;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: var(--space-4);
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    outline: 0;
}

.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.modal-title {
    margin-bottom: 0;
    line-height: var(--line-height-base);
    font-weight: var(--font-weight-bold);
    color: var(--heading-color);
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: var(--space-4);
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    padding: calc(var(--space-4) - var(--space-1));
    border-top: 1px solid var(--border-light);
    border-bottom-right-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-lg);
    gap: var(--space-2);
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-modal-backdrop);
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
}

@media (max-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
}

@media (max-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
}

@media (max-width: 1200px) {
    .d-xl-none { display: none !important; }
    .d-xl-block { display: block !important; }
    .d-xl-flex { display: flex !important; }
}
