/* GADGET MITRA - Pickup Mitra Field Agent App Stylesheet */
@import url('./shared/styles/tokens.css');
@import url('./shared/styles/brand.css');

body {
  background-color: #0F172A;
  /* High contrast dark surface for outdoor mobile use */
  color: #F8FAFC;
  min-height: 100vh;
  padding-bottom: 5rem;
}

.agent-app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: #1E293B;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  position: relative;
}

/* Agent App Header */
.agent-header {
  background-color: #0F172A;
  padding: max(12px, env(safe-area-inset-top, 12px)) 1rem 12px;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.agent-profile-snippet {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.agent-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gm-orange);
  color: #FFF;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 2px solid #FFF;
  flex-shrink: 0;
}

.agent-info-text {
  min-width: 0;
}

.agent-name-heading {
  font-weight: 800;
  font-size: 0.95rem;
  color: #FFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-sub-info {
  font-size: 0.72rem;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.agent-sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 999px;
  color: #10B981;
  font-size: 0.7rem;
  font-weight: 700;
}

.duty-switch-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #334155;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.duty-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gm-status-success);
}

/* Sub-Bar for Identity & Hub Links */
.agent-sub-bar {
  padding: 0.65rem 1rem;
  background: #0B1120;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #1E293B;
  font-size: 0.75rem;
}

.identity-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sub-label {
  color: #94A3B8;
  font-weight: 600;
}

.agent-selector {
  background: #1E293B;
  color: #FFF;
  border: 1px solid #475569;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  outline: none;
  cursor: pointer;
}

.hub-links-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hub-link {
  font-weight: 600;
  text-decoration: none;
  font-size: 0.75rem;
}

.link-cust {
  color: var(--gm-orange);
}

.link-admin {
  color: #38BDF8;
}

.hub-divider {
  color: #475569;
}

/* Shift Summary Banner */
.shift-banner {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  padding: 1.25rem;
  border-bottom: 1px solid #334155;
}

.shift-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  text-align: center;
}

.stat-box {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-box .num {
  font-family: var(--gm-font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gm-orange);
}

.stat-box .lbl {
  font-size: 0.7rem;
  color: #94A3B8;
  margin-top: 0.2rem;
}

/* Job Cards Container */
.jobs-list-section {
  padding: 1.25rem 1rem;
  flex: 1;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #FFF;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.job-card {
  background: #0F172A;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform var(--gm-transition-fast);
}

.job-card.active-focus {
  border-color: var(--gm-orange);
  box-shadow: 0 0 16px rgba(255, 107, 22, 0.2);
}

.job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.job-id {
  font-family: monospace;
  font-size: 0.8125rem;
  color: #94A3B8;
}

.customer-address-box {
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 0.95rem 1rem;
  margin: 0.85rem 0;
  font-size: 0.875rem;
}

.customer-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0.5rem;
}

.customer-name-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 140px;
}

.btn-call-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 107, 22, 0.15);
  color: var(--gm-orange);
  border: 1px solid rgba(255, 107, 22, 0.35);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-call-chip:active {
  background: var(--gm-orange);
  color: #FFF;
}

.customer-address-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #CBD5E1;
  font-size: 0.8125rem;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.customer-slot-line {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #38BDF8;
  font-size: 0.75rem;
}

/* 1-Tap Google Maps Turn-by-Turn Navigation Button */
.btn-maps-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: 1px solid #10B981;
  border-radius: 12px;
  padding: 10px 14px;
  color: #FFFFFF !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
  box-sizing: border-box;
  width: 100%;
}

.btn-maps-nav:active {
  transform: scale(0.98);
  background: #047857;
}

.btn-maps-nav .nav-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.btn-maps-nav .nav-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.btn-maps-nav .nav-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
}

.btn-maps-nav .nav-text span {
  display: block;
  font-size: 0.72rem;
  color: #A7F3D0;
  margin-top: 1px;
}

.btn-maps-nav .nav-arrow {
  font-size: 1.1rem;
  color: #A7F3D0;
  font-weight: 800;
  flex-shrink: 0;
}

/* Action Execution Bar */
.action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-large-touch {
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  width: 100%;
  cursor: pointer;
}

/* OTP Entry Modal */
.agent-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.agent-modal-overlay.open {
  display: flex;
}

.agent-dialog {
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 1.75rem;
  text-align: center;
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.otp-digit {
  width: 54px;
  height: 60px;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  font-family: monospace;
  background: #0F172A;
  border: 2px solid #475569;
  color: #FFF;
  border-radius: 8px;
  outline: none;
}

.otp-digit:focus {
  border-color: var(--gm-orange);
}