/*
 * Dashboard and user interface styles
 */

/* Dashboard Styles */
.dashboard-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 0;
}

.dashboard-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.dashboard-title h1 {
  color: white;
  margin-bottom: 0.5rem;
}

.dashboard-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.dashboard-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.dashboard-content {
  padding: 40px 0;
}

/* Tab Navigation Styles */
.tab-navigation {
  display: flex;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 2rem;
  background: white;
  border-radius: 8px 8px 0 0;
  overflow: scroll;
}

.tab-button {
  flex: 1;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border: none;
  border-right: 1px solid #e9ecef;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: #6c757d;
  transition: all 0.3s ease;
  position: relative;
}

.tab-button:last-child {
  border-right: none;
}

.tab-button:hover {
  background: #e9ecef;
  color: #495057;
}

.tab-button.active {
  background: white;
  color: #2c3e50;
  font-weight: 600;
}

.tab-button.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: #6c757d;
}

/* Tab Content Styles */
.tab-content {
  position: relative;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-panel.active {
  display: block;
}

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

/* Update dashboard grid for tab content */
.tab-panel .dashboard-card {
  margin-bottom: 2rem;
}

.dashboard-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-card h3 {
  margin-bottom: 1.5rem;
  color: #2c3e50;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 0.5rem;
}

/* Lists */
.orders-list,
.subscriptions-list,
.deliveries-list,
.products-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-item,
.subscription-item,
.delivery-item,
.product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 10px;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-info p,
.business-info p {
  margin-bottom: 0.5rem;
}

.no-orders,
.no-subscriptions,
.no-deliveries,
.no-products {
  color: #7f8c8d;
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

/* Professional Dashboard Styles */
.subscriptions-summary {
  background: #f8f9fa;
  padding: 3rem 0;
  border-bottom: 1px solid #e9ecef;
}

.subscriptions-summary h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #2c3e50;
  font-size: 2rem;
}

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

.subscription-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #28a745;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.subscription-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.subscription-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.subscription-header h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.3rem;
}

.delivery-frequency {
  background: #e8f5e8;
  color: #28a745;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.subscription-details {
  margin-bottom: 1.5rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.detail-item .label {
  color: #6c757d;
  font-weight: 500;
}

.detail-item .value {
  color: #2c3e50;
  font-weight: 600;
}

.detail-item .value.price {
  color: #28a745;
  font-size: 1.1rem;
}

.subscription-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Products Section */
.products-section {
  padding: 4rem 0;
  background: white;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.section-header p {
  color: #6c757d;
  font-size: 1.1rem;
}

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

.product-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border-color: #28a745;
}

.product-image-container{
  width: 100%;
}

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

.product-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
}

.no-image {
  width: 100%;
  height: 200px;
  background: #f8f9fa;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #6c757d;
  border: 2px dashed #dee2e6;
}

.product-info h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.product-description {
  color: #6c757d;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.product-price .price {
  font-size: 1.8rem;
  font-weight: 700;
  color: #28a745;
}

.product-price .unit {
  color: #6c757d;
  font-size: 0.9rem;
}

.product-actions {
  margin-top: auto;
}

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

/* Account Section */
.account-section {
  background: #f8f9fa;
  padding: 3rem 0;
}

.account-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 0 auto;
}

.account-card h3 {
  color: #2c3e50;
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1.5rem;
}

.account-details {
  margin-bottom: 2rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #f8f9fa;
}

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

.detail-row .label {
  color: #6c757d;
  font-weight: 500;
  min-width: 100px;
}

.detail-row .value {
  color: #2c3e50;
  font-weight: 600;
  text-align: right;
}

.account-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Mobile responsiveness for dashboard */
@media (max-width: 768px) {
  .subscriptions-grid {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header-content {
    flex-direction: column;
    text-align: center;
  }

  .dashboard-actions {
    justify-content: center;
  }

  .subscription-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .subscription-actions {
    justify-content: center;
  }

  .account-actions {
    flex-direction: column;
  }

  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .detail-row .value {
    text-align: left;
  }
}

/* Upcoming Deliveries Section */
.upcoming-deliveries-section {
  background: #f8f9fa;
  padding: 3rem 0;
  border-top: 1px solid #e9ecef;
}

.upcoming-deliveries-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #2c3e50;
  font-size: 1.8rem;
}

.deliveries-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.delivery-item {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  border-left: 4px solid #28a745;
}

