/* ==========================================================================
   DAISO Work Assistant - Bright, Cheerful, & Friendly Design System
   Human-centric, warm, modern aesthetic (Toss / Apple style)
   ========================================================================== */

:root {
  /* Cheerful Brand Palette */
  --daiso-red: #E60012;
  --daiso-red-light: #FFECEE;
  --daiso-red-hover: #C5000F;
  --daiso-red-glow: rgba(230, 0, 18, 0.2);

  --pop-purple: #7C3AED;
  --pop-purple-light: #F3E8FF;
  --pop-purple-border: #DDD6FE;

  --price-blue: #2563EB;
  --price-blue-light: #EFF6FF;
  --price-blue-border: #BFDBFE;

  --success-green: #10B981;
  --success-light: #ECFDF5;

  --warm-amber: #F59E0B;
  --warm-amber-light: #FFFBEB;

  /* Bright & Warm Backgrounds */
  --bg-page: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-input: #FFFFFF;

  /* Borders & Dividers */
  --border-card: #E2E8F0;
  --border-subtle: #EDF2F7;
  --border-focus: #E60012;

  /* Typography */
  --text-main: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  /* Fonts */
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, Menlo, monospace;

  /* Elevation */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 8px 24px -4px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-elevated: 0 16px 36px -6px rgba(15, 23, 42, 0.1), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
}

/* Reset & Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100vh;
  background-color: var(--bg-page);
  background-image: 
    radial-gradient(at 0% 0%, rgba(230, 0, 18, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.04) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(245, 158, 11, 0.03) 0px, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
}

/* Layout Shell (Smartphone / PDA Mobile-First Optimized) */
.app-container {
  max-width: 580px;
  margin: 0 auto;
  padding: 10px 12px calc(40px + env(safe-area-inset-bottom, 0px)) 12px;
  min-height: 100vh;
}

/* Header (Compact for Mobile) */
.app-header {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.header-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.header-branding {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.app-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
  margin: 0;
}

.daiso-title-logo {
  height: 27px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
}

.app-title-text {
  font-size: 19px;
  font-weight: 850;
  color: #0F172A;
  letter-spacing: -0.5px;
}

.app-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
}

.header-session-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
}

.session-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
}

.session-val {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--daiso-red);
  font-size: 12px;
}

.btn-refresh-session {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  line-height: 1;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-refresh-session:hover {
  opacity: 1;
  transform: rotate(45deg);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  background: linear-gradient(135deg, var(--daiso-red), #FF334B);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px var(--daiso-red-glow);
}

.brand-title-group h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Friendly Top Info Pill */
.session-info-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-body);
  font-weight: 600;
  border: 1px solid var(--border-subtle);
}

/* Cards */
.worker-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  color: var(--text-main);
}

.step-number {
  background: linear-gradient(135deg, var(--daiso-red), #FF334B);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 8px var(--daiso-red-glow);
}

/* Work Method Chips (2x2 Grid for Mobile thumbs) */
.method-chips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.method-chip {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 52px;
  justify-content: center;
}

.method-chip:hover {
  background: #EFF6FF;
  border-color: var(--price-blue-border);
}

.method-chip.selected {
  background: #FEF2F2;
  border-color: var(--daiso-red);
  box-shadow: 0 4px 14px var(--daiso-red-glow);
}

.method-chip .method-title {
  font-weight: 800;
  font-size: 13.5px;
  color: var(--text-main);
}

.method-chip.selected .method-title {
  color: var(--daiso-red);
}

.method-chip .method-desc {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Beautiful Custom Crew Stepper Card */
.crew-stepper-card {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 6px;
}

.stepper-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stepper-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}

.stepper-desc {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
}

.stepper-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.btn-stepper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--border-card);
  background: #FFFFFF;
  color: var(--text-main);
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.15s ease;
  user-select: none;
}

.btn-stepper:active {
  transform: scale(0.92);
  background: #F1F5F9;
}

.btn-stepper.plus {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #2563EB;
}

.btn-stepper.minus {
  background: #F8FAFC;
}

.stepper-display-box {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  background: #FFFFFF;
  border: 2px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 6px 20px;
  min-width: 120px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}

.stepper-num-input {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 900;
  color: var(--text-main);
  width: 45px;
  text-align: center;
  border: none;
  background: transparent;
  outline: none;
}

.stepper-unit-text {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-muted);
}

/* Quick thumb preset pills */
.stepper-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.preset-pill {
  padding: 8px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  background: #FFFFFF;
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.15s;
}

.preset-pill.active {
  background: var(--daiso-red);
  color: #FFFFFF;
  border-color: var(--daiso-red);
  box-shadow: 0 2px 8px var(--daiso-red-glow);
}

