/* Restaurant owner portal */
.owner-portal-button {
  border: 0;
  background: linear-gradient(145deg, #2a2326, #14141b);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font: 700 0.82rem "Hind Siliguri", sans-serif;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(20, 20, 27, 0.22);
  transition: transform 0.2s, box-shadow 0.2s;
}

.owner-portal-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(20, 20, 27, 0.28);
}

.owner-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 100% 0%, rgba(230, 0, 35, 0.06), transparent 35%),
    #f6f7f9;
  padding: 28px 0 60px;
}

.owner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.owner-top h1 {
  margin: 3px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
}

.owner-back {
  border: 1px solid #e0e5e9;
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font: 700 0.88rem "Hind Siliguri", sans-serif;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(20, 20, 27, 0.05);
  transition: transform 0.2s, border-color 0.2s;
}

.owner-back:hover {
  border-color: #e60023;
  color: #e60023;
  transform: translateX(-2px);
}

.owner-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0;
}

.owner-stat {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e8ebef;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(20, 20, 27, 0.04);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}

.owner-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #e60023;
}

.owner-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(20, 20, 27, 0.09);
}

.owner-stat b {
  display: block;
  font: 800 1.55rem Inter, sans-serif;
  letter-spacing: -0.02em;
  color: #14141b;
}

.owner-stat span {
  display: block;
  margin-top: 4px;
  color: #706a72;
  font-size: 0.82rem;
}

.owner-tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin: 20px 0;
  padding: 4px;
  background: #eceef1;
  border-radius: 999px;
  width: max-content;
  max-width: 100%;
  scrollbar-width: none;
}

.owner-tabs::-webkit-scrollbar {
  display: none;
}

.owner-tabs button {
  white-space: nowrap;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 10px 18px;
  color: #4b4650;
  font: 700 0.9rem "Hind Siliguri", sans-serif;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}

.owner-tabs button:hover {
  color: #e60023;
}

.owner-tabs button.active {
  background: #e60023;
  color: #fff;
  box-shadow: 0 8px 18px rgba(230, 0, 35, 0.3);
}

.owner-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 20px;
}

.owner-panel {
  background: #fff;
  border: 1px solid #e8ebef;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 6px 18px rgba(20, 20, 27, 0.04);
  animation: owner-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes owner-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.owner-panel h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.owner-panel p {
  color: #706a72;
}

.owner-list {
  display: grid;
  gap: 10px;
}

.owner-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 10px;
  margin: 0 -10px;
  border-bottom: 1px solid #f0f1f3;
  border-radius: 14px;
  transition: background 0.2s;
}

.owner-row:hover {
  background: #fafbfc;
}

.owner-row:last-child {
  border-bottom: 0;
}

.owner-row > div {
  min-width: 0;
  flex: 1;
}

.owner-row b,
.owner-row small {
  display: block;
}

.owner-row small {
  color: #746f75;
  margin-top: 3px;
}

.owner-badge {
  border-radius: 999px;
  padding: 5px 11px;
  background: #fff0f2;
  color: #bf0020;
  font: 800 0.72rem Inter, sans-serif;
}

.owner-action {
  border: 1px solid #f3cdd3;
  color: #bb0020;
  background: #fff;
  border-radius: 999px;
  padding: 7px 13px;
  font: 700 0.8rem "Hind Siliguri", sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.owner-action:hover {
  background: #e60023;
  border-color: #e60023;
  color: #fff;
}

.owner-form {
  display: grid;
  gap: 14px;
}

.owner-form label {
  display: grid;
  gap: 6px;
  color: #56505a;
  font-size: 0.83rem;
  font-weight: 700;
}

.owner-form input,
.owner-form textarea,
.owner-form select {
  width: 100%;
  border: 1px solid #dfe3e8;
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: #fcfcfd;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.owner-form input:focus,
.owner-form textarea:focus,
.owner-form select:focus {
  outline: none;
  border-color: #e60023;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(230, 0, 35, 0.12);
}

.owner-form textarea {
  min-height: 90px;
  resize: vertical;
}

.owner-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.owner-empty {
  padding: 40px 16px;
  text-align: center;
  color: #706a72;
  border: 1px dashed #dde1e6;
  border-radius: 18px;
  background: #fafbfc;
}

.owner-alert {
  margin: 0 0 14px;
  padding: 13px 16px;
  border-radius: 14px;
  background: #fff7e9;
  border: 1px solid #fbe4b6;
  color: #805600;
  font-size: 0.9rem;
}

.owner-switch {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.owner-switch input {
  width: auto;
  accent-color: #e60023;
}

.owner-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .owner-stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .owner-portal-button {
    display: none;
  }
}

@media (max-width: 520px) {
  .owner-page {
    padding-top: 16px;
  }

  .owner-top {
    align-items: flex-start;
  }

  .owner-top h1 {
    font-size: 1.45rem;
  }

  .owner-form-grid {
    grid-template-columns: 1fr;
  }

  .owner-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .owner-stat {
    padding: 15px;
  }

  .owner-stat b {
    font-size: 1.25rem;
  }

  .owner-tabs {
    width: 100%;
  }
}

/* Owner order detail */
.owner-order-detail { display: grid; gap: 12px; padding: 6px 0; }
.owner-detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.owner-detail-head h2 { margin: 2px 0; }
.owner-detail-card { border: 1px solid #e7e9ed; border-radius: 14px; padding: 14px; background: #fff; }
.owner-detail-card h3 { margin: 0 0 10px; font-size: 1rem; }
.owner-detail-card h3 small { font-weight: 500; color: #746f75; }
.owner-detail-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.owner-detail-metrics div { padding: 10px; border-radius: 10px; background: #faf7f7; }
.owner-detail-metrics span, .owner-detail-metrics b { display: block; }
.owner-detail-metrics span { font-size: .72rem; color: #746f75; }
.owner-detail-metrics b { margin-top: 3px; font-size: .9rem; }
.owner-detail-row { display: flex; justify-content: space-between; gap: 18px; padding: 8px 0; border-bottom: 1px dashed #e7e9ed; font-size: .86rem; }
.owner-detail-row:last-of-type { border-bottom: 0; }
.owner-detail-row span { color: #746f75; }
.owner-detail-row b { text-align: right; overflow-wrap: anywhere; }
.owner-detail-row .strong { font-size: 1rem; color: #b9001c; }
.owner-order-items { display: grid; }
.owner-order-item { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid #eef0f2; }
.owner-order-item:last-child { border-bottom: 0; }
.owner-order-item small { margin-top: 3px; color: #746f75; }
.owner-order-item > div:last-child { text-align: right; }
.owner-order-item strong { display: block; color: #b9001c; margin-top: 3px; }
.owner-map, .owner-call { display: inline-flex; margin: 10px 8px 0 0; color: #b9001c; font-weight: 700; text-decoration: none; }
.owner-timeline { display: grid; gap: 9px; }
.owner-timeline > div { display: flex; gap: 9px; align-items: center; color: #9a969c; }
.owner-timeline i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #d9dce0; font-style: normal; font-size: .72rem; }
.owner-timeline .done { color: #176d48; }
.owner-timeline .done i { color: #fff; background: #176d48; border-color: #176d48; }
.owner-timeline .current b { color: #b9001c; }
.owner-timeline small { font-size: .7rem; color: #8b858c; }
.owner-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 520px) {
  .owner-detail-metrics { grid-template-columns: 1fr 1fr; }
  .owner-detail-row { align-items: flex-start; flex-direction: column; gap: 3px; }
  .owner-detail-row b { text-align: left; }
  .owner-order-item { font-size: .84rem; }
}
