/* ==========================================
   GLOBAL VARIABLES & COLORS
   ========================================== */
:root {
    /* Primary Colors */
    --primary: #0066cc;
    --primary-light: #3385d6;
    --primary-dark: #004199;
    
    /* Secondary Colors */
    --secondary: #00a8e8;
    --secondary-light: #4dbff6;
    --secondary-dark: #006fa3;
    
    /* Neutral Colors */
    --dark: #1a1a1a;
    --gray-900: #212529;
    --gray-800: #2d3436;
    --gray-700: #636e72;
    --gray-600: #74787c;
    --gray-500: #9e9e9e;
    --gray-400: #bdbdbd;
    --gray-300: #e0e0e0;
    --gray-200: #f0f0f0;
    --gray-100: #f5f7fa;
    --white: #ffffff;
    
    /* Status Colors */
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition: all 0.3s ease;
    
    /* Spacing */
    --sidebar-width: 260px;
    --sidebar-width-mobile: 0;
    --header-height: 60px;
    --footer-height: 60px;
    
    /* Z-indexes */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-100);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--gray-900);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

input, textarea, select {
    font-family: inherit;
}

/* ==========================================
   APP LAYOUT STRUCTURE
   ========================================== */
.app-body {
    overflow-x: hidden;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--gray-100);
}

.main-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition);
}

/* ==========================================
   SIDEBAR STYLES
   ========================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    z-index: var(--z-fixed);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-toggle-mobile {
    display: none;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--white);
    font-size: 18px;
    transition: var(--transition);
}

.sidebar-toggle-mobile:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 16px;
    overflow-y: auto;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.user-role {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 8px 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-menu-bottom {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    transition: var(--transition);
    position: relative;
    font-weight: 500;
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    padding-left: 20px;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    box-shadow: inset 3px 0 0 0 var(--white);
}

.nav-link i {
    font-size: 18px;
    width: 20px;
    display: flex;
    align-items: center;
}

.nav-text {
    flex: 1;
}

.nav-badge {
    display: inline-block;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--danger);
    color: var(--white);
    border-radius: 11px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-link {
    color: rgba(255, 255, 255, 0.7);
}

.logout-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.15);
}

/* ==========================================
   HEADER STYLES
   ========================================== */
.app-header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    background: transparent;
    border-radius: 6px;
    color: var(--gray-800);
    font-size: 20px;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--gray-200);
}

.header-center {
    flex: 1;
}

.page-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--gray-200);
    color: var(--gray-800);
    font-size: 16px;
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--danger);
    color: var(--white);
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

.header-divider {
    width: 1px;
    height: 28px;
    background: var(--gray-300);
}

.user-menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--white);
    font-size: 18px;
    transition: var(--transition);
}

.user-menu-toggle:hover {
    background: var(--primary);
    transform: scale(1.05);
}

/* ==========================================
   MAIN CONTENT AREA
   ========================================== */
.page-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.02) 0%, rgba(0, 168, 232, 0.02) 100%);
}

/* ==========================================
   FOOTER STYLES
   ========================================== */
.app-footer {
    height: var(--footer-height);
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--gray-800);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
}

.footer-text {
    font-size: 12px;
    margin: 0;
}

.footer-credit {
    color: var(--gray-500);
}

/* ==========================================
   COMMON COMPONENTS
   ========================================== */

/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-300);
    background: var(--gray-100);
    border-radius: 8px 8px 0 0;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-300);
    background: var(--gray-100);
    border-radius: 0 0 8px 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

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

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

.btn-danger:hover {
    background: #c0392b;
}

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

.btn-success:hover {
    background: #229954;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

/* Inputs */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 6px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    background: var(--white);
    color: var(--gray-800);
    transition: var(--transition);
}

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

.form-control::placeholder {
    color: var(--gray-500);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead {
    background: var(--gray-100);
    border-bottom: 2px solid var(--gray-300);
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-800);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.table tbody tr {
    transition: var(--transition);
}

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

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.alert-primary {
    background: rgba(0, 102, 204, 0.1);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    border-color: var(--success);
    color: #1e5631;
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    border-color: var(--warning);
    color: #704214;
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--danger);
    color: #78281f;
}

/* ==========================================
   CARD CONTAINER COMPONENT
   ========================================== */
