﻿/* Team / ongoing orders page */
.ongoing-page {
  padding: 18px 18px 26px;
  background:
    radial-gradient(circle at top left, rgba(243, 220, 255, 0.85), transparent 24%),
    radial-gradient(circle at top right, rgba(245, 214, 230, 0.8), transparent 30%),
    linear-gradient(180deg, #f6f0fb 0%, #fbf7ff 100%);
  min-height: calc(100vh - 86px);
}

.ongoing-shell {
  max-width: 1040px;
  margin: 0 auto;
}

.ongoing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px 16px;
  margin: 0 0 14px;
  background: #fff;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 12px 30px rgba(69, 26, 108, 0.08);
}

.ongoing-topbar__title {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-style: normal;
  font-size: clamp(22px, 1.9vw, 29px);
  color: #221536;
  font-weight: 700;
  letter-spacing: -0.25px;
}

.ongoing-topbar__search {
  min-width: 280px;
  width: min(470px, 100%);
}

.ongoing-search__input {
  margin-top: 0 !important;
}

.ongoing-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 0 12px;
}

.ongoing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 77, 130, 0.12);
  color: #ff5b8d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.ongoing-title {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-size: clamp(34px, 3vw, 48px);
  line-height: 0.96;
  color: #221536;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.ongoing-title {
  display: none;
}

.ongoing-hero__row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 16px;
  width: 100%;
}

.ongoing-subtitle {
  margin: 0;
  max-width: 840px;
  color: rgba(40, 21, 63, 0.70);
  font-size: 15px;
  line-height: 1.75;
}

