/**
 * Tabesh Staff Panel - Complete Redesign
 * Modern Neumorphism UI with Dark/Light Mode
 * Mobile-first, responsive, RTL-ready
 *
 * @package Tabesh
 */

/* ==========================================
   CSS Variables - Light & Dark Themes
   ========================================== */

:root {
    /* Light Theme Colors */
    --bg-primary: #f0f3f7;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f8f9fb;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-tertiary: #a0aec0;
    --text-muted: #cbd5e0;
    
    /* Brand Colors */
    --accent-blue: #4a90e2;
    --accent-blue-light: #5da3f5;
    --accent-blue-dark: #3a7bc8;
    --accent-gold: #ffd700;
    --accent-gold-light: #ffe84d;
    --accent-gold-dark: #ccac00;
    
    /* Status Colors */
    --status-pending: #f39c12;
    --status-confirmed: #3498db;
    --status-processing: #9b59b6;
    --status-ready: #1abc9c;
    --status-completed: #27ae60;
    --status-cancelled: #e74c3c;
    
    /* Semantic Colors */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-blue-gold: linear-gradient(135deg, #4a90e2 0%, #ffd700 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8f9fb 100%);
    
    /* Shadows - Neumorphism */
    --shadow-neumorphic: 
        12px 12px 24px rgba(163, 177, 198, 0.6),
        -12px -12px 24px rgba(255, 255, 255, 0.5);
    --shadow-neumorphic-inset:
        inset 6px 6px 12px rgba(163, 177, 198, 0.4),
        inset -6px -6px 12px rgba(255, 255, 255, 0.5);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-button: 0 4px 12px rgba(102, 126, 234, 0.4);
    
    /* Borders */
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --border-radius-full: 9999px;
    
    /* Transitions */
    --transition-speed: 0.3s;
    --transition-fast: 0.15s;
    --transition-slow: 0.5s;
    
    /* Z-indexes */
    --z-header: 1000;
    --z-modal: 9999;
    --z-toast: 10000;
    --z-overlay: 9998;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-card: #2d3748;
    --bg-hover: #374151;
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-tertiary: #a0aec0;
    --text-muted: #718096;
    
    /* Adjusted Gradients for Dark Mode */
    --gradient-card: linear-gradient(145deg, #2d3748 0%, #1a202c 100%);
    
    /* Adjusted Shadows for Dark Mode */
    --shadow-neumorphic: 
        12px 12px 24px rgba(0, 0, 0, 0.5),
        -12px -12px 24px rgba(74, 85, 104, 0.1);
    --shadow-neumorphic-inset:
        inset 6px 6px 12px rgba(0, 0, 0, 0.5),
        inset -6px -6px 12px rgba(74, 85, 104, 0.1);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* ==========================================
   Base Styles & Reset
   ========================================== */

/* Reset all elements within staff panel to prevent inheritance issues */
.tabesh-staff-panel * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Reset specific elements that might inherit unwanted styles */
.tabesh-staff-panel a,
.tabesh-staff-panel button,
.tabesh-staff-panel input,
.tabesh-staff-panel select,
.tabesh-staff-panel textarea {
    font-size: inherit;
    line-height: inherit;
    text-decoration: none;
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
}

.tabesh-staff-panel {
    font-family: 'Vazirmatn', 'Vazir', 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
    text-align: right;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    transition: background var(--transition-speed), color var(--transition-speed);
    line-height: 1.6;
    isolation: isolate; /* Create new stacking context */
    position: relative; /* Ensure proper positioning context */
}

/* ==========================================
   Header Section
   ========================================== */

.staff-panel-header {
    background: var(--gradient-primary);
    padding: 20px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    animation: slideDown 0.5s ease-out;
}

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

.staff-profile-section {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.staff-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-full);
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.staff-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.staff-info h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.staff-info p {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 400;
}

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

.theme-toggle-btn,
.notification-btn,
.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-speed);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.theme-toggle-btn:hover,
.notification-btn:hover,
.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-toggle-btn:active,
.notification-btn:active,
.logout-btn:active {
    transform: translateY(0);
}

.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--accent-gold);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: var(--border-radius-full);
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   Breadcrumb Navigation
   ========================================== */

.breadcrumb-nav {
    background: var(--bg-secondary);
    padding: 15px 30px;
    border-bottom: 1px solid var(--text-muted);
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--text-muted);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.back-button:hover {
    background: var(--bg-hover);
    transform: translateX(-4px);
}

.breadcrumb-path {
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumb-item {
    color: var(--text-secondary);
    font-size: 14px;
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==========================================
   Search Bar
   ========================================== */

.search-container {
    width: 100%;
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

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

.search-bar {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 18px 55px 18px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    background: var(--bg-card);
    box-shadow: var(--shadow-neumorphic);
    transition: all var(--transition-speed);
    color: var(--text-primary);
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    box-shadow: var(--shadow-hover), 0 0 0 3px rgba(74, 144, 226, 0.2);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 22px;
    pointer-events: none;
}

.search-results-info {
    margin-top: 15px;
    padding: 10px 15px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-card);
}

.results-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==========================================
   Orders Container
   ========================================== */

.tabesh-panel-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.6s ease-out 0.4s both;
}

/* ==========================================
   Orders Grid
   ========================================== */

.tabesh-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* ==========================================
   Order Card
   ========================================== */

.tabesh-staff-order-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: all var(--transition-speed);
    cursor: pointer;
    animation: cardAppear 0.5s ease-out backwards;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tabesh-staff-order-card:nth-child(1) { animation-delay: 0.1s; }
.tabesh-staff-order-card:nth-child(2) { animation-delay: 0.2s; }
.tabesh-staff-order-card:nth-child(3) { animation-delay: 0.3s; }
.tabesh-staff-order-card:nth-child(4) { animation-delay: 0.4s; }
.tabesh-staff-order-card:nth-child(5) { animation-delay: 0.5s; }
.tabesh-staff-order-card:nth-child(n+6) { animation-delay: 0.6s; }

.tabesh-staff-order-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.tabesh-staff-order-card.expanded {
    grid-column: 1 / -1;
    transform: none;
}

.tabesh-staff-order-card.expanded:hover {
    transform: translateY(-2px);
}

/* ==========================================
   Card Header (Collapsed State)
   ========================================== */

.order-card-header {
    padding: 20px;
    background: var(--gradient-primary);
    color: white;
    position: relative;
    transition: all var(--transition-speed);
}

.order-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-number-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-label {
    font-size: 12px;
    opacity: 0.85;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-number {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.expand-icon {
    font-size: 24px;
    transition: transform var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-full);
}

.tabesh-staff-order-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.book-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.book-icon {
    font-size: 20px;
}

.card-quick-info {
    display: flex;
    gap: 12px;
    font-size: 13px;
    opacity: 0.9;
    flex-wrap: wrap;
    align-items: center;
}

.quick-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: var(--border-radius-full);
    backdrop-filter: blur(10px);
}

.info-icon {
    font-size: 16px;
}

.info-text {
    font-weight: 600;
}

/* ==========================================
   Status Badge
   ========================================== */

.status-badge {
    padding: 6px 14px;
    border-radius: var(--border-radius-full);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-speed);
}

.status-badge:hover {
    transform: scale(1.05);
}

.status-pending { background: var(--status-pending); color: white; }
.status-confirmed { background: var(--status-confirmed); color: white; }
.status-processing { background: var(--status-processing); color: white; }
.status-ready { background: var(--status-ready); color: white; }
.status-completed { background: var(--status-completed); color: white; }
.status-cancelled { background: var(--status-cancelled); color: white; }

/* ==========================================
   Card Body (Expanded State)
   ========================================== */

.order-card-body {
    padding: 0;
    display: none;
    background: var(--bg-card);
}

.tabesh-staff-order-card.expanded .order-card-body {
    display: block;
    animation: expandBody 0.4s ease-out;
}

@keyframes expandBody {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 5000px;
    }
}

