/* =========================================================
   OWNER MOBILE DASHBOARD - THEME: ROSE WINDOW AURA GRADIENT
   ========================================================= */

/* Rose Window - Aura Base */
body.owner-body {
  background-color: #faf8f2;
  color: #1e1114;
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 40px;
}

:root {
  --owner-bg: #faf8f2;
  --owner-card: rgba(255, 255, 255, 0.82);
  --owner-card-subtle: rgba(255, 255, 255, 0.65);
  --owner-amber: #e11d48;
  --owner-green: #059669;
  --owner-blue: #2563eb;
  --owner-text: #1e1114;
  --owner-muted: #886a70;
  --owner-border: rgba(225, 29, 72, 0.12);
  --owner-shadow: 0 8px 24px rgba(225, 29, 72, 0.06);
}

/* Aura Background Layers */
.aura-bg {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.aura-layer-1 {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,228,230,0.9) 0%, rgba(254,205,211,0.5) 50%, rgba(252,165,165,0.3) 100%);
  mix-blend-mode: normal;
  transform: translateZ(0);
  will-change: transform;
  pointer-events: none;
}

.aura-layer-2 {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 35% 40%, rgba(244,63,94,0.4) 0%, transparent 35%);
  mix-blend-mode: multiply;
  filter: blur(138px);
  transform: translateZ(0);
  will-change: transform;
  pointer-events: none;
}

.aura-layer-3 {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 65% 55%, rgba(251,146,60,0.35) 0%, transparent 30%);
  mix-blend-mode: multiply;
  filter: blur(125px);
  transform: translateZ(0);
  will-change: transform;
  pointer-events: none;
}

.aura-layer-4 {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.3) 100%);
  mix-blend-mode: multiply;
  filter: blur(38px);
  transform: translateZ(0);
  will-change: transform;
  pointer-events: none;
}

@media (min-width: 768px) {
  .aura-layer-2 { filter: blur(198px); }
  .aura-layer-3 { filter: blur(180px); }
  .aura-layer-4 { filter: blur(54px); }
}

.owner-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

/* 1. PIN Lock Screen */
.pin-lock-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 248, 242, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pin-lock-overlay.hidden {
  display: none;
}

.pin-header {
  text-align: center;
  margin-bottom: 32px;
}

.pin-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.pin-logo-img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.15);
  border: 2px solid rgba(225, 29, 72, 0.2);
}

.pin-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--owner-text);
}

.pin-subtitle {
  font-size: 13px;
  color: var(--owner-muted);
  margin-top: 4px;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(225, 29, 72, 0.15);
  border: 1.5px solid rgba(225, 29, 72, 0.3);
  transition: all 0.2s ease;
}

.pin-dot.filled {
  background: var(--owner-amber);
  border-color: var(--owner-amber);
  transform: scale(1.15);
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 280px;
}

.key-btn {
  height: 56px;
  font-size: 20px;
  font-weight: 700;
  border-radius: 16px;
  border: 1px solid rgba(225, 29, 72, 0.1);
  background: rgba(255, 255, 255, 0.9);
  color: var(--owner-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}

.key-btn:active {
  transform: scale(0.94);
  background: rgba(225, 29, 72, 0.1);
}

/* 2. Main Dashboard Layout */
.owner-header,
.owner-appbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.owner-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.owner-brand-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.1);
  border: 1.5px solid rgba(225, 29, 72, 0.2);
}

.owner-brand-icon {
  font-size: 28px;
}

.owner-brand-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--owner-text);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--owner-green);
  background: rgba(5, 150, 105, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(5, 150, 105, 0.3);
}

.live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--owner-green);
  animation: pulse-dot 1.5s infinite;
}

/* Date Selector / Filter */
.date-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.date-tab {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--owner-border);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--owner-muted);
  cursor: pointer;
  white-space: nowrap;
}

.date-tab.active {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #ffffff;
  font-weight: 700;
  border-color: #e11d48;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

/* KPI Hero Cards */
.hero-stats-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 241, 242, 0.8) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(225, 29, 72, 0.25);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(225, 29, 72, 0.08);
  position: relative;
  overflow: hidden;
}

.hero-stats-card::after {
  content: "☕";
  position: absolute;
  right: -10px;
  bottom: -20px;
  font-size: 100px;
  opacity: 0.06;
}

.hero-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--owner-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-revenue {
  font-size: 38px;
  font-weight: 800;
  color: var(--owner-amber);
  margin: 6px 0 12px;
}

.hero-substats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  border-top: 1px solid var(--owner-border);
  padding-top: 12px;
}

.substat-item {
  display: flex;
  flex-direction: column;
}

.substat-label {
  font-size: 11px;
  color: var(--owner-muted);
  font-weight: 600;
}

.substat-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--owner-text);
  margin-top: 2px;
}

/* Payment Method Breakdown */
.section-card {
  background: var(--owner-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--owner-border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--owner-shadow);
}

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

.section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--owner-text);
}

.payment-progress-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(225, 29, 72, 0.08);
  margin-bottom: 12px;
}

.bar-segment.cash {
  background: #059669;
}

.bar-segment.promptpay {
  background: #2563eb;
}

.payment-legend {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.cash { background: #059669; }
.legend-dot.promptpay { background: #2563eb; }

/* Top 5 Best Sellers */
.top-sellers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-seller-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.seller-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seller-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(225, 29, 72, 0.1);
  color: var(--owner-amber);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seller-name {
  font-size: 14px;
  font-weight: 700;
}

.seller-stat {
  text-align: right;
}

.seller-cups {
  font-size: 14px;
  font-weight: 800;
  color: var(--owner-amber);
}

.seller-rev {
  font-size: 11px;
  color: var(--owner-muted);
  font-weight: 500;
}

/* Live Order Stream */
.order-stream-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stream-order-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--owner-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s;
}

.stream-order-card:active {
  transform: scale(0.98);
}

.order-meta-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.order-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--owner-text);
}

.order-time {
  font-size: 12px;
  color: var(--owner-muted);
}

.order-items-summary {
  font-size: 12px;
  color: var(--owner-muted);
}

.order-amount-right {
  text-align: right;
}

.order-total-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--owner-amber);
}

.order-pay-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
}

.order-pay-tag.cash {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
}

.order-pay-tag.promptpay {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

/* Action Buttons */
.owner-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.owner-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-family: 'Prompt', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.owner-btn-export {
  background: rgba(255, 255, 255, 0.85);
  color: var(--owner-text);
  border: 1px solid var(--owner-border);
}

.owner-btn-refresh {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.25);
}