.ongoing-primary-btn {
  height: 58px;
  border-radius: 999px !important;
  padding: 0 26px !important;
  text-transform: none !important;
  font-weight: 700 !important;
  color: #fff !important;
  background: linear-gradient(180deg, #5b2da8 0%, #3e1268 100%) !important;
  background-color: #3e1268 !important;
  border: 0 !important;
  box-shadow: 0 4px 7.1px 0 rgba(255, 255, 255, 0.50) inset !important;
}

.ongoing-primary-btn :is(.mud-button-label, .mud-icon-root) {
  color: #fff !important;
}

.ongoing-primary-btn.mud-button-root,
.ongoing-primary-btn.mud-button-root:hover,
.ongoing-primary-btn.mud-button-root:focus,
.ongoing-primary-btn.mud-button-root:active {
  color: #fff !important;
  background: linear-gradient(180deg, #5b2da8 0%, #3e1268 100%) !important;
  background-color: #3e1268 !important;
}

.ongoing-primary-btn.mud-button-root:hover {
  background: linear-gradient(180deg, #6a20af 0%, #4f1b87 100%) !important;
  background-color: #4f1b87 !important;
}

.ongoing-table {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(122, 90, 172, 0.08);
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(75, 31, 108, 0.10);
  overflow: hidden;
}

.ongoing-card {
  margin: 0;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 30px;
  padding: 0;
  box-shadow: 0 18px 42px rgba(75, 31, 108, 0.10);
  overflow: hidden;
}

.ongoing-table :is(thead th) {
  background: #fbf7ff;
  color: rgba(40, 21, 63, 0.62);
  font-size: 11px;
  letter-spacing: 1.45px;
  text-transform: uppercase;
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  padding: 14px 22px 14px;
}

.ongoing-table :is(tbody td) {
  padding: 20px 22px;
  font-family: "DM Sans", sans-serif;
  color: #28153f;
  border-bottom-color: rgba(122, 90, 172, 0.10);
}

.ongoing-table tbody tr:hover {
  background: rgba(246, 238, 255, 0.72);
}

.ongoing-order-no {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.ongoing-status {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(131, 97, 200, 0.12);
  color: #5a2ca0;
  font-size: 12px;
  font-weight: 800;
  font-family: "DM Sans", sans-serif;
}

.ongoing-status--new {
  background: rgba(255, 90, 127, 0.14);
  color: #ff5a7f;
}

.ongoing-status--progress {
  background: rgba(124, 73, 215, 0.14);
  color: #5b2da8;
}

.ongoing-status--dispatch {
  background: rgba(30, 144, 255, 0.14);
  color: #1e90ff;
}

.ongoing-status--modify {
  background: rgba(255, 159, 67, 0.16);
  color: #d97a00;
}

.ongoing-status--cancelled {
  background: rgba(255, 91, 91, 0.14);
  color: #e63b3b;
}

.ongoing-status--confirmed {
  background: rgba(44, 195, 107, 0.16);
  color: #1ea95a;
}

.ongoing-customer {
  font-weight: 700;
  color: #1f1630;
}

.ongoing-date,
.ongoing-type {
  display: block;
  margin-top: 4px;
  color: rgba(40, 21, 63, 0.62);
  font-size: 12px;
  font-family: "DM Sans", sans-serif;
}

.ongoing-guests {
  text-align: center;
  font-weight: 600;
}

.ongoing-amount {
  font-weight: 800;
}

.ongoing-empty,
.ongoing-loading {
  padding: 18px 22px;
  color: rgba(40, 21, 63, 0.70);
}

.ongoing-table :is(tbody tr) {
  height: 70px;
}

.ongoing-table :is(tbody td strong, tbody td .ongoing-customer) {
  font-size: 18px;
}

.ongoing-table :is(tbody td .ongoing-order-no) {
  font-size: 16px;
}

.ongoing-table :is(tbody td) strong {
  font-weight: 700;
}

@media (max-width: 1100px) {
  .ongoing-page {
    padding: 18px 14px 24px;
  }

  .ongoing-topbar,
  .ongoing-hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .ongoing-card {
    margin: 0 18px;
  }

  .ongoing-hero__row {
    flex-direction: column;
  }

}

@media (max-width: 760px) {
  .ongoing-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .ongoing-topbar__search {
    width: 100%;
  }
}

/* ============================================================
   Order View & Assign modals  (.ov-* / .oa-*)
   Loaded when /order/ongoing is active; applies to dialogs too
   ============================================================ */

.ov-dialog-title {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #2a1541;
}

.ov-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 2px 8px;
  font-family: 'DM Sans', system-ui, sans-serif;
}

/* Section card */
.ov-section {
  border: 1px solid rgba(122, 90, 172, 0.14);
  border-radius: 16px;
  overflow: hidden;
}

.ov-section__head {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: rgba(122, 90, 172, 0.06);
  border-bottom: 1px solid rgba(122, 90, 172, 0.10);
}

.ov-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: #3E1268;
  color: #fff;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: 'DM Sans', system-ui, sans-serif;
}

/* 4-column info grid */
.ov-grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.ov-col {
  padding: 16px 18px;
  border-right: 1px solid rgba(122, 90, 172, 0.10);
}

.ov-col:last-child { border-right: none; }

.ov-col__val {
  font-size: 14px;
  font-weight: 600;
  color: #2a1541;
  margin-bottom: 4px;
}

.ov-col__val--purple { color: #3E1268; }

.ov-col__sub {
  font-size: 12px;
  color: rgba(40, 21, 63, 0.62);
  line-height: 1.65;
}

.ov-balance-pill {
  display: inline-block;
  background: rgba(62, 18, 104, 0.12);
  color: #3E1268;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
}

/* Menu section */
.ov-menu-title {
  text-align: center;
  font-weight: 700;
  color: #3E1268;
  padding: 12px 0 4px;
  font-size: 14px;
}

.ov-menu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.ov-menu-table th {
  text-align: left;
  padding: 9px 16px;
  background: rgba(122, 90, 172, 0.06);
  color: rgba(40, 21, 63, 0.62);
  font-weight: 600;
  font-size: 12px;
  border-bottom: 1px solid rgba(122, 90, 172, 0.10);
}

.ov-menu-table td {
  padding: 9px 16px;
  border-bottom: 1px solid rgba(122, 90, 172, 0.07);
  color: #2a1541;
}

.ov-menu-table tr:last-child td { border-bottom: none; }

.ov-num { text-align: right !important; padding-right: 20px !important; }

.ov-course-head {
  padding: 8px 16px !important;
  background: rgba(122, 90, 172, 0.06) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #3E1268 !important;
  border-bottom: 1px solid rgba(122, 90, 172, 0.10) !important;
}

.ov-summary-sub td { background: rgba(122, 90, 172, 0.04); }
.ov-summary-total td { background: rgba(62, 18, 104, 0.08); }

/* Payment row */
.ov-payment-row {
  display: flex;
  gap: 48px;
  padding: 20px 24px;
}

.ov-payment-label {
  font-size: 12px;
  color: rgba(40, 21, 63, 0.62);
  margin-bottom: 2px;
}

.ov-payment-val {
  font-size: 28px;
  font-weight: 700;
  color: #2a1541;
}

.ov-payment-val--balance { color: #3E1268; }

/* Close button */
.ov-close-btn {
  border-radius: 40px !important;
  border: 1px solid rgba(122, 90, 172, 0.30) !important;
  color: #3E1268 !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-weight: 600 !important;
  padding: 0 28px !important;
  height: 42px !important;
}

/* ---- Assign extras ---- */
.oa-find-row {
  display: flex;
  justify-content: flex-end;
  padding: 8px 0 4px;
}

.oa-find-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 40px !important;
  padding: 0 20px !important;
  border-radius: 40px !important;
  background: #3E1268 !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
  text-transform: none !important;
  border: none !important;
}

.oa-find-btn:hover { background: #5A1E96 !important; }

.oa-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(122, 90, 172, 0.10);
}

.oa-card:last-child { border-bottom: none; }

.oa-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #3D1A5E, #7B4B9E);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.oa-thumb--initials {
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(135deg, #5A1E96, #B985E9);
}

.oa-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.oa-info b { font-weight: 700; color: #2a1541; font-size: 15px; }
.oa-info small { font-size: 12px; color: rgba(40, 21, 63, 0.62); }

.oa-dist-badge,
.oa-branch-badge {
  min-width: 88px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #3D1A5E;
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.15;
  flex-shrink: 0;
}

.oa-dist-badge small,
.oa-branch-badge small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
}

.oa-branch-badge { font-size: 13px; min-width: 120px; }

.oa-choose {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(40, 21, 63, 0.70);
  cursor: pointer;
  white-space: nowrap;
}

.oa-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.oa-assign-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  height: 50px !important;
  padding: 0 32px !important;
  border-radius: 40px !important;
  background: #3E1268 !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
  box-shadow: 0 4px 16px rgba(62, 18, 104, 0.28) !important;
  text-transform: none !important;
}

.oa-assign-btn:hover { background: #5A1E96 !important; }

.oa-error {
  color: #E03030;
  font-size: 12px;
  margin: 4px 0 0;
}

@media (max-width: 760px) {
  .ov-grid4 { grid-template-columns: 1fr 1fr; }
  .ov-col { border-bottom: 1px solid rgba(122, 90, 172, 0.10); }
  .oa-time-grid { grid-template-columns: 1fr; }
}

/* ── Order row action widget ──────────────────────────────────── */

.ora-trigger-btn .mud-icon-button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: rgba(40, 21, 63, 0.55);
  transition: background 0.15s, color 0.15s;
}
.ora-trigger-btn .mud-icon-button:hover {
  background: rgba(122, 90, 172, 0.08);
  color: #5a2ca0;
}

/* MudMenu popup card overrides */
.mud-popover-paper {
  border-radius: 18px !important;
  padding: 6px !important;
  min-width: 170px !important;
  box-shadow: 0 8px 32px rgba(62, 18, 104, 0.13), 0 2px 8px rgba(62, 18, 104, 0.07) !important;
  border: 1px solid rgba(122, 90, 172, 0.10) !important;
}

/* MudMenuItem rows */
.mud-menu-item {
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: rgba(40, 21, 63, 0.80) !important;
  gap: 10px !important;
  transition: background 0.15s, color 0.15s !important;
}
.mud-menu-item:hover {
  background: rgba(122, 90, 172, 0.07) !important;
  color: #5a2ca0 !important;
}

/* Assign order green accent */
.mud-list-item.ora-assign-item,
.ora-assign-item .mud-menu-item {
  color: #1ea95a !important;
}
.ora-assign-item:hover,
.ora-assign-item .mud-menu-item:hover {
  background: rgba(14, 181, 89, 0.08) !important;
  color: #1ea95a !important;
}