/* Section Styles */
.tabesh-staff-panel .customer-section,
.tabesh-staff-panel .order-details-section,
.tabesh-staff-panel .extras-section,
.tabesh-staff-panel .notes-section,
.tabesh-staff-panel .status-stepper,
.tabesh-staff-panel .status-update-section {
    padding: 25px;
    border-bottom: 1px solid var(--text-muted);
}

.tabesh-staff-panel .section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.tabesh-staff-panel .section-icon {
    font-size: 24px;
}

.tabesh-staff-panel .section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Customer Info */
.tabesh-staff-panel .customer-info {
    background: var(--bg-primary);
    padding: 15px 20px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-neumorphic-inset);
}

.tabesh-staff-panel .customer-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Order Info Grid */
.tabesh-staff-panel .order-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.tabesh-staff-panel .info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-speed);
}

.tabesh-staff-panel .info-item:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.tabesh-staff-panel .info-item .label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tabesh-staff-panel .info-item .value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 700;
}

.tabesh-staff-panel .info-item.price-item .value {
    color: var(--accent-gold-dark);
    font-size: 18px;
}

/* Extras List */
.tabesh-staff-panel .extras-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tabesh-staff-panel .extra-item {
    background: var(--bg-primary);
    padding: 10px 16px;
    border-radius: var(--border-radius-full);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-neumorphic-inset);
    transition: all var(--transition-speed);
}