.card-container {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    animation: fadeIn 0.3s ease;
    margin-bottom: 20px;
}

.card-container:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05) 0%, rgba(0, 168, 232, 0.05) 100%);
    border-bottom: 2px solid var(--gray-300);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.card-header-left i {
    font-size: 22px;
    color: var(--primary);
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.card-header-action {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.card-body {
    padding: 20px;
}

.card-body-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

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

.card-footer {
    background: var(--gray-100);
    border-top: 1px solid var(--gray-300);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.card-divider {
    height: 1px;
    background: var(--gray-300);
    margin: 16px 0;
}

/* Card Sizes */
.card-container.card-sm {
    border-radius: 6px;
}

.card-container.card-sm .card-header {
    padding: 12px 16px;
}

.card-container.card-sm .card-body {
    padding: 12px 16px;
}

.card-container.card-lg .card-header {
    padding: 20px 24px;
}

.card-container.card-lg .card-body {
    padding: 24px;
}

/* Card Status */
.card-container.card-success {
    border-left: 4px solid var(--success);
}

.card-container.card-success .card-header {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.05) 0%, rgba(39, 174, 96, 0.02) 100%);
}

.card-container.card-warning {
    border-left: 4px solid var(--warning);
}

.card-container.card-warning .card-header {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.05) 0%, rgba(243, 156, 18, 0.02) 100%);
}

.card-container.card-danger {
    border-left: 4px solid var(--danger);
}

.card-container.card-danger .card-header {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.05) 0%, rgba(231, 76, 60, 0.02) 100%);
}

.card-container.card-info {
    border-left: 4px solid var(--secondary);
}

.card-container.card-info .card-header {
    background: linear-gradient(135deg, rgba(0, 168, 232, 0.05) 0%, rgba(52, 152, 219, 0.02) 100%);
}

/* Card with table */
.card-container .table {
    margin-bottom: 0;
}

.card-container .table thead {
    background: var(--gray-200);
}

/* Grid Layout for Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.cards-grid.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.cards-grid.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.cards-grid.grid-full {
    grid-template-columns: 1fr;
}

/* ==========================================
   PAGE COMPOSITION HELPERS
   ========================================== */

.page-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.page-hero-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    flex-shrink: 0;
}

.page-hero-title {
    margin: 0;
    font-size: 28px;
    color: var(--gray-900);
}

.page-hero-subtitle {
    margin: 0;
    color: var(--gray-600);
    font-size: 12px;
}

.section-card {
    margin-bottom: 24px;
}

.stack-card {
    margin-bottom: 20px;
}

.stack-card-top {
    margin-top: 24px;
}

