/* ==========================================================================
   PrintNow Mobile-First 3D Print Queue Stylesheet
   Tactical dark aesthetic with cyan / emerald accents
   ========================================================================== */

:root {
  --bg-main: #060a12;
  --bg-surface: #0c1322;
  --bg-card: #111a2e;
  --bg-card-hover: #16223b;
  --bg-input: #080e1b;
  --border-subtle: rgba(56, 189, 248, 0.12);
  --border-focus: #38bdf8;
  --border-card: rgba(56, 189, 248, 0.18);

  --accent-cyan: #38bdf8;
  --accent-cyan-dim: rgba(56, 189, 248, 0.15);
  --accent-emerald: #10b981;
  --accent-emerald-dim: rgba(16, 185, 129, 0.15);
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #a855f7;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --priority-urgent: #ef4444;
  --priority-high: #f97316;
  --priority-normal: #eab308;
  --priority-low: #94a3b8;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.18);
  --shadow-sheet: 0 -8px 32px rgba(0, 0, 0, 0.7);

  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App Layout Container */
.app-container {
  min-height: 100vh;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

/* ==========================================================================
   Header
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  background: rgba(6, 10, 18, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

.logo-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 2px 5px;
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.stat-dot.pulse {
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover, .btn-icon:active {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

/* ==========================================================================
   Quick Add Section (Mobile Hero)
   ========================================================================== */
.quick-add-section {
  padding: 12px 14px 6px;
}

.quick-add-card {
  background: linear-gradient(180deg, #0e172a 0%, #0a1120 100%);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(56, 189, 248, 0.08);
}

.quick-add-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 10px;
  color: var(--text-dim);
  pointer-events: none;
}

.quick-input {
  width: 100%;
  height: 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 34px 0 34px;
  color: var(--text-main);
  font-size: 14px;
  transition: all 0.15s ease;
}

.quick-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  background: #0b1426;
}

.quick-input::placeholder {
  color: #475569;
  font-size: 13px;
}

.btn-clear {
  position: absolute;
  right: 8px;
  width: 20px;
  height: 20px;
  background: rgba(100, 116, 139, 0.3);
  border: none;
  border-radius: 50%;
  color: #cbd5e1;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-add-actions {
  display: flex;
  gap: 6px;
}

.btn-action {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-paste {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.btn-paste:hover, .btn-paste:active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.quick-add-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 2px;
}

.supported-tags {
  font-size: 11px;
  color: var(--text-dim);
}

.btn-link-manual {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

.btn-link-manual:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Filter Tabs (Segmented Control)
   ========================================================================== */
.filter-tabs-nav {
  padding: 8px 14px;
}

.tabs-segmented-control {
  display: flex;
  background: #09101d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 4px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 38px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn.active {
  background: #1e293b;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.tab-count {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.tab-btn.active .tab-count {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
}

/* ==========================================================================
   Toolbar (Sort & Search)
   ========================================================================== */
.controls-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 14px 8px;
}

.sort-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sort-label {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 600;
}

.select-sort {
  height: 32px;
  background: #0d1527;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  padding: 0 8px;
  outline: none;
  cursor: pointer;
}

.select-sort:focus {
  border-color: var(--accent-cyan);
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  max-width: 220px;
}

.search-input {
  width: 100%;
  height: 32px;
  background: #0d1527;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 24px 0 8px;
  color: var(--text-main);
  font-size: 12px;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-cyan);
}

.search-input::placeholder {
  color: #475569;
}

.btn-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 11px;
}

/* Reorder Tip */
.reorder-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-dim);
  margin: 0 14px 8px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-cyan);
}

.tip-icon {
  color: var(--accent-cyan);
  font-size: 14px;
}

/* ==========================================================================
   Prints Feed & Cards
   ========================================================================== */
.prints-feed {
  flex: 1;
  padding: 0 14px;
}

.prints-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Single Print Card */
.print-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.print-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
}