.tabesh-staff-panel .extra-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-card);
}

/* Notes Content */
.tabesh-staff-panel .notes-content {
    background: var(--bg-primary);
    padding: 18px;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    box-shadow: var(--shadow-neumorphic-inset);
}


/* ==========================================
   Status Stepper
   ========================================== */

.tabesh-staff-panel .status-stepper {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 25px;
}

.tabesh-staff-panel .stepper-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    padding: 20px 0;
}

.tabesh-staff-panel .stepper-container::before {
    content: '';
    position: absolute;
    top: 45px;
    right: 50px;
    left: 50px;
    height: 4px;
    background: var(--text-muted);
    z-index: 0;
}

.tabesh-staff-panel .stepper-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.tabesh-staff-panel .stepper-step.completed::before,
.tabesh-staff-panel .stepper-step.active::before {
    content: '';
    position: absolute;
    top: 45px;
    right: 50%;
    width: 100%;
    height: 4px;
    background: var(--accent-blue);
    z-index: -1;
}

.tabesh-staff-panel .step-circle {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-full);
    background: var(--bg-card);
    border: 4px solid var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: 700;
    transition: all var(--transition-speed);
    box-shadow: var(--shadow-card);
    position: relative;
}

.tabesh-staff-panel .stepper-step.completed .step-circle,
.tabesh-staff-panel .stepper-step.active .step-circle {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.4);
}

.tabesh-staff-panel .stepper-step:hover .step-circle {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

.tabesh-staff-panel .step-icon {
    font-size: 24px;
}

.tabesh-staff-panel .step-number {
    font-size: 14px;
    font-weight: 700;
    display: none;
}

.tabesh-staff-panel .stepper-step:not(.completed):not(.active) .step-icon {
    display: none;
}

.tabesh-staff-panel .stepper-step:not(.completed):not(.active) .step-number {
    display: block;
}

.tabesh-staff-panel .step-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 8px;
}

.tabesh-staff-panel .stepper-step.active .step-label,
.tabesh-staff-panel .stepper-step.completed .step-label {
    color: var(--text-primary);
    font-weight: 700;
}

/* ==========================================
   Status Update Section
   ========================================== */

.tabesh-staff-panel .status-update-section {
    padding: 25px;
    background: var(--bg-primary);
    border-bottom: none;
}

.tabesh-staff-panel .status-select-wrapper {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.tabesh-staff-panel .status-update-select {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--text-tertiary);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-weight: 600;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-speed);
    font-family: inherit;
    box-shadow: var(--shadow-neumorphic-inset);
}

.tabesh-staff-panel .status-update-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.tabesh-staff-panel .status-update-select:hover {
    border-color: var(--accent-blue-light);
}

.tabesh-staff-panel .status-update-btn {
    padding: 16px 30px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-button);
    white-space: nowrap;
}