.section-grid-request {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.section-grid-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.section-grid-orders {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
    align-items: start;
}

.actions-row,
.actions-row-center,
.actions-row-end {
    display: flex;
    gap: 12px;
}

.actions-row {
    align-items: center;
}

.actions-row-center {
    justify-content: center;
    margin-top: 16px;
}

.actions-row-end {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.select-full-width {
    width: 100%;
}

.card-body-table {
    padding: 0;
}

.btn-outline-neutral {
    border-color: var(--gray-400);
    color: var(--gray-700);
}

.btn-block-center {
    width: 100%;
    justify-content: center;
}

.section-description {
    color: var(--gray-600);
    font-size: 13px;
    margin-bottom: 16px;
}

.content-section {
    margin-bottom: 20px;
}

.content-section-top {
    margin-top: 20px;
}

.content-section-title {
    color: var(--gray-900);
    margin-bottom: 12px;
}

.pagination-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}

.pagination-wrap .paginationjs {
    width: 100%;
}

.pagination-wrap .paginationjs-pages {
    display: flex;
    justify-content: center;
}

.pagination-wrap .paginationjs-pages ul {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination-wrap .paginationjs-pages ul li {
    list-style: none;
}

.pagination-wrap .paginationjs-pages ul li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
    transition: var(--transition);
}

.pagination-wrap .paginationjs-pages ul li:not(.active):not(.disabled):not(.paginationjs-ellipsis) > a:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.pagination-wrap .paginationjs-pages ul li.active > a {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.pagination-wrap .paginationjs-pages ul li.disabled > a,
.pagination-wrap .paginationjs-pages ul li.paginationjs-ellipsis > a {
    background: var(--gray-100);
    color: var(--gray-500);
    border-color: var(--gray-200);
    box-shadow: none;
}

.pagination-wrap .paginationjs-pages ul .paginationjs-prev > a,
.pagination-wrap .paginationjs-pages ul .paginationjs-next > a {
    min-width: 44px;
    font-size: 18px;
    line-height: 1;
}

.empty-table-cell {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-600);
}

.empty-table-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

.centered-content {
    text-align: center;
    color: var(--gray-600);
}

.stats-card-content {
    text-align: center;
}

.stats-number {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.stats-number-primary {
    color: var(--primary);
}

.stats-number-secondary {
    color: var(--secondary);
}

.stats-number-warning {
    color: var(--warning);
}

.stats-caption {
    color: var(--gray-600);
    margin: 8px 0 0;
}

.empty-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.table-no-margin {
    margin-bottom: 0;
}

.section-title {
    color: var(--gray-900);
    margin-bottom: 16px;
    font-size: 18px;
}

.legend-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-swatch {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.legend-swatch-pending {
    background: rgb(43, 43, 43);
}

.legend-swatch-printed {
    background: rgb(210, 189, 0);
}

.legend-swatch-delivered {
    background: rgb(14, 163, 3);
}

.legend-text {
    font-weight: 500;
    color: var(--gray-800);
}

.order-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.order-empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

.order-empty-title {
    color: var(--gray-800);
    margin: 0;
}

.order-empty-text {
    color: var(--gray-600);
    margin: 8px 0 0;
}

.order-details-grid,
.scanned-list {
    display: grid;
    gap: 12px;
}

.order-detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-detail-icon {
    color: var(--primary);
    font-size: 18px;
}

.order-detail-label {
    margin: 0;
    font-size: 12px;
    color: var(--gray-600);
}

.order-detail-value {
    margin: 0;
    font-weight: 600;
    color: var(--gray-900);
}

.scanner-viewport {
    margin-bottom: 16px;
}

.title-page-header {
    margin-top: 125px;
    margin-bottom: 50px;
}

.label-icon {
    margin-right: 6px;
}

/* Loading */
.bg_loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s ease;
    align-items: center;
    justify-content: center;
}

.loading-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: loadingScaleIn 0.3s ease;
}

.loading-card {
    width: min(90%, 320px);
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.squad_load {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 102, 204, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-body {
    color: var(--gray-900);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.loading-caption {
    margin: 20px 0 0;
    font-size: 11px;
    color: var(--gray-500);
}

.size_icon_load {
    font-size: 32px;
    color: var(--primary);
    display: block;
}

/* Login */
body.login-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    perspective: 1000px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    animation: fadeIn 0.5s ease, slideInUp 0.5s ease;
}

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

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.login-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 0;
}

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

.login-page .form-label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.login-page .form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    background: var(--gray-100);
    color: var(--dark);
    transition: var(--transition);
}

.login-page .form-control:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    outline: none;
}

.login-page .form-control::placeholder {
    color: var(--gray-500);
}

.login-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-button:hover {
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
    transform: translateY(-2px);
}

.login-button:active {
    transform: translateY(0);
}

.login-button i {
    font-size: 18px;
}

.login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px;
    text-align: center;
    color: var(--white);
    font-size: 12px;
}

.login-footer p {
    margin: 0;
    line-height: 1.4;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Tablet (768px and below) */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 200px;
    }
    
    .page-content {
        padding: 16px;
    }
    
    .app-header {
        padding: 0 16px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
    
    .card-body-row {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
    }
}

