<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<style>
  :root { 
    --primary: #2563eb; 
    --primary-hover: #1d4ed8; 
    --success: #16a34a; 
    --danger: #dc2626; 
    --warning: #f59e0b;
    --dark: #1e293b;
    --light-bg: #f8fafc; 
  }
  
  html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  }

  body { 
    padding: 8px; 
    box-sizing: border-box;
  }
  
  .container { 
    max-width: 1000px; 
    margin: auto; 
    background: white; 
    padding: 12px; 
    border-radius: 12px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    width: 100%;
    box-sizing: border-box;
  }
  
  /* --- লগইন কার্ড --- */
  .login-card { 
    max-width: 360px; 
    margin: 40px auto; 
    padding: 24px 18px; 
    background: #ffffff; 
    border-radius: 14px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.08); 
    text-align: center;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
  }
  
  .login-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--dark);
  }

  .login-card input { 
    width: 100%; 
    padding: 10px 12px; 
    margin: 6px 0; 
    border: 1px solid #cbd5e1; 
    border-radius: 8px; 
    box-sizing: border-box;
    font-size: 14px;
  }

  /* স্পিনার স্টাইল */
  .btn-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 6px;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  /* --- হেডার প্যানেল --- */
  .header-panel { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 2px solid #e2e8f0; 
    margin-bottom: 10px; 
    padding-bottom: 8px; 
    flex-wrap: wrap;
    gap: 8px;
  }

  .brand-title {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .brand-title h3 {
    margin: 0;
    font-size: 16px;
    color: var(--dark);
  }

  .user-badge {
    background: #eff6ff;
    color: var(--primary);
    font-weight: 600;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid #bfdbfe;
  }

  .user-controls {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  /* --- ট্যাব বাটন --- */
  .tab-container {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }

/* সাধারণ ট্যাবের স্টাইল */
.btn-tab {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-tab:hover {
  background-color: #e2e8f0;
}

/* সাবমিট এবং অন্যান্য মেইন বাটনগুলোর টেক্সট কালার সাদা ও দৃশ্যমান রাখার জন্য */
.btn-submit-all, .btn-submit {
  background-color: #16a34a !important;
  color: #ffffff !important;
  font-weight: bold !important;
  border: none !important;
}

.btn-submit-all:hover, .btn-submit:hover {
  background-color: #15803d !important;
}

.btn-tab.active {
  background-color: #2563eb !important;
  color: #ffffff !important;
  font-weight: bold !important;
  border-color: #2563eb !important;
}

  /* --- কার্ড ও রো লেআউট --- */
  .entry-row { 
    display: flex; 
    flex-wrap: wrap; 
    align-items: flex-start; 
    gap: 8px; 
    padding: 10px 12px; 
    margin-bottom: 10px; 
    background: var(--light-bg); 
    border: 1px solid #e2e8f0; 
    border-radius: 10px; 
    position: relative; 
    box-sizing: border-box;
  }

  .row-top-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 4px;
    border-bottom: 1px dashed #cbd5e1;
    margin-bottom: 6px;
  }

  .row-title {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
  }

  .row-actions {
    display: flex;
    gap: 6px;
  }

  .field-group { 
    flex: 1 1 180px; 
    min-width: 0; 
  }

  label { font-size: 12px; font-weight: 600; color: #334155; display: block; margin-bottom: 3px; }
  input, select { 
    width: 100%; 
    padding: 6px 10px; 
    border: 1px solid #cbd5e1; 
    border-radius: 6px; 
    font-size: 13px; 
    height: 36px; 
    box-sizing: border-box; 
    background: white;
  }

  /* বারকোড স্ক্যানার ইনপুট ও বাটন */
  .barcode-input-wrapper {
    display: flex;
    gap: 4px;
  }

  .barcode-input-wrapper input {
    flex: 1;
  }

  .btn-scan {
    background: #0284c7;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0 10px;
    height: 36px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }

  .btn-scan:active {
    background: #0369a1;
  }

  /* Select2 Styling Fix */
  .select2-container { width: 100% !important; }
  .select2-container--default .select2-selection--single { height: 36px !important; border: 1px solid #cbd5e1 !important; border-radius: 6px !important; }
  .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 34px !important; font-size: 13px !important; padding-left: 10px !important; color: #0f172a !important; }
  .select2-container--default .select2-selection--single .select2-selection__arrow { height: 34px !important; }

  /* --- বাটন কাস্টমাইজেশন --- */
  .btn { 
    padding: 6px 12px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 600; 
    transition: 0.2s; 
    font-size: 12px; 
  }

  .btn-pass { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
  .btn-logout { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
  
  .btn-clear { background: #e2e8f0; color: #334155; padding: 4px 8px; font-size: 11px; }
  .btn-remove { background: #fee2e2; color: var(--danger); padding: 4px 8px; font-size: 11px; border: 1px solid #fecaca; }

  .action-bar {
    margin-top: 6px;
  }

  .btn-add {
    background: #dcfce7;
    color: var(--success);
    border: 1px solid #bbf7d0;
    padding: 8px 14px;
    font-size: 13px;
    width: 100%;
    border-radius: 8px;
  }

  .btn-submit { background: var(--primary); color: white; width: 100%; font-size: 14px; padding: 10px; }
  .btn-submit-all { 
    display: none; 
    background: var(--success); 
    color: white; 
    width: 100%; 
    font-size: 15px; 
    padding: 12px; 
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.25);
  }
  
  .info-text { font-size: 11px; color: var(--primary); margin-top: 3px; font-weight: 600; display: block; line-height: 1.2; min-height: 14px; }
  .error-text { color: var(--danger) !important; }
  .searching-mode { color: var(--warning) !important; font-style: italic; }

  /* মোডাল স্টাইল */
  .modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); padding: 12px; box-sizing: border-box; }
  .modal-content { background: white; width: 100%; max-width: 350px; margin: 20% auto; padding: 16px; border-radius: 12px; text-align: center; box-sizing: border-box; }

  /* মোবাইল রেসপন্সিভ ইমপ্রুভমেন্টস */
  @media (max-width: 768px) {
    body { padding: 4px; }
    .container { padding: 8px; }
    .entry-row { padding: 8px; gap: 6px; }
    .field-group { flex: 1 1 100%; }
    input, select { height: 34px; font-size: 12px; }
    .select2-container--default .select2-selection--single { height: 34px !important; }
    .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 32px !important; font-size: 12px !important; }
    .select2-container--default .select2-selection--single .select2-selection__arrow { height: 32px !important; }
  }
</style>