.delivery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.delivery-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.delivery-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  padding: 0.75rem;
  background: #e8f5e8;
  border-radius: 8px;
}

.delivery-date .date {
  font-size: 1.1rem;
  font-weight: 700;
  color: #28a745;
  line-height: 1.2;
}

.delivery-date .day {
  font-size: 0.9rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.delivery-details h4 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1.1rem;
  font-weight: 600;
}

.delivery-details p {
  margin: 0;
  color: #6c757d;
  font-size: 0.95rem;
}

/* Grouped delivery styles */
.delivery-items {
  margin: 0.5rem 0;
}

.delivery-item-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

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

.delivery-item-detail .product-name {
  font-weight: 500;
  color: #2c3e50;
  flex: 1;
}

.delivery-item-detail .quantity {
  color: #6c757d;
  margin: 0 1rem;
}

.delivery-item-detail .price {
  color: #28a745;
  font-weight: 600;
  min-width: 60px;
  text-align: right;
}

.delivery-total {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 2px solid #e9ecef;
  color: #2c3e50;
  font-size: 1rem;
}

.skip-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skip-actions .skip-form {
  margin: 0;
}

.skip-actions .btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
}

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

.skip-form {
  margin: 0;
}

.skip-disabled-container {
  position: relative;
  display: inline-block;
}

.skip-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #6c757d !important;
  border-color: #6c757d !important;
}

/* Allow clicks on mobile devices */
@media (hover: none) and (pointer: coarse) {
  .skip-disabled {
    pointer-events: auto;
    cursor: pointer;
  }
}

/* Disable clicks on desktop */
@media (hover: hover) and (pointer: fine) {
  .skip-disabled {
    pointer-events: none;
  }
}

.skip-disabled:hover {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  transform: none !important;
}

.skip-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  text-align: center;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
  white-space: nowrap;
  max-width: 350px;
  min-width: 300px;
  white-space: normal;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s, visibility 0.3s;
}

.skip-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.skip-disabled-container:hover .skip-tooltip {
  visibility: visible;
  opacity: 1;
}

.no-deliveries {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
  font-style: italic;
}

/* Delivery Calendar Section */
.delivery-calendar-section {
  background: white;
  padding: 4rem 0;
  border-top: 1px solid #e9ecef;
}

.delivery-calendar-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #2c3e50;
  font-size: 2rem;
}