/* Mobile (576px and below) */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0;
        --header-height: 56px;
    }
    
    .main-container {
        margin-left: 0;
    }
    
    .sidebar {
        position: fixed;
        left: -100%;
        width: 260px;
        height: 100vh;
        transition: left var(--transition);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-toggle-mobile {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-left {
        width: 44px;
    }
    
    .page-title {
        font-size: 16px;
    }
    
    .page-content {
        padding: 12px;
    }
    
    .app-header {
        padding: 0 12px;
        gap: 12px;
    }
    
    .card {
        border-radius: 6px;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 10px 12px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .app-footer {
        height: auto;
        padding: 12px;
    }
    
    .card-container {
        border-radius: 8px;
    }
    
    .card-header {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .card-body-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .card-footer > * {
        width: 100%;
    }

    .pagination-wrap .paginationjs-pages ul {
        gap: 8px;
    }

    .pagination-wrap .paginationjs-pages ul li > a {
        min-width: 36px;
        height: 36px;
        padding: 0 12px;
        border-radius: 10px;
        font-size: 13px;
    }

    .section-grid-settings,
    .section-grid-request,
    .section-grid-orders {
        grid-template-columns: 1fr;
    }

    .actions-row-end,
    .legend-row {
        justify-content: center;
    }

    .loading-card {
        padding: 32px 24px;
    }

    .login-card {
        padding: 30px 20px;
        margin: 20px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-footer {
        position: relative;
        background: rgba(0, 0, 0, 0.05);
        margin-top: 40px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    :root {
        --header-height: 52px;
    }
    
    .page-title {
        font-size: 14px;
    }
    
    .app-header {
        padding: 0 8px;
    }
    
    .page-content {
        padding: 8px;
    }
    
    .card-body,
    .card-header {
        padding: 12px;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

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

.text-muted { color: var(--gray-600); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.rounded { border-radius: 6px; }
.rounded-lg { border-radius: 12px; }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

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

::-webkit-scrollbar-track {
    background: var(--gray-200);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loadingScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.animate-fadeIn {
    animation: fadeIn 0.3s ease;
}

.animate-slideInLeft {
    animation: slideInLeft 0.3s ease;
}

.animate-slideInRight {
    animation: slideInRight 0.3s ease;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================
   TABLE ACTION BUTTONS  (.section_table_btn)
   ========================================== */

/* Celda contenedora */
td.section_table_btn {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 8px 12px !important;
}

/* Base de cada botón de acción */
td.section_table_btn a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1.5px solid transparent;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease,
                transform 0.2s ease,
                box-shadow 0.2s ease;
    /* Reset del estilo rotado del diseño viejo */
    transform: none;
}

td.section_table_btn a i,
td.section_table_btn a span {
    /* Reset de la rotación inversa del diseño viejo */
    transform: none;
    display: inline-flex;
    line-height: 1;
}

td.section_table_btn a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* ── Editar / Modificar (azul primario) ──────────── */
td.section_table_btn a[id="editProduct"],
td.section_table_btn a[id="editProductPack"],
td.section_table_btn a[id="edit_variant"] {
    background: rgba(0, 102, 204, 0.08);
    color: var(--primary);
    border-color: rgba(0, 102, 204, 0.25);
}

td.section_table_btn a[id="editProduct"]:hover,
td.section_table_btn a[id="editProductPack"]:hover,
td.section_table_btn a[id="edit_variant"]:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ── Ver detalle / Ojo (info azul claro) ─────────── */
td.section_table_btn a[id="details"],
td.section_table_btn a[id="view_sku"],
td.section_table_btn a[id="view_sku_pack"] {
    background: rgba(0, 168, 232, 0.08);
    color: var(--secondary-dark);
    border-color: rgba(0, 168, 232, 0.25);
}

td.section_table_btn a[id="details"]:hover,
td.section_table_btn a[id="view_sku"]:hover,
td.section_table_btn a[id="view_sku_pack"]:hover {
    background: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
}

/* ── Asociar orden / Agregar (verde) ─────────────── */
td.section_table_btn a[id="addOrden"],
td.section_table_btn a[id="gestion_sku"] {
    background: rgba(39, 174, 96, 0.08);
    color: var(--success);
    border-color: rgba(39, 174, 96, 0.25);
}

td.section_table_btn a[id="addOrden"]:hover,
td.section_table_btn a[id="gestion_sku"]:hover {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

/* ── Eliminar (rojo) ─────────────────────────────── */
td.section_table_btn a[id="deleteCategory"],
td.section_table_btn a[id="delete_variant"] {
    background: rgba(231, 76, 60, 0.08);
    color: var(--danger);
    border-color: rgba(231, 76, 60, 0.25);
}

td.section_table_btn a[id="deleteCategory"]:hover,
td.section_table_btn a[id="delete_variant"]:hover {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

/* ── Botón oculto (d-none) no afecta el layout ───── */
td.section_table_btn a.d-none {
    display: none !important;
}

/* ── Fila con acciones: cursor pointer ───────────── */
.table tbody tr:has(td.section_table_btn a) {
    cursor: default;
}
