/* =========================================
   1. GENERAL LAYOUT & RESET (PHARMACY BLUE THEME)
   ========================================= */
.phar-container, .phar-track-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 30px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    color: #444;
    line-height: 1.6;
    direction: rtl;
    border-top: 5px solid #3498db; /* نوار آبی بالای باکس */
}

.phar-container { padding: 40px; }
.phar-track-card { padding: 0; margin-top: 20px; }

/* انیمیشن تعویض مراحل */
.lab-step { display: none; animation: pharFadeUp 0.5s ease-out; }
.lab-step.active { display: block; }

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

/* =========================================
   2. FORM ELEMENTS
   ========================================= */
.phar-input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 2px solid #eaeff2;
    border-radius: 10px;
    background: #fdfdfd;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: #333;
}

.phar-input:focus {
    border-color: #3498db;
    background: #fff;
    outline: none;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.1);
}

.phar-input.half { width: 48%; display: inline-block; }
.row-lab { display: flex; justify-content: space-between; gap: 15px; flex-wrap: wrap; }

/* استایل Select Box با آیکون آبی */
select.phar-input {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233498db' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px;
    padding-left: 35px;
}

/* تیترهای بخش‌ها */
.lab-section-title {
    font-size: 15px; font-weight: 700; color: #2c3e50;
    margin: 30px 0 15px 0; padding-bottom: 10px;
    border-bottom: 1px solid #eee; display: flex; align-items: center;
}
.lab-section-title::before {
    content: ''; display: inline-block; width: 5px; height: 20px;
    background: #3498db; border-radius: 10px; margin-left: 10px;
}

/* رادیو باتن‌ها */
.lab-radio-group {
    display: flex; gap: 20px; flex-wrap: wrap;
    background: #f0f9ff; padding: 20px; border-radius: 12px;
    border: 1px dashed #3498db; margin-bottom: 25px;
}
.lab-radio-group label { cursor: pointer; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; margin-left: 15px; }

/* =========================================
   3. BUTTONS & CARDS
   ========================================= */
.lab-btn {
    padding: 12px 35px; border: none; border-radius: 8px;
    cursor: pointer; font-size: 15px; font-weight: 600;
    transition: all 0.3s ease; color: #fff;
    background: #7f8c8d; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}

/* دکمه اصلی (آبی) */
.lab-btn.primary, .button-primary.button-hero { 
    background: linear-gradient(135deg, #3498db, #2980b9); 
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    border: none; color: #fff;
}
.lab-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4); }