.calendar-container {
  max-width: 1000px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

/* FullCalendar Custom Styling */
.fc {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

.fc-toolbar {
  margin-bottom: 2rem;
}

.fc-toolbar-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
}

.fc-button {
  background: #28a745;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.fc-button:hover {
  background: #218838;
  transform: translateY(-1px);
}

.fc-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.fc-button-primary:not(:disabled):active {
  background: #1e7e34;
}

.fc-button-primary:not(:disabled).fc-button-active {
  background: #1e7e34;
}

.fc-daygrid-day {
  border-color: #e9ecef;
}

.fc-daygrid-day-number {
  color: #2c3e50;
  font-weight: 500;
}

.fc-day-today {
  background-color: #f8f9fa;
}

.fc-day-today .fc-daygrid-day-number {
  color: #28a745;
  font-weight: 700;
}

/* Delivery Event Styling */
.delivery-event {
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 2px 6px;
  margin: 1px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.delivery-event:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.fc-event-title {
  font-weight: 600;
  color: white;
}

/* Subscription Color Classes */
.subscription-1 .fc-event {
  background-color: #28a745;
  border-color: #28a745;
}

.subscription-2 .fc-event {
  background-color: #007bff;
  border-color: #007bff;
}

.subscription-3 .fc-event {
  background-color: #6f42c1;
  border-color: #6f42c1;
}

.subscription-4 .fc-event {
  background-color: #fd7e14;
  border-color: #fd7e14;
}

.subscription-5 .fc-event {
  background-color: #20c997;
  border-color: #20c997;
}

.subscription-6 .fc-event {
  background-color: #e83e8c;
  border-color: #e83e8c;
}

/* Milk Ordering Card Styles */
.milk-ordering-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-left: 4px solid #6c757d;
}

.milk-ordering-card h3 {
  color: #2c3e50;
  border-bottom: 2px solid #e9ecef;
}

.ordering-day-section {
  margin-bottom: 2rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.ordering-day-section h4 {
  color: #495057;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.product-orders {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-order-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.no-image {
  width: 100%;
  height: 200px;
  background: #e9ecef;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.product-details {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95rem;
}

.product-quantity {
  color: #6c757d;
  font-weight: 500;
  font-size: 0.9rem;
}

.no-orders {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.ordering-summary {
  margin-top: 1.5rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.summary-label {
  color: #6c757d;
  font-weight: 500;
}

.summary-quantity {
  color: #2c3e50;
  font-weight: 600;
}

.summary-total {
  text-align: center;
  padding-top: 0.75rem;
  border-top: 1px solid #e9ecef;
  margin-top: 0.75rem;
  color: #2c3e50;
  font-size: 1.1rem;
}

/* Service Card Styles */
.service-card {
  border-left: 4px solid #007bff;
}

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

.delivery-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.delivery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #007bff;
}

.delivery-info {
  flex: 1;
}

.customer-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.delivery-address {
  color: #6c757d;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.delivery-phone {
  color: #007bff;
  font-size: 0.9rem;
  font-weight: 500;
}

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

.product-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95rem;
}

.quantity {
  color: #6c757d;
  font-size: 0.9rem;
  background: #e9ecef;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.no-deliveries {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 8px;
}

/* Analytics Card Styles */
.analytics-card {
  border-left: 4px solid #6c757d;
}

.analytics-graph {
  margin-top: 1rem;
}

.graph-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.graph-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.graph-bar {
  height: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.graph-fill {
  height: 100%;
  background: #6c757d;
  border-radius: 10px;
  transition: width 0.8s ease;
  position: relative;
}

.graph-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.product-name {
  font-weight: 600;
  color: #2c3e50;
}

.product-count {
  color: #6c757d;
  font-weight: 500;
}

.no-data {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 2rem;
}

/* Mobile responsiveness for calendar */
@media (max-width: 768px) {
  .delivery-calendar-section {
    padding: 2rem 0;
  }

  .calendar-container {
    padding: 1rem;
    margin: 0 1rem;
  }

  .fc-toolbar {
    flex-direction: column;
    gap: 1rem;
  }

  .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
  }

  .fc-button {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  .delivery-event {
    font-size: 0.75rem;
    padding: 1px 4px;
  }

  .delivery-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .delivery-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
  }

  .delivery-date {
    min-width: auto;
    padding: 0.5rem 1rem;
    align-items: start;
  }

  .delivery-actions {
    width: 100%;
    justify-content: center;
  }

  /* Mobile styles for new components */
  .product-order-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .product-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
  }

  .product-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
  }

  .graph-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .tab-button {
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
  }

  .tab-button:last-child {
    border-bottom: none;
  }

  .tab-button.active::after {
    display: none;
  }

  /* Mobile styles for service tab */
  .delivery-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .delivery-details {
    text-align: left;
    width: 100%;
  }

  .product-info {
    justify-content: space-between;
    align-items: center;
  }
}

/* Bungalow Grid Styles */
.bungalow-grid-card {
  margin-bottom: 2rem;
}

.bungalow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.bungalow-item {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.bungalow-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bungalow-item.has-order {
  background: #d4edda;
  border-color: #28a745;
}

.bungalow-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.bungalow-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.has-order {
  background-color: #28a745;
}

.status-indicator.no-order {
  background-color: #6c757d;
}

.status-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.bungalow-item.has-order .status-text {
  color: #28a745;
}

.bungalow-item .status-text {
  color: #6c757d;
}

.order-details {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #dee2e6;
  font-size: 0.8rem;
}

.order-details .customer-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.25rem;
}

.order-details .product-info {
  color: #6c757d;
}

/* No orders message styling */
.no-orders-message {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
  font-style: italic;
}

.no-orders-message p {
  margin: 0;
  font-size: 1.1rem;
}

/* Mobile responsiveness for bungalow grid */
@media (max-width: 768px) {
  .bungalow-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }
  
  .bungalow-item {
    padding: 0.75rem;
  }
  
  .bungalow-number {
    font-size: 1.25rem;
  }
  
  .order-details {
    font-size: 0.75rem;
  }
}

/* Bungalow Click Functionality */
.clickable-bungalow {
  cursor: pointer;
  transition: all 0.3s ease;
}