.preset-pill:hover:not(.active) {
  background: #F1F5F9;
}

/* Search Box */
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--daiso-red);
  box-shadow: 0 0 0 4px var(--daiso-red-glow);
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.btn-scan {
  padding: 12px 18px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-body);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-scan:hover {
  background: #E2E8F0;
  color: var(--text-main);
}

/* Autocomplete Dropdown */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  z-index: 50;
  display: none;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
}

.search-result-item:hover {
  background: #FEF2F2;
}

.result-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.result-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 14px;
}

.result-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
}

/* Selected Material Detail Card */
.material-detail-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
  display: none;
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.material-detail-card.active {
  display: block;
  animation: fadeIn 0.2s ease forwards;
}

.material-detail-card.pop-active {
  border-color: var(--pop-purple-border);
  background: linear-gradient(135deg, #FAF5FF 0%, #FFFFFF 100%);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Large Twin Codes Bar (자재코드 & 품번 강조) */
.code-highlight-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.code-box-primary {
  flex: 1;
  min-width: 140px;
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.code-box-mat {
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
}

.code-box-item {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
}

.code-box-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.code-box-val {
  font-size: 22px;
  font-weight: 900;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

/* Badges */
.label-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.badge-pop {
  background: #F3E8FF;
  border: 1.5px solid #C084FC;
  color: var(--pop-purple);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
}

.badge-price {
  background: #EFF6FF;
  border: 1.5px solid #93C5FD;
  color: var(--price-blue);
}

.badge-general {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: var(--text-muted);
}

.pop-warning-banner {
  background: #FAF5FF;
  border: 1.5px solid #DDD6FE;
  border-left: 4px solid var(--pop-purple);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #5B21B6;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Quantity Grid */
.quantity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.qty-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.qty-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.qty-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-card);
  background: #fff;
  color: var(--text-main);
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.qty-btn:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.qty-input {
  width: 60px;
  text-align: center;
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
}

.qty-input:focus {
  outline: none;
  background: #fff;
  border-radius: 4px;
}

/* Digital Stopwatch (Warm & Friendly) */
.stopwatch-section {
  text-align: center;
  padding: 32px 20px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.timer-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 12px;
  background: #F1F5F9;
  color: var(--text-muted);
}

.timer-status-badge.running {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.timer-status-badge.paused {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.timer-digits {
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.timer-subinfo {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-weight: 500;
}

/* Large Friendly Buttons */
.timer-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-large {
  padding: 16px 28px;
  font-size: 17px;
  font-weight: 800;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  min-width: 160px;
}

.btn-large:active {
  transform: scale(0.97);
}

.btn-start {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-start:hover {
  background: linear-gradient(135deg, #059669, #047857);
}

.btn-pause {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.btn-finish {
  background: linear-gradient(135deg, var(--daiso-red), #FF334B);
  color: #fff;
  box-shadow: 0 4px 18px var(--daiso-red-glow);
}

.btn-reset {
  background: #F1F5F9;
  color: var(--text-body);
  border: 1px solid var(--border-card);
}

.btn-reset:hover {
  background: #E2E8F0;
}

/* Filter Buttons */
.btn-filter {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-card);
  background: #FFFFFF;
  color: var(--text-body);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-filter:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

.btn-filter.active {
  background: var(--text-main);
  color: #FFFFFF;
  border-color: var(--text-main);
}

/* Simulator Breakdown Row */
.sim-breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13.5px;
}

.sim-breakdown-row span:first-child {
  color: var(--text-muted);
}

.sim-breakdown-row span:last-child {
  font-weight: 700;
  color: var(--text-main);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-elevated);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-body);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
}

.form-control:focus {
  outline: none;
  border-color: var(--daiso-red);
  box-shadow: 0 0 0 3px var(--daiso-red-glow);
}

/* Tables (Bright & Crisp) */
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.matrix-table th {
  background: #F8FAFC;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid var(--border-card);
}

.matrix-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-main);
  vertical-align: middle;
}

.matrix-table tbody tr:hover {
  background: #F8FAFC;
}

/* Tier Badges */
.tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 13px;
}

.tier-s { background: #F3E8FF; color: #7C3AED; border: 1.5px solid #C084FC; }
.tier-a { background: #FEE2E2; color: #DC2626; border: 1.5px solid #FCA5A5; }
.tier-b { background: #FEF3C7; color: #D97706; border: 1.5px solid #FCD34D; }
.tier-c { background: #D1FAE5; color: #059669; border: 1.5px solid #6EE7B7; }
.tier-none { background: #F1F5F9; color: #94A3B8; border: 1.5px dashed #CBD5E1; font-weight: 700; font-size: 12px; }


/* Responsive adjustments */
@media (max-width: 640px) {
  .app-container {
    padding: 10px 10px 80px 10px;
  }
  .app-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .btn-large {
    width: 100%;
  }
}

/* ==========================================================================
   Work Status Banner (Warm & Friendly, No Timer Pressure)
   ========================================================================== */
.work-status-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  border-radius: var(--radius-md);
  margin: 14px 0 20px 0;
  transition: all 0.3s ease;
}

.work-status-banner.idle {
  background: var(--bg-subtle);
  border: 1.5px dashed var(--border-card);
}

.work-status-banner.running {
  background: #ECFDF5;
  border: 1.5px solid #A7F3D0;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.12);
}

.work-status-banner.paused {
  background: #FFFBEB;
  border: 1.5px solid #FDE68A;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.1);
}

.work-status-icon {
  font-size: 32px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.work-status-info {
  flex: 1;
}

.work-status-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.work-status-msg {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success-green);
  display: inline-block;
  animation: pulseAnimation 1.8s infinite;
}

@keyframes pulseAnimation {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   Pattern Change Alert Banner & Comparison Grid
   ========================================================================== */
.pattern-alert-banner {
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
}

.pattern-alert-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.pulse-amber-badge {
  background: #FEF3C7;
  color: #B45309;
  border: 1.5px solid #F59E0B;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shipping-tag {
  background: var(--daiso-red);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}

.pattern-compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.pattern-box {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}

.pattern-box.original {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.pattern-box.changed {
  background: #FEF2F2;
  border: 1.5px solid #FCA5A5;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}

.pattern-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.pattern-box.changed .pattern-label {
  color: #DC2626;
  font-weight: 800;
}

.pattern-val {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.pattern-box.changed .pattern-val {
  color: #DC2626;
}

.pattern-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pattern-arrow {
  font-size: 18px;
  font-weight: 900;
  color: #D97706;
  text-align: center;
}

.pattern-alert-note {
  font-size: 12.5px;
  color: #92400E;
  font-weight: 700;
  line-height: 1.4;
  background: rgba(254, 243, 199, 0.6);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid #F59E0B;
}

/* =============================================================================
   12. 2-STEP CONSECUTIVE SCAN (POKA-YOKE CROSS-VERIFICATION)
   ============================================================================= */
.consecutive-scan-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.scan-step-card {
  background: #FFFFFF;
  border: 2px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.scan-step-card.active {
  border-color: var(--daiso-red);
  background: #FFFBFB;
  box-shadow: 0 4px 16px rgba(230, 0, 18, 0.08);
}

.scan-step-card.active.sticker-active {
  border-color: #2563EB;
  background: #F8FAFF;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}

.scan-step-card.completed {
  border-color: #10B981;
  background: #F0FDF4;
}

.scan-step-card.disabled {
  opacity: 0.55;
  background: #F8FAFC;
  pointer-events: none;
}

.scan-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.scan-badge {
  font-size: 11.5px;
  font-weight: 800;
  color: #FFFFFF;
  background: var(--daiso-red);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.scan-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-main);
  flex: 1;
  margin-left: 10px;
}

.scan-status-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: #E2E8F0;
  color: var(--text-muted);
}

.scan-step-card.completed .scan-status-badge {
  background: #D1FAE5;
  color: #065F46;
  font-weight: 800;
}

.scan-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.scan-input-icon {
  font-size: 18px;
}

.scan-input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 700;
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.scan-input:focus {
  border-color: var(--daiso-red);
  box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.12);
}

.scan-input.sticker:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-scan-camera {
  height: 48px;
  padding: 0 16px;
  background: #F1F5F9;
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-scan-camera:hover {
  background: #E2E8F0;
}

.scan-flow-arrow {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  padding: 2px 0;
  letter-spacing: 0.3px;
}

.scan-result-summary {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  border: 1px solid #D1FAE5;
}

.scan-result-summary .summary-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 3px;
}

.scan-result-summary .summary-codes {
  font-size: 12px;
  font-family: var(--font-mono);
  color: #059669;
  font-weight: 700;
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-text-action:hover {
  color: var(--daiso-red);
  background: rgba(230, 0, 18, 0.05);
}

/* Cross-Verification Match Banner */
.verification-match-banner {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 1.5px solid #6EE7B7;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.1);
}

/* Mismatch Warning Modal */
.modal-card.mismatch-card {
  max-width: 480px;
  border-top: 8px solid #DC2626;
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.mismatch-compare-table {
  background: #FEF2F2;
  border: 1.5px solid #FCA5A5;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.mismatch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #FECACA;
}

.mismatch-row:last-child {
  border-bottom: none;
}

.mismatch-row .row-label {
  font-size: 12px;
  font-weight: 800;
  color: #991B1B;
}

.mismatch-row .row-val {
  font-size: 13.5px;
  font-weight: 800;
  text-align: right;
}

/* ==========================================================================
   VISUAL PATTERN DIAGRAM & WORK GUIDE CARDS (Clean & Intuitive)
   ========================================================================== */

/* 1. Stacking Pattern Graphical Diagram */
.pattern-diagram-banner {
  background: linear-gradient(135deg, #FFF1F2 0%, #FEF2F2 100%);
  border: 2px solid #FCA5A5;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 14px 0;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.08);
}

.pattern-diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pattern-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #DC2626;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.pattern-rule-hint {
  font-size: 13px;
  font-weight: 800;
  color: #B91C1C;
}

.pattern-diagram-flow {
  display: grid;
  grid-template-columns: 1fr auto 1.3fr;
  align-items: center;
  gap: 12px;
}

.pattern-diag-card {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.pattern-diag-card.orig {
  background: #F1F5F9;
  border: 1.5px solid #CBD5E1;
  opacity: 0.85;
}

.pattern-diag-card.orig .diag-title {
  font-size: 11.5px;
  color: #64748B;
  font-weight: 700;
  margin-bottom: 4px;
}

.pattern-diag-card.orig .diag-calc {
  font-size: 17px;
  font-weight: 800;
  color: #475569;
  text-decoration: line-through;
}

.pattern-diag-card.orig .diag-total {
  font-size: 13px;
  color: #64748B;
  font-weight: 700;
}

.pattern-diag-arrow {
  font-size: 22px;
  color: #DC2626;
  font-weight: 900;
}

.pattern-diag-card.target {
  background: #FFFFFF;
  border: 2px solid #DC2626;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.15);
}

.pattern-diag-card.target .diag-title {
  font-size: 12px;
  color: #DC2626;
  font-weight: 800;
  margin-bottom: 4px;
}

.pattern-diag-card.target .diag-calc {
  font-size: 22px;
  font-weight: 900;
  color: #DC2626;
  letter-spacing: -0.5px;
}

.pattern-diag-card.target .diag-total {
  font-size: 15px;
  font-weight: 900;
  color: #991B1B;
  margin-top: 2px;
}

.pattern-diag-card.target .diag-subpill {
  display: inline-block;
  margin-top: 6px;
  background: #FEF2F2;
  color: #B91C1C;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid #FECACA;
}

/* 2. Visual 4-Item Work Guide Grid (Always 2x2: No Horizontal Overflow!) */
.work-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
  margin: 12px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.guide-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-card);
  background: var(--bg-card);
  transition: all 0.2s;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.guide-card-icon {
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  flex-shrink: 0;
}

.guide-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.guide-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-card-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-card-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Specific Style Variations */
.guide-card.style-pop {
  background: #FAF5FF;
  border-color: #D8B4FE;
}
.guide-card.style-pop .guide-card-val {
  color: #7E22CE;
}

.guide-card.style-price {
  background: #EFF6FF;
  border-color: #BFDBFE;
}
.guide-card.style-price .guide-card-val {
  color: #1D4ED8;
}

.guide-card.style-box-on {
  background: #F0FDF4;
  border-color: #BBF7D0;
}
.guide-card.style-box-on .guide-card-val {
  color: #15803D;
}

.guide-card.style-box-off,
.guide-card.style-muted {
  background: #F8FAFC;
  border-color: #E2E8F0;
  opacity: 0.75;
}
.guide-card.style-box-off .guide-card-val,
.guide-card.style-muted .guide-card-val {
  color: #64748B;
}

.guide-card.style-extra-on {
  background: #FFFBEB;
  border-color: #FCD34D;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}
.guide-card.style-extra-on .guide-card-val {
  color: #B45309;
}

/* ==========================================================================
   SMARTPHONE & PDA SCREEN OPTIMIZATIONS (Mobile-First Ergonomics)
   ========================================================================== */

/* 1. 4-Column Spec Grid Mobile 2x2 Adaptation */
.spec-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.spec-card {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}

.spec-card.highlight {
  background: #EFF6FF;
  border-color: #93C5FD;
}

.spec-card-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.spec-card-val {
  font-size: 20px;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--text-main);
}

.spec-card-val.highlight {
  color: #1D4ED8;
  font-size: 22px;
}

.spec-card-sub {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
  margin-top: 1px;
}

/* 2. Responsive Scan Cards & Inputs (16px font prevents iOS auto-zoom) */
.scan-step-card {
  border: 2px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px;
  background: #FFFFFF;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.scan-step-card.active {
  border-color: var(--daiso-red);
  box-shadow: 0 4px 14px var(--daiso-red-glow);
}

.scan-step-card.sticker-active {
  border-color: #2563EB;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.18);
}

.scan-step-card.completed {
  border-color: #10B981;
  background: #F0FDF4;
}

.scan-step-card.disabled {
  opacity: 0.6;
  background: #F8FAFC;
  pointer-events: none;
}

.scan-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.scan-badge {
  background: var(--daiso-red);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

.scan-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  flex: 1;
  margin: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scan-status-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.scan-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
}

.scan-input-icon {
  font-size: 18px;
}

.scan-input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  font-size: 16px !important; /* CRITICAL: 16px prevents iOS Safari auto-zoom */
  font-weight: 700;
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-main);
  outline: none;
}

.scan-input:focus {
  border-color: var(--daiso-red);
  box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.12);
}

.scan-input.sticker:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* 2차 스캔 직접 입력 토글 버튼 및 확인 버튼 */
.btn-sticker-submit {
  flex-shrink: 0;
  height: 50px;
  padding: 0 18px;
  background: #2563EB;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 800;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-sticker-submit:active {
  transform: scale(0.96);
  background: #1D4ED8;
}

.manual-sticker-action-row {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

.btn-manual-toggle {
  width: 100%;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1.5px dashed #60A5FA;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-manual-toggle:active {
  background: #DBEAFE;
  transform: scale(0.98);
}

.manual-input-guide {
  margin-top: 6px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #1E40AF;
  background: #EFF6FF;
  border-left: 3px solid #3B82F6;
  border-radius: 4px;
  line-height: 1.4;
}

/* 3. Single [작업 완료] Button Smartphone Touch Optimization */
.btn-finish {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 58px;
  font-size: 20px !important;
  font-weight: 900 !important;
  border-radius: var(--radius-md) !important;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
}

.btn-finish:active {
  transform: scale(0.97);
}

/* 4. Small Screen Media Query Fine-Tuning */
@media (max-width: 480px) {
  .app-container {
    padding: 8px 8px calc(30px + env(safe-area-inset-bottom, 0px)) 8px;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }

  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .header-branding {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .logo-circle {
    font-size: 22px;
  }

  .app-title {
    font-size: 16px;
    font-weight: 800;
  }

  .app-subtitle {
    display: none; /* Hide subtitle on tiny screens for clean compactness */
  }

  .header-session-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 6px 12px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    font-size: 12px;
  }

  .pattern-diagram-flow {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .pattern-diag-arrow {
    transform: rotate(90deg);
    line-height: 1;
    font-size: 18px;
  }

  .work-guide-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .guide-card {
    padding: 8px 10px;
    gap: 8px;
  }

  .guide-card-icon {
    font-size: 22px;
    min-width: 28px;
  }

  .guide-card-val {
    font-size: 12px;
  }

  .guide-card-sub {
    font-size: 10.5px;
  }
}

/* ==========================================================================
   4-STEP WIZARD WORKFLOW STYLES (Capture 1 ➔ 2 ➔ 3 ➔ 4)
   ========================================================================== */
.wizard-stepper-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.wizard-step-node {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  opacity: 0.45;
  transition: all 0.2s ease;
}

.wizard-step-node.active {
  opacity: 1;
}

.wizard-step-node .node-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard-step-node.active .node-num {
  background: var(--daiso-red);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
}

.wizard-step-node.completed .node-num {
  background: var(--success-green);
  color: #FFFFFF;
}

.wizard-step-node .node-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.wizard-step-node.active .node-label {
  color: var(--text-main);
  font-weight: 800;
}

.wizard-step-connector {
  flex: 1;
  height: 2px;
  background: #E2E8F0;
  margin: 0 6px;
  border-radius: 1px;
  transition: background 0.2s ease;
}

.wizard-step-connector.active {
  background: var(--daiso-red);
}

.wizard-screen {
  animation: fadeInStep 0.2s ease-out;
}

@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.btn-screen-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-screen-back:hover {
  background: #F8FAFC;
  color: var(--text-main);
  border-color: #CBD5E1;
}

.screen-crew-tag {
  font-size: 11.5px;
  font-weight: 800;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.btn-wizard-nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 800;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.btn-wizard-nav.next {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
}

.btn-wizard-nav.next:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.btn-wizard-nav.start-work {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #FFFFFF;
}

.btn-wizard-nav.start-work:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

/* ==========================================================================
   SCREEN 3 (CAPTURE 3): COMPACT ZERO-SCROLL FIT FOR MOBILE
   ========================================================================== */
.screen3-fit-card {
  padding: 10px 12px;
}

.material-detail-card.compact-fit {
  padding: 8px 10px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.code-highlight-bar.compact-fit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

.code-box-primary.compact-fit {
  padding: 5px 10px;
  border-radius: 6px;
}

.code-box-primary.code-box-mat {
  background: #FFF1F2;
  border: 1.5px solid #FECDD3;
}

.code-box-primary.code-box-item {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
}

.code-box-val.compact-fit {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
}

.mat-name-row.compact-fit {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.label-badge.compact-fit {
  font-size: 11px;
  padding: 2px 8px;
}

.mat-card-title.compact-fit {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  margin: 3px 0 5px 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pattern-diagram-banner.compact-fit {
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  border-radius: 6px;
  padding: 5px 8px;
  margin-bottom: 5px;
}

.pattern-diagram-header.compact-fit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.pattern-badge-pill.compact-fit {
  font-size: 10px;
  font-weight: 800;
  background: #DC2626;
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
}

.pattern-rule-hint.compact-fit {
  font-size: 9.5px;
  color: #991B1B;
  font-weight: 700;
}

.pattern-diagram-flow.compact-fit {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pattern-diag-card.compact-fit {
  flex: 1;
  padding: 4px 6px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #E2E8F0;
  text-align: center;
}

.pattern-diag-card.orig.compact-fit {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.pattern-diag-card.target.compact-fit {
  background: #FEF2F2;
  border: 1.5px solid #F87171;
}

.pattern-diag-card.compact-fit .diag-title {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
}

.pattern-diag-card.compact-fit .diag-calc {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
}

.pattern-diag-card.target.compact-fit .diag-calc {
  color: #DC2626;
}

.pattern-diag-card.compact-fit .diag-total {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.pattern-diag-card.target.compact-fit .diag-total {
  color: #991B1B;
  font-weight: 800;
}

.diag-subpill.compact-fit {
  display: inline-block;
  font-size: 8.5px;
  background: #EF4444;
  color: #fff;
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: 700;
}

.pattern-diag-arrow.compact-fit {
  font-size: 13px;
  color: #DC2626;
  font-weight: 900;
}

/* 2x2 Work Guide Grid Compact Fit */
.work-guide-grid.compact-fit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 5px;
}

.guide-card.compact-fit {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  min-height: 36px;
  box-sizing: border-box;
}

.guide-card.compact-fit .guide-card-icon {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.guide-card.compact-fit .guide-card-label {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1.1;
}

.guide-card.compact-fit .guide-card-val {
  font-size: 11.5px;
  color: var(--text-main);
  font-weight: 800;
  line-height: 1.2;
}

.guide-card.compact-fit .guide-card-sub {
  font-size: 8.5px;
  color: var(--text-muted);
  line-height: 1;
}

/* Spec Grid 4 Columns Compact Fit */
.spec-grid-4.compact-fit {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 5px;
}

.spec-card.compact-fit {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 5px;
  padding: 4px 4px;
  text-align: center;
}

.spec-card.compact-fit.highlight {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.spec-card.compact-fit .spec-card-label {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1.1;
}

.spec-card.compact-fit .spec-card-val {
  font-size: 12px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.2;
}

.spec-card.compact-fit .spec-card-val.highlight {
  color: #1D4ED8;
}

.spec-card.compact-fit .spec-card-sub {
  font-size: 8px;
  color: var(--text-muted);
  line-height: 1;
}

/* Formula Notice Compact Fit */
.formula-notice.compact-fit {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 10px;
  color: #166534;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}

/* Deficit Bar Compact Fit */
.deficit-bar.compact-fit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFBEB;
  border: 1px dashed #FDE68A;
  padding: 4px 8px;
  border-radius: 5px;
  flex-wrap: wrap;
  gap: 4px;
}

.btn-filter-micro {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  cursor: pointer;
  color: #334155;
  line-height: 1.2;
}

.btn-filter-micro:hover {
  background: #E2E8F0;
}

/* ==========================================================================
   SCREEN 4 (CAPTURE 4): 작업 진행 & 완료 화면 STYLES
   ========================================================================== */
.work-status-banner {
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, background 0.25s ease, border-color 0.25s ease;
}
.work-status-banner:active {
  transform: scale(0.985);
}

.work-status-banner.running {
  background: #F0FDF4;
  border: 1.5px solid #86EFAC;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.1);
}

.work-status-banner.paused {
  background: #FFFBEB !important;
  border: 1.5px solid #F59E0B !important;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.18) !important;
}

.work-status-banner.paused .work-status-icon-circle {
  background: #FEF3C7 !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
  animation: pulsePauseOrb 2s infinite ease-in-out;
}

@keyframes pulsePauseOrb {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.pause-hint-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 4px;
  transition: all 0.2s;
}
.pause-hint-badge.running {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}
.pause-hint-badge.paused {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FCD34D;
}

.work-status-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #DCFCE7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
  animation: pulseOrb 2s infinite ease-in-out;
}

.green-orb {
  font-size: 26px;
  line-height: 1;
}

@keyframes pulseOrb {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.work-status-title {
  font-size: 16.5px;
  font-weight: 800;
  color: #14532D;
}

/* =============================================================================
   Mobile Smartphone Live Camera Scanner
   ============================================================================= */
.mobile-camera-scanner-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.camera-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  gap: 8px;
}

.camera-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 1;
}

.camera-live-pulse {
  width: 9px;
  height: 9px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: cameraPulse 1.6s infinite;
  flex-shrink: 0;
}

@keyframes cameraPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.camera-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

/* 100% 폭 스캔 단계 안내 배너 (모바일에서 텍스트가 줄바꿈되어 세로로 늘어지는 문제 방지) */
.camera-instruction-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  transition: all 0.2s ease;
}

.camera-instruction-banner.phase-1 {
  background: #FEF2F2;
  color: #DC2626;
  border-bottom: 1px solid #FEE2E2;
}

.camera-instruction-banner.phase-2 {
  background: #EFF6FF;
  color: #1D4ED8;
  border-bottom: 1px solid #DBEAFE;
}

.camera-instruction-banner .banner-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.camera-instruction-banner .banner-text {
  letter-spacing: -0.2px;
}

.camera-ctrl-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.btn-camera-ctrl {
  padding: 5px 9px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-camera-ctrl:hover {
  background: #F1F5F9;
}

.btn-camera-toggle {
  padding: 5px 10px;
  background: #E2E8F0;
  border: none;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-camera-toggle:hover {
  background: #CBD5E1;
}

.camera-viewport-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  background: #090D16;
  overflow: hidden;
  transition: height 0.25s ease;
}

/* 2차 QR 스캔 모드: 시원하게 280px로 높이를 확장하여 정사각형 조준창을 온전히 담음 */
.camera-viewport-wrap.phase-qr {
  height: 280px;
}

#cameraReaderContainer {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  background: #000;
}

#cameraReaderContainer video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
}

/* 카메라 줌 배율 제어 버튼 */
.camera-zoom-pills {
  display: flex;
  background: #E2E8F0;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
  align-items: center;
}

.btn-zoom-pill {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-zoom-pill.active {
  background: #2563EB;
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.35);
}

/* Reticle Aiming Frame - 1차 슬림 가로 바코드 슬롯 / 2차 정사각형 QR 슬롯 */
.camera-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 76px; /* 슬림 가로 슬롯 (상하 인접 바코드 간섭 원천 배제) */
  pointer-events: none;
  z-index: 5;
  box-sizing: border-box;
  transition: width 0.25s ease, height 0.25s ease;
}

/* 2차 QR 스티커 전용 완벽한 1:1 정사각형 타겟팅 모드 (상하좌우 코너가 선명하게 노출됨) */
.camera-reticle.phase-qr {
  width: 210px !important;
  height: 210px !important;
  max-width: 75vw;
  max-height: 75vw;
}

/* 스마트폰 화면 터치 초점 링 (Tap-to-Focus Ring) */
.camera-tap-focus-ring {
  position: absolute;
  width: 58px;
  height: 58px;
  border: 2px solid #FACC15;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1.4);
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0, 0, 0.2, 1), opacity 0.2s ease-out;
}
.camera-tap-focus-ring.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
.camera-tap-focus-ring::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #FACC15;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.btn-focus-trigger {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1D4ED8;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s;
  user-select: none;
}
.btn-focus-trigger:active {
  background: #DBEAFE;
  transform: scale(0.96);
}

/* 앱 버전 뱃지 스타일 */
.app-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #EEF2F6;
  color: #1E293B;
  border: 1px solid #CBD5E1;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}
.app-version-badge:active {
  transform: scale(0.96);
  background: #E2E8F0;
}
.app-version-badge .v-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  animation: pulseDot 2s infinite;
}
.camera-version-tag {
  font-size: 11px;
  font-weight: 700;
  background: #F1F5F9;
  color: #475569;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  margin-left: 6px;
}

.reticle-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: #E60012;
  border-style: solid;
  transition: border-color 0.2s;
}

.reticle-corner.top-left {
  top: 0;
  left: 0;
  border-width: 3px 0 0 3px;
  border-top-left-radius: 6px;
}

.reticle-corner.top-right {
  top: 0;
  right: 0;
  border-width: 3px 3px 0 0;
  border-top-right-radius: 6px;
}

.reticle-corner.bottom-left {
  bottom: 0;
  left: 0;
  border-width: 0 0 3px 3px;
  border-bottom-left-radius: 6px;
}

.reticle-corner.bottom-right {
  bottom: 0;
  right: 0;
  border-width: 0 3px 3px 0;
  border-bottom-right-radius: 6px;
}

.reticle-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #EF4444;
  box-shadow: 0 0 8px #EF4444, 0 0 12px #EF4444;
  animation: laserScan 1.6s ease-in-out infinite alternate;
  transition: background 0.15s, box-shadow 0.15s;
}

/* 안정 조준 포착 중 (노란색 포커싱) */
.reticle-laser.aim-locking {
  background: #F59E0B !important;
  box-shadow: 0 0 12px #F59E0B, 0 0 18px #F59E0B !important;
  height: 3px;
}

/* 안정 조준 확정 (녹색 락온) */
.reticle-laser.aim-locked {
  background: #10B981 !important;
  box-shadow: 0 0 14px #10B981, 0 0 20px #10B981 !important;
  height: 4px;
}

@keyframes laserScan {
  0% { top: 8%; opacity: 0.5; }
  50% { opacity: 1; }
  100% { top: 92%; opacity: 0.5; }
}

.camera-phase-pill {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  color: #FFFFFF;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 6;
  white-space: nowrap;
  transition: all 0.2s;
}

.camera-phase-pill.phase-2 {
  background: rgba(37, 99, 235, 0.95);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

.camera-offline-msg {
  padding: 24px 16px;
  text-align: center;
  background: #F8FAFC;
}

/* =============================================================================
   Google Sheet Material Master Sync Widget
   ============================================================================= */
.header-sync-widget {
  display: flex;
  align-items: center;
}

.btn-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.btn-sync-pill:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  transform: translateY(-1px);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  flex-shrink: 0;
  transition: background 0.2s;
}

.sync-dot.syncing {
  background: #3B82F6;
  animation: cameraPulse 1s infinite;
}

/* =============================================================================
   Security Lock Overlay & PIN Pad (Worker & Manager)
   ============================================================================= */
.security-lock-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: #0B0F19;
  background: radial-gradient(circle at 50% 30%, #1E293B 0%, #0B0F19 100%);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.security-lock-card {
  width: 100%;
  max-width: 360px;
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  color: #FFFFFF;
}

.security-logo-wrap {
  margin-bottom: 14px;
}

.security-logo {
  height: 36px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.security-lock-title {
  font-size: 19px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.security-lock-desc {
  font-size: 13px;
  color: #94A3B8;
  margin-bottom: 22px;
  line-height: 1.4;
}

/* 4-Digit PIN Indicators */
.pin-dots-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 26px;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #64748B;
  background: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pin-dot.filled {
  background: #E60012;
  border-color: #E60012;
  box-shadow: 0 0 14px rgba(230, 0, 18, 0.6);
  transform: scale(1.15);
}

.pin-dot.error {
  background: #EF4444;
  border-color: #EF4444;
  animation: pinShake 0.4s ease-in-out;
}

@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* Mobile Thumb Keypad */
.pin-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.pin-key-btn {
  height: 60px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.12s ease;
}

.pin-key-btn:active {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0.95);
}

.pin-key-btn.action-key {
  font-size: 15px;
  color: #94A3B8;
}

.pin-error-msg {
  font-size: 12.5px;
  font-weight: 700;
  color: #F87171;
  min-height: 20px;
  margin-top: 6px;
}

.btn-lock-header {
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #CBD5E1;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-lock-header:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #94A3B8;
}

.header-master-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
}

/* ==========================================================================
   DAISO Manager Portal - PC / Desktop Wide Dashboard Layout
   ========================================================================== */
.manager-container {
  max-width: 1560px;
  width: 95%;
  margin: 0 auto;
  padding: 24px 24px 60px 24px;
  min-height: 100vh;
}

@media (max-width: 768px) {
  .manager-container {
    width: 100%;
    padding: 12px 12px 40px 12px;
  }
}

.manager-header {
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.manager-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

@media (max-width: 1180px) {
  .manager-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .manager-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Simulator 2-Column Desktop Grid */
.manager-sim-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .manager-sim-grid {
    grid-template-columns: 1fr;
  }
}

/* Manager Table (Matrix & Logs) */
.matrix-table-wrap {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  text-align: left;
}

.matrix-table thead th {
  background: #F8FAFC;
  color: #334155;
  font-weight: 800;
  padding: 13px 14px;
  border-bottom: 2px solid var(--border-card);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.matrix-table tbody tr {
  transition: background-color 0.12s ease;
}

.matrix-table tbody tr:hover {
  background-color: #F8FAFC;
}

.matrix-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-body);
  vertical-align: middle;
}

/* Manager Nav Tabs */
.manager-nav-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid var(--border-card);
  margin-bottom: 22px;
  padding-bottom: 6px;
  overflow-x: auto;
}

.manager-nav-tabs .btn-filter {
  font-size: 14.5px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  white-space: nowrap;
}





