body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#page-content {
  flex: 1;
  overflow-y: auto;
  padding: 1px;
}

.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: bold;
}

.hidden {
  display: none;
}

.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #1e293b;
  color: white;
  padding: 0.5rem 0;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
}

.bottom-nav button {
  background: none;
  border: none;
  color: white;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bottom-nav button.active {
  color: #38bdf8;
}

.bottom-nav span {
  font-size: 0.75rem;
}

.list-item {
  background: white;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


/* -------- Role Selection Page -------- */
body.role-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  font-family: 'Inter', system-ui, sans-serif;
  color: white;
}

.role-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2.5rem 3rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  text-align: center;
  width: 90%;
  max-width: 400px;
  animation: fadeIn 0.8s ease-in-out;
}

.role-container h1 {
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
  letter-spacing: 0.5px;
}

.role-container p {
  color: #e0f2fe;
  margin-bottom: 1.5rem;
}

.role-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.role-buttons button {
  background: white;
  color: #1e3a8a;
  border: none;
  border-radius: 12px;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.role-buttons button:hover {
  background: #f0f9ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.role-buttons button:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notif-btn {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  border-radius: 9999px;
  padding: 2px 6px;
  font-weight: bold;
  display: none;
}

.toast {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}



.location-section {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#orderItems,
#orderInstructions,
#manualLat,
#manualLng,
select {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#submitOrder {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  width: 100%;
}

#submitOrder:disabled {
  background: #ccc;
}

button#useCurrentLoc {
  background: #28a745;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}



.orders-container {
  padding-top: 10px;
  padding-left: 6px;
  padding-right: 6px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid #eee;
}

.tab-btn {
  padding: 8px 16px;
  border: none;
  background: none;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: #007bff;
  border-bottom: 2px solid #007bff;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 12px;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status {
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: capitalize;
}

.status.created {
  background: #e3f2fd;
  color: #0d47a1;
}

.status.bid {
  background: #e8f5e9;
  color: #2e7d32;
}

.status.cancelled {
  background: #ffebee;
  color: #c62828;
}

.status.fulfilled {
  background: #f3e5f5;
  color: #6a1b9a;
}


.fab {
  position: fixed;
  bottom: 80px;
  /* adjust if you have bottom nav */
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #007bff;
  color: #fff;
  font-size: 28px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  z-index: 1000;
}

.fab:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}



/* === GENERAL LAYOUT === */
.order-create-container {
  max-width: 700px;
  margin: 2rem auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  font-family: "Inter", system-ui, sans-serif;
  color: #333;
  transition: all 0.3s ease;
}

.order-create-container h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #222;
}

.order-create-container h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: #444;
}

/* === BUTTONS === */
button {
  cursor: pointer;
  border: none;
  outline: none;
  border-radius: 8px;
  transition: background 0.25s ease, transform 0.1s ease;
}

button:hover {
  transform: scale(1.02);
}

.back-btn {
  background: none;
  border: none;
  color: #0077ff;
  /* font-size: 1rem; */
  /* margin-bottom: 1rem; */
  cursor: pointer;
}

.add-btn {
  background: #0077ff;
  color: white;
  padding: 8px 14px;
  font-size: 0.9rem;
  margin-top: 0.6rem;
}

.next-btn,
#submitOrder {
  background: #0077ff;
  color: #fff;
  font-weight: 500;
  padding: 10px 16px;
  margin-top: 1rem;
}

.next-btn:hover,
#submitOrder:hover {
  background: #005edc;
}

/* === FORM ELEMENTS === */
label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fafafa;
  box-sizing: border-box;
}

textarea {
  min-height: 60px;
}

/* === MEDICINE LIST === */
#medicineList {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.medicine-item {
  background: #f8f9fa;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.medicine-item input[type="text"] {
  flex: 2;
}

.medicine-item input[type="number"] {
  width: 80px;
}

.medicine-item label {
  flex: 1;
  font-size: 0.9rem;
}

.remove-med {
  background: #ff4d4d;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
}

.remove-med:hover {
  background: #e33;
}

/* === MAP & LOCATION === */
.location-section {
  margin-top: 1rem;
}


#useCurrentLoc {
  background: #10b981;
  color: #fff;
  padding: 6px 12px;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

#useCurrentLoc:hover {
  background: #0d946e;
}

/* === PROGRESS BAR === */
.progress {
  width: 100%;
  background: #eee;
  border-radius: 6px;
  margin-bottom: 1.2rem;
  overflow: hidden;
}

.progress-bar {
  height: 8px;
  background: #0077ff;
  width: 50%;
  transition: width 0.4s ease;
}

/* === DISABLED STATE === */
#submitOrder:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  color: #666;
}
 .dlex{
  display: flex;
 }

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .order-create-container {
    padding-top : 4px;
    padding-left: 2px;
    padding-right: 2px;
    padding-bottom: 1px;
  }

  .medicine-item {
    flex-direction: column;
    align-items: stretch;
  }

  .next-btn,
  #submitOrder {
    width: 100%;
  }
}

#addOrderBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0077ff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 1.8rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.25s;
}

