/* hub-in-use-kegs.css — In-Use Kegs & Cold Box Tapped Inventory Module */

#view-in-use-kegs {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.iuk-container {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
}

/* Header */
.iuk-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.iuk-header-left h1 {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.iuk-header-left p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.iuk-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Metrics Dashboard */
.iuk-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.iuk-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.iuk-metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #cbd5e1;
}

.iuk-metric-card.metric-primary::before { background: #3b82f6; }
.iuk-metric-card.metric-success::before { background: #10b981; }
.iuk-metric-card.metric-amber::before { background: #f59e0b; }
.iuk-metric-card.metric-purple::before { background: #8b5cf6; }

.iuk-metric-label {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 6px;
}

.iuk-metric-val {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 4px;
}

.iuk-metric-sub {
  font-size: 12.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Filter & Search Bar */
.iuk-toolbar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.iuk-search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 400px;
}

.iuk-search-box input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  font-size: 13.5px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #1e293b;
  outline: none;
  transition: all 0.15s ease;
}

.iuk-search-box input:focus {
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.iuk-search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.iuk-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.iuk-pill {
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 20px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.iuk-pill:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.iuk-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Table */
.iuk-table-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 40px;
}

.iuk-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.iuk-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  user-select: none;
}

.iuk-table td {
  padding: 12px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.iuk-table tbody tr:hover {
  background: #f8fafc;
}

.iuk-table tbody tr:last-child td {
  border-bottom: none;
}

/* Beer Item Cell */
.iuk-beer-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.iuk-beer-thumb {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.iuk-beer-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iuk-beer-thumb span {
  font-size: 20px;
}

.iuk-beer-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.iuk-beer-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Unmatched Badge & Quick Match Action */
.iuk-unmatched-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.iuk-btn-match {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  cursor: pointer;
  transition: all 0.15s ease;
}

.iuk-btn-match:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.iuk-btn-create-card {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.iuk-btn-create-card:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Keg Format Badges */
.iuk-format-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.iuk-format-20l { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.iuk-format-30l { background: #fdf2f8; color: #9d174d; border-color: #fbcfe8; }
.iuk-format-half { background: #fefce8; color: #854d0e; border-color: #fef08a; }

/* Mini Dolium Gauge in Table Row */
.iuk-mini-gauge {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.iuk-mini-gauge:hover {
  background: #f1f5f9;
}

.iuk-mini-keg-svg {
  width: 24px;
  height: 38px;
  flex-shrink: 0;
}

.iuk-gauge-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.iuk-pct-text {
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
}

.iuk-vol-bar-bg {
  width: 70px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.iuk-vol-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.fill-full { background: linear-gradient(90deg, #10b981, #059669); }
.fill-mid { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.fill-low { background: linear-gradient(90deg, #f59e0b, #d97706); }
.fill-empty { background: linear-gradient(90deg, #ef4444, #dc2626); }

/* Editable Cost Input in Row */
.iuk-cost-input {
  width: 76px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  text-align: right;
}

.iuk-cost-input:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

/* Notes Display */
.iuk-notes-cell {
  max-width: 220px;
}

.iuk-note-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}

.iuk-note-yeasty { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.iuk-note-transfer { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

/* Buttons */
.iuk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.iuk-btn-primary {
  background: #0f172a;
  color: #ffffff;
}

.iuk-btn-primary:hover {
  background: #1e293b;
}

.iuk-btn-secondary {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}

.iuk-btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.iuk-btn-success {
  background: #059669;
  color: #ffffff;
}

.iuk-btn-success:hover {
  background: #047857;
}

.iuk-btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.iuk-btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
  cursor: pointer;
}

.iuk-btn-icon:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

/* Modals */
.iuk-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.iuk-modal {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: iukModalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes iukModalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.iuk-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.iuk-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.iuk-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.iuk-modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Dolium Gauge Interactive Component */
.iuk-gauge-section {
  display: flex;
  gap: 28px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.iuk-dolium-interactive-wrap {
  position: relative;
  width: 120px;
  height: 200px;
  cursor: pointer;
  flex-shrink: 0;
}

.iuk-dolium-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08));
}

.iuk-gauge-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.iuk-pct-large {
  font-size: 36px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.iuk-pct-vol-sub {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
}

.iuk-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
}

.iuk-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}

.iuk-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.iuk-preset-btn {
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.iuk-preset-btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Match Modal List */
.iuk-match-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-top: 12px;
}

.iuk-match-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s ease;
}

.iuk-match-item:last-child {
  border-bottom: none;
}

.iuk-match-item:hover {
  background: #f8fafc;
}

.iuk-match-item.is-suggested {
  background: #f0fdf4;
}

.iuk-match-item.is-suggested:hover {
  background: #dcfce7;
}

/* Suggestion Chips */
.iuk-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.iuk-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  cursor: pointer;
}

.iuk-chip:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Empty State */
.iuk-empty-state {
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
}

.iuk-empty-state svg {
  color: #94a3b8;
  margin-bottom: 12px;
}

/* Pricing Matcher Buttons & Tags */
.iuk-btn-cost-link {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #047857;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.iuk-btn-cost-link:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #065f46;
}

.iuk-pricing-tag {
  font-size: 10.5px;
  color: #059669;
  font-weight: 600;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iuk-pricing-breakdown {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.iuk-price-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.iuk-price-pill.highlight {
  background: #dcfce7;
  border-color: #86efac;
  color: #047857;
  font-weight: 800;
}

/* On Tap Switch Toggle */
.iuk-tap-cell {
  white-space: nowrap;
}

.iuk-tap-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.iuk-tap-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.iuk-tap-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.iuk-tap-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px;
}

.iuk-tap-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.iuk-tap-switch input:checked + .iuk-tap-slider {
  background-color: #059669;
}

.iuk-tap-switch input:checked + .iuk-tap-slider:before {
  transform: translateX(16px);
}

.iuk-tap-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.iuk-tap-badge.on-tap {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.iuk-tap-badge.off-tap {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Bottom Action Bar */
.iuk-bottom-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-top: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
  gap: 12px;
}

.iuk-bottom-actions-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.iuk-bottom-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}


