/* ============================================
   SISTEMA DE TICKETS SMD - LOGISTICS THEME
   ============================================ */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables - Logistics Theme */
:root {
    /* Primary Colors - Logistics/Shipping Theme */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-lighter: #dbeafe;
    
    /* Secondary Colors */
    --secondary-color: #7c3aed;
    --secondary-dark: #6d28d9;
    --secondary-light: #8b5cf6;
    
    /* Accent Colors */
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-green: #10b981;
    --accent-blue: #06b6d4;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Status Colors */
    --status-open: #f59e0b;
    --status-progress: #3b82f6;
    --status-resolved: #10b981;
    --status-closed: #6b7280;
    
    /* Priority Colors */
    --priority-low: #10b981;
    --priority-medium: #f59e0b;
    --priority-high: #f97316;
    --priority-urgent: #ef4444;
    
    /* Service Colors */
    --service-fedex: #4c1d95;
    --service-dhl: #fbbf24;
    --service-other: #6b7280;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.2s ease-in-out;
    --transition-slow: 0.3s ease-in-out;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
}

/* Base Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
    font-size: 14px;
}

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

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

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

.login-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 10;
}

.login-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

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

.login-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem;
    text-align: center;
}

.logo-container i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.logo-container h1 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.logo-container p {
    color: var(--primary-lighter);
    font-size: 0.875rem;
}

.login-body {
    padding: 2rem;
}

.login-body h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-subtitle {
    color: var(--gray-500);
    text-align: center;
    margin-bottom: 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: var(--font-medium);
    color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    font-size: 0.875rem;
    transition: var(--transition-normal);
    background: var(--gray-50);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Interactions Section */
.interactions-section,
.agent-activity-section {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 1.5rem;
}

.add-interaction {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}

.interaction-form {
    display: grid;
    gap: 1rem;
}

.interaction-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.interactions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.interaction-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: var(--transition-normal);
}

.interaction-item:hover {
    border-color: var(--gray-300);
}

.interaction-header {
    margin-bottom: 0.75rem;
}

.interaction-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.interaction-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: var(--font-medium);
    text-transform: uppercase;
}

.interaction-type-badge.note {
    background: var(--accent-blue);
    color: white;
}

.interaction-type-badge.status_change {
    background: var(--accent-orange);
    color: white;
}

.interaction-type-badge.customer_contact {
    background: var(--accent-green);
    color: white;
}

.interaction-type-badge.resolution {
    background: var(--primary-color);
    color: white;
}

.interaction-user {
    font-weight: var(--font-medium);
    color: var(--gray-700);
}

.interaction-date {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.interaction-content {
    color: var(--gray-700);
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Agent Activity */
.agent-activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.activity-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-lighter);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.activity-content {
    flex: 1;
}

.activity-description {
    font-weight: var(--font-medium);
    color: var(--gray-700);
    margin-bottom: 0.25rem;
}

.activity-meta {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Form Footer */
.form-footer {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 1rem 2rem;
    margin: 2rem -2rem -2rem -2rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Modern Card-Based Edit Interface */
.info-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-blue));
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.card-header {
    padding: 2rem 2rem 1rem 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    position: relative;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.card-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    border-radius: inherit;
}

.case-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.shipment-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.card-title {
    flex: 1;
}

.card-title h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.card-title p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin: 0;
}