.clickable-bungalow:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Bungalow Status Styles */
.bungalow-item.completed {
  border-left: 4px solid #28a745;
  background: linear-gradient(135deg, #d4edda 0%, #f8f9fa 100%);
}

.bungalow-item.partial {
  border-left: 4px solid #ffc107;
  background: linear-gradient(135deg, #fff3cd 0%, #f8f9fa 100%);
}

.bungalow-item.not-served {
  border-left: 4px solid #dc3545;
  background: linear-gradient(135deg, #f8d7da 0%, #f8f9fa 100%);
}

.bungalow-item.pending {
  border-left: 4px solid #6c757d;
  background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
}

.status-indicator.partial {
  background: #ffc107;
}

.status-indicator.not-served {
  background: #dc3545;
}

.status-indicator.pending {
  background: #6c757d;
}

/* Modal Styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background-color: white;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
}

.modal-header {
  padding: 20px 30px;
  color: white;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.close {
  color: black;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.close:hover {
  opacity: 0.7;
}

.modal-body {
  padding: 30px;
}

/* Bungalow Orders Styles */
.bungalow-orders {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  background: #f8f9fa;
}

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

.order-header h4 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.25rem;
}

.order-status {
  display: flex;
  gap: 10px;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.status-badge.served {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* New Modal Styles for Product Rows */
.customer-info {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #007bff;
}

.customer-info h4 {
  margin: 0 0 5px 0;
  color: #2c3e50;
  font-size: 1.2rem;
}

.customer-info p {
  margin: 0;
  color: #6c757d;
  font-size: 0.95rem;
}

.products-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-row {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.product-info h5 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 1.1rem;
  font-weight: 600;
}

.product-info p {
  margin: 0;
  color: #6c757d;
  font-size: 0.9rem;
}

.delivery-controls {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.delivery-controls label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 5px;
  display: block;
}

.quantity-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.quantity-btn {
  width: 45px;
  height: 45px;
  border: 2px solid #ced4da;
  background: white;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  border-color: #007bff;
  background: #f8f9fa;
  transform: translateY(-1px);
}

.quantity-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

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

.auto-status-display {
  margin-top: 15px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #6c757d;
}

.status-indicator {
  font-weight: 600;
  font-size: 0.95rem;
}

.status-indicator.completed {
  color: #28a745;
}

.status-indicator.partial {
  color: #ffc107;
}

.status-indicator.unavailable {
  color: #dc3545;
}

.status-options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.status-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
  margin-bottom: 0;
}

.status-radio {
  margin: 0;
  transform: scale(1.1);
}

.status-radio:checked + span {
  color: #007bff;
  font-weight: 600;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
  display: flex;
  justify-content: flex-end;
}

.modal-footer .btn {
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
}

.status-badge.unavailable {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-badge.pending {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.btn-served {
  padding: 8px 16px;
  border: 2px solid #28a745;
  background: white;
  color: #28a745;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
}


.btn-unavailable {
  padding: 8px 16px;
  border: 2px solid #dc3545;
  background: white;
  color: #dc3545;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
}

.btn-served.active {
  background: #28a745;
  border-color: #28a745;
  color: white;
}

.btn-unavailable {
  border-color: #ffc107;
  color: #856404;
}

.btn-unavailable.active {
  background: #ffc107;
  border-color: #ffc107;
  color: white;
}

.btn-served:hover, .btn-unavailable:hover {
  opacity: 0.8;
}

.btn-served:disabled, .btn-unavailable:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.order-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.order-details p {
  margin: 5px 0;
  color: #495057;
}

.quantity-controls {
  grid-column: 1 / -1;
  margin-top: 10px;
}

.quantity-controls label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #2c3e50;
}

.quantity-controls input {
  width: 100px;
  padding: 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

.notes-section {
  grid-column: 1 / -1;
  margin-top: 15px;
}

.notes-section label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #2c3e50;
}

.notes-section textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
}

/* Mobile responsiveness for modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10px;
  }
  
  .modal-header {
    padding: 15px 20px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .order-details {
    grid-template-columns: 1fr;
  }
  
  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Wallet Styles */
.wallet-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wallet-balance {
  text-align: center;
  padding: 20px;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  color: white;
}

.balance-amount {
  font-size: 2.5rem;
  font-weight: bold;
  display: block;
  margin-bottom: 10px;
}

.balance-description {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0;
}

.wallet-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.wallet-actions .btn {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* Mobile wallet styles */
@media (max-width: 768px) {
  .wallet-balance {
    padding: 15px;
  }
  
  .balance-amount {
    font-size: 2rem;
  }
}

/* Bungalow Search Styles */
.bungalow-search-container {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  background-color: white;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  color: #6c757d;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.clear-search-btn:hover {
  background-color: #f8f9fa;
  color: #495057;
}

.search-results-info {
  margin-top: 8px;
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

/* Mobile search styles */
@media (max-width: 768px) {
  .bungalow-search-container {
    padding: 12px;
    margin-bottom: 15px;
  }
  
  .search-input {
    padding: 10px 35px 10px 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .clear-search-btn {
    right: 10px;
    font-size: 16px;
  }
}

/* Modal Product Image Styles */
.product-image-container {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-container .no-image {
  font-size: 24px;
  color: #6c757d;
}

.product-info {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 15px;
}

.product-details h5 {
  margin: 0 0 5px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.product-details p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

/* Mobile styles for modal product images */
@media (max-width: 768px) {
  .product-image-container {
    width: 50px;
    height: 50px;
  }
  
  .product-image-container .no-image {
    font-size: 20px;
  }
  
  .product-info {
    gap: 12px;
  }
  
  .product-details h5 {
    font-size: 1rem;
  }
}

/* Order History Styles */
.order-history-section {
  max-width: 100%;
}


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

.order-history-info {
  background: #e7f3ff;
  border: 1px solid #b8daff;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 30px;
}

.order-history-info p {
  margin: 0 0 10px 0;
  color: #004085;
  font-size: 0.9rem;
}

.oldest-order-info {
  font-style: italic;
  opacity: 0.8;
}

.load-more-container.text-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.date-group {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.date-group-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e9ecef;
}

.date-group-title h3 {
  margin: 0 0 5px 0;
  color: #495057;
  font-size: 1.2rem;
  font-weight: 600;
}

.day-name {
  color: #6c757d;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.date-group-summary {
  display: flex;
  gap: 20px;
  align-items: center;
}

.total-quantity {
  color: #495057;
  font-weight: 600;
  font-size: 0.95rem;
}

.total-price {
  color: #28a745;
  font-weight: 700;
  font-size: 1.1rem;
}

.orders-in-group {
  padding: 0;
}

.order-item {
  background: #fafbfc;
  border: none;
  border-radius: 0;
  padding: 20px;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #e9ecef;
}

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

.order-item:hover {
  background-color: #f8f9fa;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
}

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

.order-date .date {
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
}

.order-date .day {
  font-size: 0.85rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  min-width: 120px;
}

.order-status.completed {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.order-status.partial {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.order-status.unavailable {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.order-status.pending {
  background-color: #e2e3e5;
  color: #383d41;
  border: 1px solid #d6d8db;
}

.order-status.delivering {
  background-color: #cce7ff;
  color: #004085;
  border: 1px solid #a6d5fa;
}

.order-details {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.order-product {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  flex: 1;
}

.product-thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.no-image-small {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.product-info h4 {
  margin: 0 0 8px 0;
  color: #495057;
  font-size: 1.1rem;
}

.quantity-info {
  display: flex;
  gap: 15px;
  font-size: 0.9rem;
  color: #6c757d;
  flex-wrap: wrap;
}

.order-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  min-width: 150px;
}

.order-total {
  display: flex;
  gap: 8px;
  align-items: center;
}

.order-total .label {
  font-weight: 600;
  color: #495057;
}

.order-total .value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #28a745;
}

.order-notes {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  color: #6c757d;
}

.order-notes .label {
  font-weight: 600;
}


.no-orders {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.no-orders-icon {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-orders h3 {
  color: #495057;
  margin-bottom: 10px;
}

.no-orders p {
  color: #6c757d;
  margin-bottom: 20px;
}

/* Mobile responsive styles for order history */
@media (max-width: 768px) {
  .date-group-header {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .date-group-summary {
    justify-content: space-between;
  }

  .order-details {
    flex-direction: column;
    align-items: stretch;
  }

  .order-summary {
    align-items: flex-start;
    min-width: auto;
  }

  .order-header {
    flex-direction: column;
    align-items: stretch;
  }

  .quantity-info {
    flex-direction: column;
    gap: 5px;
  }

  .date-group-title h3 {
    font-size: 1.1rem;
  }

  .total-price {
    font-size: 1rem;
  }
}

