/* =========================================================
   owner2.css — Vista Dueño v2 (ATM / Touch-First)
   One order at a time, massive buttons, extreme readability
   ========================================================= */

/* ── Shell ────────────────────────────────────────────────── */
.atm-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
}

/* ── Top bar ──────────────────────────────────────────────── */
.atm-topbar {
  height: 72px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--separator);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  flex-shrink: 0;
}

.atm-brand { display: flex; align-items: center; gap: 12px; }

.atm-logo {
  width: 40px;
  height: 40px;
  background: var(--blue);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.atm-logo svg { width: 22px; height: 22px; }

.atm-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--label);
}

.atm-topbar-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.atm-greeting {
  font-size: 17px;
  font-weight: 600;
  color: var(--label-secondary);
  letter-spacing: -0.01em;
}

.atm-topbar-right { display: flex; align-items: center; gap: 18px; }

.atm-clock {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--label);
}

.atm-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--fill-tertiary);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--label-secondary);
  min-height: 44px;
  transition: background var(--dur);
}
.atm-back:hover { background: var(--fill-secondary); color: var(--label); }

/* ── KPI Strip ────────────────────────────────────────────── */
.kpi-strip {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--separator);
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 0;
  height: 70px;
  flex-shrink: 0;
}

.kpi-strip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
  border-right: 1px solid var(--separator);
}
.kpi-strip-item:first-child { padding-left: 0; }
.kpi-strip-item:last-child  { border-right: none; }

.kpi-strip-icon {
  font-size: 22px;
  width: 36px;
  text-align: center;
}

.kpi-strip-text { display: flex; flex-direction: column; }
.kpi-strip-value { font-size: 20px; font-weight: 800; letter-spacing: -0.025em; color: var(--label); line-height: 1; }
.kpi-strip-label { font-size: 11px; font-weight: 500; color: var(--label-tertiary); margin-top: 2px; }

.kpi-strip-spacer { flex: 1; }

/* Alert in strip */
.kpi-strip-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--orange-tinted);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
  color: #b35900;
}

/* ── Main ATM area ────────────────────────────────────────── */
.atm-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 48px 24px;
  gap: 20px;
  width: 100%;
}

/* ── Mode tabs ────────────────────────────────────────────── */
.mode-tabs {
  display: flex;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 5px;
  gap: 4px;
  box-shadow: var(--shadow-1);
  width: 100%;
}

.mode-tab {
  flex: 1;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--label-secondary);
  cursor: pointer;
  transition: background var(--dur), color var(--dur);
  letter-spacing: -0.01em;
  min-height: 58px;
}
.mode-tab.active {
  background: #8E8E93;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.mode-tab:not(.active):hover { background: var(--fill-tertiary); color: var(--label); }

/* ── Approvals View ───────────────────────────────────────── */
#view-approvals, #view-metrics, #view-history { width: 100%; }

/* ── Order counter ────────────────────────────────────────── */
.order-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.counter-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--label-secondary);
  letter-spacing: -0.01em;
}

.counter-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.counter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--separator-opaque);
  transition: background var(--dur), transform var(--dur);
}
.counter-dot.active {
  background: var(--blue);
  transform: scale(1.3);
}

/* ── No pending ───────────────────────────────────────────── */
.no-pending {
  width: 100%;
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-1);
  padding: 80px 40px;
  text-align: center;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.no-pending.visible { display: flex; }
.no-pending-icon { font-size: 60px; }
.no-pending-title { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; color: var(--label); }
.no-pending-sub   { font-size: 17px; color: var(--label-secondary); }

/* ── Big order card ───────────────────────────────────────── */
.order-big-card {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2);
  width: 100%;
  overflow: hidden;
  animation: fadeInUp 0.3s var(--ease-out) both;
}

.order-big-header {
  padding: 28px 36px 24px;
  border-bottom: 1px solid var(--separator);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.order-big-id {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--label-tertiary);
  margin-bottom: 8px;
}

.order-big-type {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--label);
  line-height: 1.15;
}

/* ── Order details grid ───────────────────────────────────── */
.order-big-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--separator);
}

.order-big-detail {
  padding: 24px 36px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--separator);
}
.order-big-detail:last-child { border-right: none; }

.detail-big-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--label-quaternary);
}

.detail-big-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--label);
  line-height: 1.1;
}

.detail-big-sub {
  font-size: 14px;
  color: var(--label-secondary);
  font-weight: 500;
}

/* ── Action zone — ATM-style ──────────────────────────────── */
.action-zone {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.atm-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 130px;
  border: none;
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: -0.02em;
  transition: filter var(--dur-fast), transform var(--dur-fast);
  user-select: none;
}
.atm-btn:active { transform: scale(0.98); filter: brightness(0.95); }

.atm-btn-icon {
  font-size: 34px;
  line-height: 1;
}

.atm-approve {
  background: #FAFAFA;
  color: #166534;
  border-right: 1px solid var(--separator);
  border-radius: 0 0 0 var(--radius-2xl);
}
.atm-approve:hover { background: rgba(22,101,52,0.06); }

.atm-reject {
  background: #FAFAFA;
  color: #991B1B;
  border-left: 1px solid var(--separator);
  border-radius: 0 0 var(--radius-2xl) 0;
}
.atm-reject:hover { background: rgba(153,27,27,0.06); }

/* ── Navigation (previous / next) ────────────────────────── */
.order-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--bg-primary);
  border: 1px solid var(--separator);
  border-radius: var(--radius-xl);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--label-secondary);
  cursor: pointer;
  transition: background var(--dur), color var(--dur), box-shadow var(--dur);
  box-shadow: var(--shadow-1);
  min-height: 52px;
}
.nav-btn:hover:not(:disabled) { background: var(--fill-tertiary); color: var(--label); box-shadow: var(--shadow-2); }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.nav-btn-icon { font-size: 20px; }

/* ── Metrics view ─────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  width: 100%;
}

.metric-big-card {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-1);
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-big-icon { font-size: 28px; margin-bottom: 4px; }

.metric-big-value {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--label);
}

.metric-big-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--label-secondary);
  letter-spacing: -0.01em;
}

.metric-big-sub {
  font-size: 14px;
  color: var(--label-tertiary);
}

.metric-progress { margin-top: 8px; }
.metric-progress .progress-track { height: 8px; }

/* ── History in ATM mode ──────────────────────────────────── */
.atm-history {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-1);
  width: 100%;
  overflow: hidden;
}

.atm-history-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--separator);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.history-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 20px;
  align-items: center;
  padding: 22px 32px;
  border-bottom: 1px solid var(--separator);
  transition: background var(--dur-fast);
  min-height: 72px;
}
.history-row:last-child { border-bottom: none; }
.history-row:hover { background: var(--fill-tertiary); }

.history-row-id    { font-size: 14px; font-weight: 700; color: var(--label-tertiary); letter-spacing: 0.03em; min-width: 72px; }
.history-row-tipo  { font-size: 18px; font-weight: 700; color: var(--label); }
.history-row-meta  { font-size: 15px; color: var(--label-secondary); margin-top: 3px; }
.history-row-fecha { font-size: 14px; color: var(--label-tertiary); min-width: 90px; text-align: right; }