#addOrderBtn:hover {
  background: #005edc;
  transform: scale(1.08);
}

/* Sticky footer for add + next buttons */
.sticky-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  padding: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  z-index: 10;
}

/* Upload section styling */
.upload-section {
  background: #f8f9fa;
  border: 1px dashed #ccc;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.upload-section input[type="file"] {
  margin-top: 0.5rem;
}

.upload-status {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: #0077ff;
  word-break: break-all;
}

.upload-status.error {
  color: #e02424;
}

.pharmacy-orders {
  padding: 16px;
  font-family: 'Inter', sans-serif;
  color: #222;
}

.pharmacy-orders h2 {
  text-align: center;
  margin-bottom: 16px;
  font-size: 1.4rem;
  color: #333;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.order-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.order-number {
  font-weight: 600;
  color: #2a4d9b;
}

.distance {
  font-size: 0.9rem;
  background: #eef3ff;
  padding: 4px 8px;
  border-radius: 8px;
}

.order-body p {
  margin: 4px 0;
  font-size: 0.9rem;
}

.bid-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  font-weight: 600;
  border: none;
  background: #2a4d9b;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.bid-btn:hover {
  background: #1c3770;
}

.error {
  color: #d9534f;
  text-align: center;
}

.empty {
  color: #888;
  text-align: center;
}

.pharmacy-orders {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.order-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.order-card:hover {
  transform: scale(1.02);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.distance {
  background: #2a4d9b;
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.order-address {
  font-size: 0.9rem;
  color: #444;
  margin: 4px 0 10px 0;
}

.bid-btn {
  width: 100%;
  background: #2a4d9b;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.bid-btn:hover {
  background: #1c3572;
}

.eta-info {
  display: flex;
  gap: 10px;
  margin: 5px 0;
}

.eta-badge {
  background: #e0f7fa;
  color: #00796b;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9em;
}

.distance-badge {
  background: #e8eaf6;
  color: #3f51b5;
}

.order-bid-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
  background: #fdfdfd;
}

.bid-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
  background: #f9f9ff;
}

.bid-actions {
  margin-top: 8px;
}

.bid-actions button {
  margin-right: 8px;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.accept-bid-btn {
  background-color: #4CAF50;
  color: white;
}

.reject-bid-btn {
  background-color: #F44336;
  color: white;
}

.order-create-container,
.step-container {
  position: relative;
  /* width: 100%; */
}

.location-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

#pincodeInput {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#pincodeSearchBtn,
#useMyLocationBtn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

#pincodeSearchBtn:hover,
#useMyLocationBtn:hover {
  background-color: #0056b3;
}

#map {
  width: 100%;
  height: 60vh;
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 768px) {
  #map {
    height: 50vh;
  }
}


.bids-page {
  padding: 16px;
  font-family: 'Inter', sans-serif;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  background: #f3f4f6;
  transition: background 0.2s;
}

.tab-btn.active {
  background: #3b82f6;
  color: white;
}

.bid-card {
  border: 1px solid #e5e7eb;
  border-left: 5px solid #3b82f6;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.bid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 4px;
}

.bid-details p {
  margin: 4px 0;
  font-size: 14px;
}

.bid-actions {
  margin-top: 8px;
  display: flex;
  gap: 10px;
}

.action-btn {
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.action-btn.accept {
  background: #10b981;
  color: #fff;
}

.action-btn.reject {
  background: #ef4444;
  color: #fff;
}

.action-btn.ship {
  background: #f59e0b;
  color: #fff;
}

.shipments-page {
  padding-top: 10px;
  padding-left: 6px;
  padding-right: 6px;
}

.shipment-card {
  border: 1px solid #e5e7eb;
  border-left: 5px solid #22c55e;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.shipment-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 4px;
}

.shipment-details p {
  margin: 4px 0;
  font-size: 14px;
}

.shipment-actions {
  margin-top: 8px;
  display: flex;
  gap: 10px;
}

.action-btn.update {
  background: #3b82f6;
  color: white;
}

.action-btn.view {
  background: #10b981;
  color: white;
}

.share-modal {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -30%);
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
  text-align: center;
  z-index: 1000;
  width: 90%;
  max-width: 400px;
}

.share-modal textarea {
  width: 100%;
  height: 70px;
  margin: 10px 0;
}

.whatsapp-btn {
  display: inline-block;
  background: #25D366;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  margin-top: 10px;
  text-decoration: none;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.form-group {
  margin-top: 10px;
}

button {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  cursor: pointer;
}

button:hover {
  background: #0056b3;
}

.modal {
  max-width: 95%;
  width: 420px;
  margin: 1rem auto;
  border-radius: 12px;
}

input, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

@media (max-width: 480px) {
  input, select, button {
    font-size: 0.9rem;
  }
}

.fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: background 0.3s;
}

.fab:hover {
  background: #1d4ed8;
}


/* @media (prefers-color-scheme: dark) {
  body { background: #0f172a; color: #f1f5f9; }
  .card { background: #1e293b; }
  button { background: #3b82f6; }
} */

html, body {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
h2{
  font-weight: bold;
  display: block;
  font-size: 16px;
}

#page-content{
  padding: 4px;
}