.tabesh-staff-panel .status-update-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.tabesh-staff-panel .status-update-btn:active:not(:disabled) {
    transform: translateY(0);
}

.tabesh-staff-panel .status-update-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tabesh-staff-panel .btn-icon {
    font-size: 18px;
}

/* ==========================================
   Loading States
   ========================================== */

.tabesh-staff-panel .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-overlay);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.2s ease-out;
}

.tabesh-staff-panel .loading-content {
    background: var(--bg-card);
    padding: 40px 50px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tabesh-staff-panel .loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--text-muted);
    border-top-color: var(--accent-blue);
    border-radius: var(--border-radius-full);
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

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

.tabesh-staff-panel .loading-text {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 700;
}

/* ==========================================
   Toast Notifications
   ========================================== */

.tabesh-staff-panel .message-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 18px 35px;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 700;
    z-index: var(--z-toast);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    animation: toastSlideDown 0.4s ease-out;
    min-width: 300px;
    text-align: center;
}

@keyframes toastSlideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.tabesh-staff-panel .message-toast.success {
    background: var(--success);
    color: white;
}

.tabesh-staff-panel .message-toast.error {
    background: var(--error);
    color: white;
}

.tabesh-staff-panel .message-toast.warning {
    background: var(--warning);
    color: white;
}

.tabesh-staff-panel .message-toast.info {
    background: var(--info);
    color: white;
}

/* ==========================================
   No Orders State
   ========================================== */

.tabesh-staff-panel .no-orders {
    text-align: center;
    padding: 100px 20px;
    animation: fadeIn 0.6s ease-out;
}

.tabesh-staff-panel .no-orders-icon {
    font-size: 100px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

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

.tabesh-staff-panel .no-orders p {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==========================================
   Load More Button
   ========================================== */

.tabesh-staff-panel .load-more-container {
    text-align: center;
    margin: 40px 0;
}

.tabesh-staff-panel .load-more-btn {
    padding: 16px 45px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-button);
}

.tabesh-staff-panel .load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.tabesh-staff-panel .load-more-btn:active {
    transform: translateY(0);
}

/* ==========================================
   Full Screen Modal
   ========================================== */

.tabesh-staff-panel .fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: var(--z-modal);
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.tabesh-staff-panel .modal-header {
    background: var(--gradient-primary);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tabesh-staff-panel .modal-title {
    font-size: 22px;
    font-weight: 700;
}

.tabesh-staff-panel .modal-close-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tabesh-staff-panel .modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.tabesh-staff-panel .modal-body {
    padding: 30px;
}

/* ==========================================
   Search Results Display
   ========================================== */

.tabesh-staff-panel .no-search-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.tabesh-staff-panel .no-search-results p {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 10px 0;
}

/* ==========================================
   Animations & Transitions
   ========================================== */

.tabesh-staff-panel .pulse {
    animation: pulse 0.5s ease-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.shake {
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 1024px) {
    .tabesh-orders-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .staff-panel-header {
        padding: 15px 20px;
    }
    
    .staff-profile-section {
        flex: 1 1 100%;
    }
    
    .header-actions {
        flex: 1 1 100%;
        justify-content: flex-end;
    }
    
    .theme-text,
    .logout-text {
        display: none;
    }
    
    .tabesh-orders-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tabesh-staff-order-card.expanded {
        grid-column: 1;
    }
    
    .order-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stepper-container {
        flex-direction: column;
        gap: 25px;
    }
    
    .stepper-container::before {
        display: none;
    }
    
    .stepper-step::before {
        display: none;
    }
    
    .status-select-wrapper {
        flex-direction: column;
    }
    
    .status-update-select,
    .status-update-btn {
        width: 100%;
    }
    
    .search-input {
        font-size: 14px;
        padding: 16px 50px 16px 16px;
    }
}

@media (max-width: 480px) {
    .search-container {
        padding: 0 15px;
    }
    
    .tabesh-panel-container {
        padding: 15px;
    }
    
    .order-card-header {
        padding: 15px;
    }
    
    .customer-section,
    .order-details-section,
    .extras-section,
    .notes-section,
    .status-stepper,
    .status-update-section {
        padding: 20px 15px;
    }
    
    .card-quick-info {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .quick-info-item {
        width: 100%;
        justify-content: flex-start;
    }
    
    .staff-avatar {
        width: 48px;
        height: 48px;
    }
    
    .staff-info h2 {
        font-size: 18px;
    }
    
    .staff-info p {
        font-size: 13px;
    }
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {
    .staff-panel-header,
    .search-container,
    .status-update-section,
    .header-actions,
    .theme-toggle-btn,
    .notification-btn,
    .logout-btn,
    .load-more-container,
    .expand-icon {
        display: none !important;
    }
    
    .tabesh-staff-order-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .tabesh-staff-order-card.expanded {
        grid-column: 1;
    }
    
    .order-card-body {
        display: block !important;
    }
}

/* ==========================================
   Accessibility
   ========================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles for Keyboard Navigation */
button:focus-visible,
select:focus-visible,
input:focus-visible,
.tabesh-staff-order-card:focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 3px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .tabesh-staff-order-card {
        border: 2px solid var(--text-primary);
    }
    
    .status-badge {
        border: 2px solid currentColor;
    }
}

/* ==========================================
   Utilities
   ========================================== */

.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden !important;
}

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

.mt-20 {
    margin-top: 20px !important;
}

.mb-20 {
    margin-bottom: 20px !important;
}

/* ==========================================
   Print Substeps Section (New Feature)
   ========================================== */

.tabesh-staff-panel .print-substeps-section {
    padding: 25px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--text-muted);
    border-radius: var(--border-radius-sm);
    margin-top: 15px;
}

.tabesh-staff-panel .print-substeps-section .section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: space-between;
}

.tabesh-staff-panel .progress-badge {
    background: var(--accent-blue);
    color: white;
    padding: 6px 14px;
    border-radius: var(--border-radius-full);
    font-size: 13px;
    font-weight: 700;
}

.tabesh-staff-panel .print-substeps-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tabesh-staff-panel .print-substep-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--text-muted);
    transition: all var(--transition-speed);
}