/* دکمه موفقیت/پرداخت (تیره‌تر یا همان تم آبی) */
.lab-btn.success { 
    background: linear-gradient(135deg, #3497da, #0272b1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3); 
}

.lab-btn.small { padding: 8px 20px; font-size: 13px; border-radius: 6px; }
.lab-btn:disabled { opacity: 0.6; cursor: not-allowed; filter: grayscale(1); }

/* کارت‌های انتخاب (نسخه دارم / ندارم) */
.lab-cards-row { display: flex; gap: 20px; margin-top: 20px; }
.lab-card-btn {
    flex: 1; padding: 35px 20px; text-align: center;
    border: 2px solid #f0f2f5; border-radius: 16px; cursor: pointer;
    transition: all 0.3s ease; font-weight: 700; color: #555; background: #fff;
}
.lab-card-btn:hover {
    border-color: #3498db; background: #f0f9ff; color: #3498db;
    transform: translateY(-5px); box-shadow: 0 10px 30px rgba(52, 152, 219, 0.15);
}
.lab-card-btn span { display: block; font-size: 12px; font-weight: normal; margin-top: 10px; color: #888; }
.lab-card-btn i { font-size: 45px; margin-bottom: 15px; color: #ccc; transition: 0.3s; display: block; }
.lab-card-btn:hover i { color: #3498db; transform: scale(1.1); }

/* =========================================
   4. UPLOAD AREA (Multi-File)
   ========================================= */
.lab-upload-area {
    border: 2px dashed #bdc3c7; background: #f9f9f9;
    padding: 30px; border-radius: 12px; text-align: center;
    cursor: pointer; transition: 0.3s; position: relative;
}
.lab-upload-area:hover { border-color: #3498db; background: #f0f9ff; }
.lab-upload-area input[type=file] {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer;
}

/* =========================================
   5. TRACKING PAGE & INVOICE
   ========================================= */
.lab-track-header { padding: 35px; color: #fff; text-align: center; background: linear-gradient(135deg, #3498db, #2980b9); }
.lab-track-header h2 { margin: 0 0 10px 0; color: #fff; font-size: 24px; }
.lab-track-body { padding: 30px; }

/* استپ‌ها */
.lab-status-steps { display: flex; justify-content: space-between; margin-bottom: 40px; position: relative; }
.lab-status-steps::before {
    content: ''; position: absolute; top: 20px; left: 15px; right: 15px;
    height: 3px; background: #e0e0e0; z-index: 1;
}
.step-item { position: relative; z-index: 2; text-align: center; flex: 1; }
.step-icon {
    width: 40px; height: 40px; background: #fff; border: 3px solid #ccc;
    border-radius: 50%; margin: 0 auto 10px; display: flex;
    align-items: center; justify-content: center; color: #ccc;
}
.step-item.active .step-icon {
    border-color: #3498db; background: #3498db; color: #fff;
    box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.15);
}
.step-text { font-size: 12px; font-weight: bold; color: #aaa; }
.step-item.active .step-text { color: #3498db; }

/* جدول فاکتور (Invoice) */
.phar-invoice-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    margin: 20px 0; border: 1px solid #eee; border-radius: 8px; overflow: hidden;
}
.phar-invoice-table th { background: #f8f9fa; padding: 12px 15px; text-align: right; color: #555; border-bottom: 2px solid #e9ecef; font-weight: bold; }
.phar-invoice-table td { padding: 12px 15px; border-bottom: 1px solid #eee; color: #333; }
.phar-invoice-table tr:last-child td { border-bottom: none; }
.phar-invoice-table tr:hover td { background: #fcfcfc; }

.phar-invoice-total {
    background: #eaf6fc; color: #2980b9; padding: 20px;
    border-radius: 12px; text-align: center; font-size: 20px; font-weight: 800;
    border: 2px solid #3498db; margin-top: 20px;
}

/* باکس‌های توضیحات (Usage / Delivery) */
.phar-note-box {
    background: #fff; border: 1px solid #eee; padding: 20px;
    border-radius: 10px; margin: 15px 0; font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* =========================================
   6. ADMIN PANEL MODAL & ELEMENTS
   ========================================= */
.lab-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); z-index: 9999;
    display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(3px);
}
.lab-modal {
    background: #fff; width: 95%; max-width: 900px;
    border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    display: flex; flex-direction: column; max-height: 95vh;
}
.lab-modal-header {
    padding: 15px 25px; border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
    background: #f1f1f1; border-radius: 10px 10px 0 0;
}
.lab-modal-body { padding: 25px; overflow-y: auto; }
.lab-close-modal { font-size: 30px; cursor: pointer; color: #aaa; background:none; border:none; line-height: 1; }
.lab-close-modal:hover { color: #e74c3c; }

/* جدول لیست سفارشات ادمین */
.table-view-list th { font-weight: 800; color: #333; }
.badge { padding: 4px 8px; border-radius: 4px; color: #fff; font-size: 11px; font-weight: bold; }

/* =========================================
   7. SHARED LIGHTBOX
   ========================================= */
.lab-lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 100000;
    display: none; justify-content: center; align-items: center; cursor: zoom-out;
}
.lab-lightbox img { max-width: 95%; max-height: 95%; border-radius: 5px; box-shadow: 0 0 20px rgba(0,0,0,0.5); }

/* =========================================
   8. RESPONSIVE (MOBILE)
   ========================================= */
@media (max-width: 600px) {
    .phar-container { padding: 25px 15px; margin: 15px auto; }
    .lab-cards-row { flex-direction: column; gap: 15px; }
    .row-lab { flex-direction: column; gap: 0; }
    .phar-input.half { width: 100%; margin-bottom: 15px; }
    
    .lab-track-header { padding: 25px; }
    .lab-track-header h2 { font-size: 20px; }
    
    /* استپ‌ها در موبایل کوچکتر شوند */
    .step-text { display: none; }
    .step-icon { width: 35px; height: 35px; font-size: 14px; }
    .lab-status-steps::before { top: 18px; }
    
    .phar-invoice-total { font-size: 16px; padding: 15px; }
}