/* Application-specific styles extracted from index.html */
.center {
  text-align: center;
  margin: 0 auto;
}
.subtitle { color: #666; margin-bottom: 12px; }
.danger { color: #d32f2f; margin-top: 8px; }
.hidden { display: none; }
.logo { width: 250px; height: auto; display:block; margin: 8px auto; }
.page-content { padding: 24px; }

/* Centered form for login page */
.center-forms {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
}
.center-forms ons-input {
  width: 100%;
  max-width: 360px;
  margin: 6px 0;
}

/* Dashboard user photo */
.user-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 8px auto 12px auto;
}

/* utility text color class used for logout */
.text-danger { color: #d32f2f; }

/* Form field spacing used by profile form */
.form-field { margin-top: 8px; width: 100%; }
.profile-title { margin-top: 6px; margin-bottom: 12px; }
.field-error { text-align: center; margin-bottom: 8px; }

/* Profile form layout: left-aligned labels and full-width inputs */
.form-row { width: 100%; text-align: left; }
#profilePage label { display: block; text-align: left; font-weight: 600; margin-bottom: 4px; }
#profilePage .form-field ons-input,
#profilePage .form-field input,
#profilePage ons-input { width: 100%; max-width: 100%; box-sizing: border-box; }

/* Remove horizontal dividers between profile form list items */
#profilePage ons-list-item,
#profilePage .list__item { border-bottom: none !important; box-shadow: none !important; }

/* Remove top border that may appear on the first list item */
#profilePage ons-list-item:first-child,
#profilePage .list__item:first-child { border-top: none !important; }

/* Ensure the list container itself doesn't show a border */
#profilePage ons-list, #profilePage .list { border-top: none !important; box-shadow: none !important; }

/* Order parameters modal select styling */
#routeSelect, #shopSelect {
  color: white !important;
}
#routeSelect select, #shopSelect select {
  color: white !important;
}
#routeSelect option, #shopSelect option {
  color: black !important; /* Options should be black for readability */
}

/* Product list styling for New Orders page */
#newOrdersPage .list-item__title {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

#newOrdersPage .list-item__subtitle {
  font-size: 14px;
  color: #666;
  display: block;
}

#newOrdersPage .list-item__subtitle ons-icon {
  margin-right: 4px;
}

#newOrdersPage ons-list-item .right {
  font-weight: 300;
  color: #2196f3;
}

/* Search input styling for New Orders page */
#newOrdersPage ons-search-input {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: block;
}

#newOrdersPage ons-search-input input {
  width: 100%;
  padding: 12px 16px 12px 46px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  background-color: #fff;
}

#newOrdersPage ons-search-input input:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.icon-warning {
  color: #d32f2f;
}

/* Notification badge for FI indicator */
.notification {
  display: inline-block;
  background-color: #ff9800;
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  vertical-align: middle;
}

/* Product list styling for Order Details page */
#orderDetailsPage .list-item__title {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

#orderDetailsPage .list-item__subtitle {
  font-size: 14px;
  color: #666;
  display: block;
}
#orderDetailsPage .list-item__subtitle ons-icon {
  margin-right: 4px;
}
#newOrdersPage ons-list-item .right {
  font-weight: 300;
  color: #2196f3;
}
/* Sales report styles */
.sales-total-box {
  padding: 12px;
  margin-bottom: 10px;
  margin-top: 10px;
  border: 1px solid #e0e0e0;
  background-color: #ffffff;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.sales-due {
  color: #8a0303; /* dark red */
  font-weight: 600;
}

.sale-value {
  color: #0b3d91; /* dark blue */
  font-weight: 700;
}

.text-end {
  text-align: right;
}

.fw-bold {
  font-weight: 700;
}

.text-primary {
  color: #0b3d91; /* dark blue */
}

.text-danger {
  color: #8a0303; /* dark red */
}

/* Customers page styles */
.customer-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.customer-card-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 12px;
  background:#fafafa;
  border-bottom:1px solid #f0f0f0;
}
.customer-card-title { font-weight:700; font-size:15px; }
.customer-card-actions ons-toolbar-button { background:transparent; border:none; }
.customer-card-body { padding:12px; font-size:14px; color:#444; }
.customer-card-body div { margin-bottom:6px; }
.customer-card .text-end { text-align:right; }

/* make modal form fields sit nicely */
#customerModal input[readonly], #customerModal textarea[readonly] { background-color:#f5f5f5; }
#customerModal input, #customerModal textarea { border:1px solid #eee; border-radius:4px; }


/* Debtor report styles */
.debtor-report {
  padding: 10px;
}
.debtor-customer-card {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.debtor-customer-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  background:#fafafa;
  border-bottom:1px solid #f0f0f0;
}
.debtor-customer-name { font-weight:700; font-size:16px; }
.debtor-customer-contact { color:#666; font-size:13px; }
.debtor-invoice-table { width:100%; border-collapse: collapse; font-size:10px; }
.debtor-invoice-table th, .debtor-invoice-table td { padding:4px 5px; border:1px solid #f0f0f0; text-align:left; }
.debtor-invoice-table th { background:#f7f7f7; font-weight:600; }
.debtor-invoice-table td.text-end { text-align:right; }
.debtor-report-total { margin-top:12px; padding:12px; border-radius:6px; background:#fff9e6; border:1px solid #ffe8b3; text-align:right; font-weight:700; }
.debtor-report-total .debtor-report-total-amount { color:#8a0303; font-weight:800; font-size:16px; margin-left:8px; }

/* Dashboard tiles: make buttons equal width & height */
.dashboard-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 120px; /* consistent height for tiles */
  box-sizing: border-box;
  padding: 12px;
  text-align: center;
  white-space: normal;
}

/* Make the icon slightly larger and spaced from the label */
.dashboard-tile ons-icon {
  font-size: 28px; /* ensure consistent icon size */
  line-height: 1;
  margin-bottom: 6px;
}

.dashboard-tile > div {
  font-size: 14px;
  margin-top: 6px;
  word-break: break-word;
}

/* Ensure tiles remain visually consistent on small screens */
@media (max-width: 480px) {
  .dashboard-tile { height: 100px; padding: 10px; }
  .dashboard-tile ons-icon { font-size: 24px; }
}