.tabesh-staff-panel .print-substep-item:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-card);
}

.tabesh-staff-panel .print-substep-item.completed {
    border-color: var(--success);
    background: linear-gradient(to left, var(--bg-card) 95%, rgba(16, 185, 129, 0.1) 100%);
}

.tabesh-staff-panel .substep-checkbox-wrapper {
    flex-shrink: 0;
}

.tabesh-staff-panel .substep-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--success);
}

.tabesh-staff-panel .substep-content {
    flex: 1;
}

.tabesh-staff-panel .substep-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.tabesh-staff-panel .substep-details {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.tabesh-staff-panel .substep-completed-badge {
    flex-shrink: 0;
    background: var(--success);
    color: white;
    padding: 6px 12px;
    border-radius: var(--border-radius-full);
    font-size: 13px;
    font-weight: 700;
}

/* Dark mode adjustments for print substeps */
.tabesh-staff-panel[data-theme='dark'] .print-substeps-section {
    background: var(--bg-secondary);
}

.tabesh-staff-panel[data-theme='dark'] .print-substep-item {
    border-color: var(--text-tertiary);
}

.tabesh-staff-panel[data-theme='dark'] .print-substep-item.completed {
    background: linear-gradient(to left, var(--bg-card) 95%, rgba(16, 185, 129, 0.15) 100%);
}

/* Mobile responsiveness for print substeps */
@media (max-width: 768px) {
    .tabesh-staff-panel .print-substeps-section .section-header {
        flex-wrap: wrap;
    }
    
    .tabesh-staff-panel .progress-badge {
        order: 3;
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }
    
    .tabesh-staff-panel .print-substep-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tabesh-staff-panel .substep-checkbox-wrapper {
        align-self: flex-start;
    }
    
    .tabesh-staff-panel .substep-completed-badge {
        align-self: flex-end;
        margin-top: 8px;
    }
}