/* Active Status: Printing */
.print-card.is-printing {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.print-card.is-printing .printing-indicator-bar {
  display: block;
}

.printing-indicator-bar {
  display: none;
  height: 3px;
  background: linear-gradient(90deg, #10b981 0%, #34d399 50%, #10b981 100%);
  background-size: 200% 100%;
  animation: gradient-pulse 2s infinite linear;
}

@keyframes gradient-pulse {
  0% { background-position: 100% 0%; }
  100% { background-position: -100% 0%; }
}

/* Dragging state */
.print-card.is-dragging {
  opacity: 0.85;
  transform: scale(1.02);
  border-color: var(--accent-cyan);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7), 0 0 24px rgba(56, 189, 248, 0.35);
  z-index: 50;
}

/* Card Main Area */
.card-main {
  display: flex;
  padding: 10px;
  gap: 12px;
  align-items: flex-start;
}

/* Drag Handle */
.card-drag-handle {
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  color: #475569;
  cursor: grab;
  touch-action: none;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.card-drag-handle:hover, .card-drag-handle:active {
  color: var(--accent-cyan);
}

.drag-grip-icon {
  width: 14px;
  height: 20px;
}

/* Thumbnail */
.card-thumbnail-box {
  position: relative;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0a0f1d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
  font-size: 0;
}

.card-thumbnail-box:hover .card-img {
  transform: scale(1.05);
}

.btn-zoom-overlay {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 11px;
  pointer-events: none;
}

/* Card Info */
.card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-queue-pos {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  letter-spacing: 0.3px;
}

.badge-platform {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.badge-platform.makerworld {
  background: rgba(0, 174, 104, 0.18);
  color: #34d399;
  border: 1px solid rgba(0, 174, 104, 0.3);
}

.badge-platform.printables {
  background: rgba(250, 107, 30, 0.18);
  color: #fb923c;
  border: 1px solid rgba(250, 107, 30, 0.3);
}

.badge-platform.thingiverse {
  background: rgba(36, 137, 230, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(36, 137, 230, 0.3);
}

.badge-priority {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
}

.badge-priority.urgent {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-priority.high {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.badge-priority.normal {
  background: rgba(234, 179, 8, 0.18);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.badge-priority.low {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-title-link {
  color: #f8fafc;
  text-decoration: none;
  transition: color 0.15s ease;
}

.card-title-link:hover, .card-title-link:active {
  color: var(--accent-cyan);
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-top: 2px;
}

.meta-chip {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: 4px;
}

.color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Card Actions Bottom Bar */
.card-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(10, 16, 29, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  gap: 6px;
}

.actions-left, .actions-right {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-card-action {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-start-print {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.btn-start-print:hover, .btn-start-print:active {
  background: #10b981;
  color: #ffffff;
}

.btn-mark-done {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.btn-mark-done:hover, .btn-mark-done:active {
  background: #0284c7;
  color: #ffffff;
}

.btn-icon-card {
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.btn-icon-card:hover, .btn-icon-card:active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.btn-move-arrow {
  font-size: 13px;
  color: #cbd5e1;
}

.btn-open-link {
  color: #38bdf8;
}

/* ==========================================================================
   Modals & Bottom Sheet (Mobile Drawer)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: flex-end; /* Bottom sheet on mobile */
  justify-content: center;
  animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-sheet {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-sheet);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  animation: slide-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-sheet-small {
  max-height: 80vh;
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
  .modal-sheet {
    border-radius: var(--radius-xl);
    animation: scale-up 0.2s ease-out;
  }
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes scale-up {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.sheet-handle-bar {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sheet-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.btn-sheet-close {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  color: #cbd5e1;
  font-size: 14px;
  cursor: pointer;
}

.sheet-form {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Model Preview Header in Modal */
.model-preview-row {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #090e1b;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 10px;
}

.model-thumbnail-wrapper {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #020617;
}

.preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-change-image {
  position: absolute;
  right: 2px;
  bottom: 2px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  padding: 2px 4px;
}

.model-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.platform-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
}

.preview-author-text {
  font-size: 12px;
  color: var(--text-dim);
}

.preview-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--accent-cyan);
  text-decoration: none;
}

/* Form inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.required {
  color: var(--accent-red);
}

.form-input, .form-textarea {
  width: 100%;
  background: #090f1d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-cyan);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Priority Pills Selector */
.priority-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.priority-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 38px;
  background: #090f1d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.priority-pill input {
  display: none;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pill-urgent .pill-dot { background: var(--priority-urgent); }
.pill-high .pill-dot { background: var(--priority-high); }
.pill-normal .pill-dot { background: var(--priority-normal); }
.pill-low .pill-dot { background: var(--priority-low); }

.priority-pill:has(input:checked) {
  border-color: #ffffff;
  color: #ffffff;
  background: #1e293b;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.pill-urgent:has(input:checked) {
  border-color: var(--priority-urgent);
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.pill-high:has(input:checked) {
  border-color: var(--priority-high);
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
}

.pill-normal:has(input:checked) {
  border-color: var(--priority-normal);
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
}

/* Status Pills */
.status-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.status-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  background: #090f1d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.status-pill input {
  display: none;
}

.status-pill:has(input:checked) {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
}

/* Accordion */
.print-specs-accordion {
  background: #080d19;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.accordion-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}

.accordion-summary::-webkit-details-marker {
  display: none;
}

.accordion-arrow {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.print-specs-accordion[open] .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* Sheet Actions */
.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-top: 8px;
}

.btn-modal {
  height: 46px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-modal-cancel {
  background: #1e293b;
  color: #94a3b8;
}

.btn-modal-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  background: #090f1d;
  border: 1px dashed rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-xl);
  margin-top: 10px;
}

.empty-graphic {
  margin-bottom: 12px;
}

.empty-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 320px;
  margin-bottom: 16px;
}

.empty-actions {
  display: flex;
  gap: 8px;
}

.btn-pill-sample {
  padding: 8px 14px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-pill-sample:hover {
  background: rgba(56, 189, 248, 0.25);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.btn-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Settings Modal Body
   ========================================================================== */
.settings-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-label {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.settings-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

.settings-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.btn-settings-action {
  flex: 1;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-settings-action:hover, .btn-settings-action:active {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.settings-version {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}

.toast {
  background: #1e293b;
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  animation: toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.toast.toast-success { border-color: var(--accent-emerald); }
.toast.toast-error { border-color: var(--accent-red); }