.card-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.status-pill,
.priority-pill {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-pill.open {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.status-pill.in_progress {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.status-pill.resolved {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.status-pill.closed {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.priority-pill.low {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: white;
}

.priority-pill.medium {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.priority-pill.high {
    background: linear-gradient(135deg, #fb7185, #e11d48);
    color: white;
}

.priority-pill.urgent {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
}

.card-content {
    padding: 0 2rem 2rem 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-lighter), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-content label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.info-content span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.case-number {
    font-family: 'Monaco', 'Menlo', monospace;
    background: var(--primary-lighter);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem !important;
}

.form-controls {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.control-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.form-field {
    position: relative;
}

.form-field.featured {
    grid-column: 1 / -1;
}

.form-field label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.form-field label i {
    color: var(--primary-color);
    width: 16px;
}

.input-wrapper {
    position: relative;
}

.modern-input,
.modern-select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.modern-input:focus,
.modern-select:focus {
    border-color: var(--primary-color);
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}

.input-accent {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.modern-input:focus + .input-accent,
.modern-select:focus + .input-accent {
    width: 100%;
}

.tracking-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Enhanced Detail Items */
.detail-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.detail-item label {
    font-weight: var(--font-semibold);
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.875rem;
}

.detail-item .form-input,
.detail-item .form-select,
.detail-item .form-textarea {
    width: 100%;
    transition: all var(--transition-normal);
}

.detail-item .form-input:focus,
.detail-item .form-select:focus,
.detail-item .form-textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

/* Grid Layout Improvements */
.case-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.case-detail-grid > .interactions-section,
.case-detail-grid > .agent-activity-section,
.case-detail-grid > .attachments-section,
.case-detail-grid > .tracking-info-section {
    grid-column: 1 / -1;
}

/* Section Visual Enhancements */
.case-info-section,
.shipment-info-section,
.customer-info-section,
.complaint-info-section,
.assignment-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: var(--transition-normal);
}

.case-info-section:hover,
.shipment-info-section:hover,
.customer-info-section:hover,
.complaint-info-section:hover,
.assignment-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Form Validation and Helper Text */
.field-help {
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: var(--font-medium);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--accent-red);
    background-color: rgba(239, 68, 68, 0.05);
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Enhanced Button Styling */
.btn-danger {
    background: var(--accent-red);
    color: white;
    border: 1px solid var(--accent-red);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Mobile Responsiveness for Edit Page */
@media (max-width: 1024px) {
    .case-detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .status-indicators {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .current-status,
    .current-priority {
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem;
        background: var(--gray-50);
        border-radius: var(--radius-md);
    }
}

@media (max-width: 768px) {
    .case-info-section,
    .shipment-info-section,
    .customer-info-section,
    .complaint-info-section,
    .assignment-section {
        padding: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
    
    .detail-group {
        gap: 1rem;
    }
    
    .form-footer {
        position: static;
        margin: 2rem 0 0 0;
        border-radius: var(--radius-lg);
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition-normal);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-footer {
    background: var(--gray-50);
    padding: 1rem 2rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 70%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ============================================
   MAIN APPLICATION LAYOUT
   ============================================ */

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

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: var(--font-bold);
    color: var(--primary-color);
}

.logo i {
    font-size: 1.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition-normal);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--gray-50);
    color: var(--primary-color);
}

.nav-item.active {
    background: var(--primary-lighter);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: var(--font-medium);
}

.nav-item i {
    font-size: 1.125rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

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

.user-name {
    font-weight: var(--font-medium);
    color: var(--gray-900);
}

.user-role {
    font-size: 0.875rem;
    color: var(--gray-500);
    text-transform: capitalize;
}

.logout-form {
    margin: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
}

.page-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title h1 {
    margin-bottom: 0.25rem;
}

.page-title p {
    color: var(--gray-500);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

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

.breadcrumb i {
    color: var(--gray-400);
    font-size: 0.75rem;
}

.page-actions {
    display: flex;
    gap: 1rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: var(--font-medium);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-normal);
    white-space: nowrap;
}

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

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

.btn-outline {
    background: white;
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

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

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   BADGES AND STATUS INDICATORS
   ============================================ */

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.open {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-badge.in_progress {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.status-badge.resolved {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-badge.closed {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-badge.inactive {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.priority-badge.low {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.priority-badge.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.priority-badge.high {
    background: rgba(249, 115, 22, 0.1);
    color: #ea580c;
}

.priority-badge.urgent {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.service-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-badge.fedex {
    background: rgba(76, 29, 149, 0.1);
    color: #581c87;
}

.service-badge.dhl {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
}

.service-badge.other {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.role-badge.admin {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.role-badge.supervisor {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.role-badge.agent {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

/* ============================================
   DASHBOARD STYLES
   ============================================ */

.dashboard-content {
    padding: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--gray-200);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.total {
    background: var(--primary-color);
}

.stat-icon.open {
    background: var(--status-open);
}

.stat-icon.progress {
    background: var(--status-progress);
}

.stat-icon.resolved {
    background: var(--status-resolved);
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: var(--font-bold);
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.dashboard-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
    width: 100%;
    overflow-x: auto;
}

.section-header {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.section-header h2 {
    margin: 0;
    color: var(--gray-900);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1.5rem 2rem;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    text-decoration: none;
    color: var(--gray-700);
    transition: var(--transition-normal);
}

.quick-action:hover {
    background: var(--gray-50);
    border-color: var(--primary-color);
}

.action-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-lighter);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.action-content h3 {
    margin-bottom: 0.25rem;
    color: var(--gray-900);
}

.action-content p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* ============================================
   TABLES
   ============================================ */

.cases-table-container {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

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

.cases-table th {
    background: var(--gray-50);
    padding: 1rem;
    text-align: left;
    font-weight: var(--font-semibold);
    color: var(--gray-900);
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.cases-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
}

.cases-table tr:hover {
    background: var(--gray-50);
}

.case-info {
    display: flex;
    flex-direction: column;
}

.case-info strong {
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.case-info small {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.seller-info {
    display: flex;
    flex-direction: column;
}

.seller-info strong {
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.seller-info small {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.complaint-reason {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.empty-state p {
    font-size: 1.125rem;
}

/* ============================================
   CASES PAGE
   ============================================ */

.cases-content {
    padding: 2rem;
}

.filters-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.filters-form {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.filter-group label {
    font-weight: var(--font-medium);
    color: var(--gray-700);
    font-size: 0.875rem;
}

.filter-group input,
.filter-group select {
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: var(--transition-normal);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
}

.cases-table-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.table-actions {
    display: flex;
    gap: 1rem;
}

/* Card View */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.case-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.case-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.case-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.case-number strong {
    color: var(--gray-900);
    font-size: 1.125rem;
}

.case-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.case-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.case-field label {
    font-weight: var(--font-medium);
    color: var(--gray-600);
    font-size: 0.875rem;
}

.case-field span {
    color: var(--gray-900);
    font-size: 0.875rem;
}

.case-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* ============================================
   CASE DETAIL PAGE
   ============================================ */

.case-detail-content {
    padding: 2rem;
}

.case-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.case-info-section,
.shipment-info-section,
.customer-info-section,
.complaint-info-section,
.attachments-section,
.tracking-info-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.status-indicators {
    display: flex;
    gap: 0.5rem;
}

.case-details,
.shipment-details,
.customer-details,
.complaint-details {
    padding: 1.5rem 2rem;
}

.detail-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item label {
    font-weight: var(--font-medium);
    color: var(--gray-600);
    font-size: 0.875rem;
}

.detail-item span {
    color: var(--gray-900);
    font-size: 0.875rem;
    text-align: right;
}

.tracking-number {
    font-family: 'Courier New', monospace;
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.tracking-status {
    color: var(--primary-color);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.attachment-count {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.attachments-grid {
    display: grid;
    gap: 1rem;
    padding: 1.5rem 2rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.attachment-item:hover {
    background: var(--gray-50);
    border-color: var(--primary-color);
}

.attachment-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-lighter);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.attachment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.attachment-name {
    font-weight: var(--font-medium);
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.attachment-meta {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.attachment-actions {
    display: flex;
    gap: 0.5rem;
}

/* Tracking Information */
.tracking-details {
    padding: 1.5rem 2rem;
}

.tracking-status {
    margin-bottom: 1.5rem;
}

.status-current {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.status-text {
    font-size: 1.125rem;
    font-weight: var(--font-semibold);
    color: var(--gray-900);
}

.status-location {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.estimated-delivery {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-size: 0.875rem;
}

.tracking-events h3 {
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.events-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-left: 3px solid var(--primary-color);
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.event-time {
    font-size: 0.875rem;
    color: var(--gray-600);
    min-width: 120px;
}

.event-content {
    flex: 1;
}

.event-description {
    font-weight: var(--font-medium);
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.event-location {
    color: var(--gray-600);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================
   USERS PAGE
   ============================================ */

.users-content {
    padding: 2rem;
}

.users-table-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

.users-table-container {
    overflow-x: auto;
}

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

.users-table th {
    background: var(--gray-50);
    padding: 1rem;
    text-align: left;
    font-weight: var(--font-semibold);
    color: var(--gray-900);
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.users-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}

.users-table tr:hover {
    background: var(--gray-50);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

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

.user-details strong {
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.user-details small {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.activity-count {
    background: var(--primary-lighter);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: var(--font-medium);
}

.permissions-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem 2rem;
}

.permission-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--gray-50);
}

.permission-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.permission-content h3 {
    margin-bottom: 0.25rem;
    color: var(--gray-900);
    font-size: 1rem;
}

.permission-content p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* ============================================
   FORM STYLING
   ============================================ */

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: inherit;
    transition: var(--transition-normal);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input:disabled,
.form-input.readonly {
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: not-allowed;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
}

.checkbox-label:hover {
    background: var(--gray-50);
}

.checkbox-input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-text {
    font-size: 0.875rem;
    color: var(--gray-700);
    font-weight: var(--font-medium);
}

/* ============================================
   MODALS
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
}

.permissions-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.pagination-info {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-normal);
}

.pagination-btn:hover {
    background: var(--gray-50);
    border-color: var(--primary-color);
}

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

/* ============================================
   ALERTS
   ============================================ */

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ============================================
   UTILITIES
   ============================================ */

.text-muted {
    color: var(--gray-500);
}

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

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

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

@media (max-width: 768px) {
    .sidebar {
        width: 250px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .page-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .page-actions {
        justify-content: stretch;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-form {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .case-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pagination {
        justify-content: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .dashboard-content,
    .cases-content,
    .case-detail-content,
    .users-content {
        padding: 1rem;
    }
    
    .login-card {
        margin: 1rem;
    }
    
    .login-body {
        padding: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .cases-table-container {
        font-size: 0.875rem;
    }
    
    .cases-table th,
    .cases-table td {
        padding: 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn {
        justify-content: center;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .sidebar,
    .page-actions,
    .filter-actions,
    .table-actions,
    .action-buttons,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .page-header {
        border-bottom: 2px solid #000;
        margin-bottom: 2rem;
    }
    
    .case-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card,
    .dashboard-section,
    .case-info-section,
    .shipment-info-section,
    .customer-info-section,
    .complaint-info-section,
    .attachments-section,
    .tracking-info-section {
        box-shadow: none !important;
        border: 1px solid #000 !important;
        break-inside: avoid;
    }
    
    body {
        font-size: 12px;
        line-height: 1.4;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading-skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}