/* ==========================================================================
   PANEL AND LAYOUT
   ========================================================================== */

.panel {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 106, 0, 0.25);
  background: #09090d;
  overflow: hidden;
  animation: fadeUp 0.8s var(--ease) both;
  animation-delay: 0.1s;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 0.9fr);
}

.panel-card {
  padding: 14px;
  background: rgba(4, 4, 6, 0.45);
}

.panel-card + .panel-card {
  border-left: 1px solid rgba(255, 106, 0, 0.12);
}

.panel-card--preview {
  background-color: #0c0c10;
  display: grid;
  gap: 16px;
  align-content: start;
}

/* ==========================================================================
   TYPOGRAPHY AND HEADERS
   ========================================================================== */

.section-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 11px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.section-sub {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
  margin-bottom: 10px;
}

/* ==========================================================================
   FORM CONTROLS AND INPUTS
   ========================================================================== */

.field {
  margin-bottom: 12px;
}

.label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 106, 0, 0.18);
  background: rgba(6, 6, 9, 0.9);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ff6a00'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  cursor: pointer;
  font-size: 13px;
}

.select:hover {
  border-color: rgba(255, 106, 0, 0.4);
}

.select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mode-hint {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 106, 0, 0.03);
  border-left: 3px solid var(--accent);
}

.mode-hint strong {
  color: var(--text);
  font-weight: 600;
}

/* ==========================================================================
   FILE DROP ZONE
   ========================================================================== */

.drop-zone {
  border-radius: 14px;
  border: 2px dashed rgba(255, 106, 0, 0.22);
  background: rgba(4, 4, 6, 0.8);
  padding: 12px 14px;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.drop-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 106, 0, 0.06), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.drop-zone:hover {
  border-color: rgba(255, 106, 0, 0.55);
  transform: translateY(-1px);
  background: rgba(8, 8, 12, 0.95);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.drop-zone:hover::before {
  opacity: 1;
}

.drop-zone.is-dragover {
  border-color: var(--accent-2);
  background: rgba(255, 106, 0, 0.08);
  box-shadow: 0 0 24px rgba(255, 106, 0, 0.2);
  transform: scale(0.99) translateY(0);
}

.drop-inner {
  text-align: center;
  display: grid;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.drop-inner::before {
  content: "";
  display: block;
  width: 30px;
  height: 30px;
  margin: 0 auto 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ff6a00'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s var(--ease);
}

.drop-zone:hover .drop-inner::before {
  transform: translateY(-2px);
}

.drop-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13.5px;
  color: #ffffff;
}

.drop-sub {
  color: var(--muted);
  font-size: 12px;
}

.file-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 4px;
}

#fileName {
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.input--hidden {
  display: none;
}

/* ==========================================================================
   TOGGLE COMPONENT
   ========================================================================== */

.toggle-field {
  margin-top: 12px;
  padding: 4px 0;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  position: relative;
  user-select: none;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s var(--ease);
}

.toggle:hover .toggle-track {
  border-color: rgba(255, 106, 0, 0.4);
}

.toggle input:checked + .toggle-track {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: rgba(255, 106, 0, 0.5);
  box-shadow: 0 0 12px rgba(255, 106, 0, 0.25);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(18px);
  background: #ffffff;
}

.toggle-text {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  transition: color 0.2s ease;
}

.toggle:hover .toggle-text {
  color: var(--text);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.action-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 500px) {
  .action-row {
    grid-template-columns: 1fr;
  }
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  transition: all 0.3s var(--ease);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none !important;
  transform: none !important;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.4);
}

.btn.primary {
  width: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #050508;
  box-shadow: 0 10px 24px rgba(255, 106, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(255, 106, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn.primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn.ghost:hover:not(:disabled) {
  background: rgba(255, 106, 0, 0.08);
  border-color: rgba(255, 106, 0, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn.ghost:active:not(:disabled) {
  transform: translateY(0);
}

.btn.accent {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-2) 0%, #ff7700 100%);
  color: #050508;
  box-shadow: 0 8px 20px rgba(255, 157, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn.accent:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 157, 0, 0.38);
}

.btn-small {
  padding: 8px 16px;
  font-size: 11.5px;
  font-weight: 500;
}

/* ==========================================================================
   STATUS AND PROGRESS BLOCK
   ========================================================================== */

.status-block {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(8, 8, 12, 0.75);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.status-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13.5px;
  color: #ffffff;
}

.elapsed {
  font-size: 11px;
  color: var(--muted-2);
  font-weight: 500;
}

#elapsedTime, #etaText {
  color: var(--muted);
  font-family: monospace;
}

.status-text {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.status-text--idle {
  color: var(--muted);
}

.status-text--ok {
  color: #10b981;
  text-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.status-text--warn {
  color: var(--accent-2);
  text-shadow: 0 0 12px rgba(255, 157, 0, 0.2);
}

.status-text--err {
  color: #ef4444;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}

.progress-text {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 0 8px var(--accent);
  transition: width 0.2s ease-out;
}

/* ==========================================================================
   PREVIEW CONTAINER
   ========================================================================== */

.preview-card {
  padding: 20px;
  border-radius: 18px;
  background: rgba(8, 8, 12, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 16px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13.5px;
  color: #ffffff;
}

.preview-body {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 106, 0, 0.12);
  background: rgba(4, 4, 6, 0.95);
}

.preview-empty {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  background: rgba(8, 8, 12, 0.35);
  transition: all 0.3s var(--ease);
}

.preview-canvas-container {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
}

.preview-canvas {
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-canvas:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.8), 0 0 18px rgba(255, 106, 0, 0.3);
  border-color: rgba(255, 106, 0, 0.35);
}

/* ==========================================================================
   MOCKUP E EFEITOS DE ESTADO VAZIO
   ========================================================================== */

.mock-label-container {
  position: relative;
  width: 130px;
  height: 195px;
  background: #050508;
  border: 1px dashed rgba(255, 106, 0, 0.25);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.mock-label {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0.12;
  transition: opacity 0.3s var(--ease);
}

.mock-label-container:hover .mock-label {
  opacity: 0.2;
}

.mock-label-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.mock-label-logo {
  font-family: var(--font-head);
  font-size: 6.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.mock-label-shopee {
  font-size: 5.5px;
  font-weight: 600;
  color: var(--muted-2);
}

.mock-label-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 4px;
}

.mock-label-line {
  height: 2.5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 1px;
}

.mock-label-line.long { width: 100%; }
.mock-label-line.medium { width: 70%; }
.mock-label-line.short { width: 40%; }

.mock-label-row {
  display: flex;
  gap: 4px;
  margin: 1px 0;
}

.mock-label-qr {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08) 2px, transparent 2px, transparent 4px);
  border-radius: 2px;
}

.mock-label-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
}

.mock-label-barcode {
  display: flex;
  gap: 1px;
  height: 16px;
  align-items: stretch;
  justify-content: center;
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.barcode-bar {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 0.5px;
}

.barcode-bar.b1 { width: 1px; }
.barcode-bar.b2 { width: 1.5px; }
.barcode-bar.b3 { width: 2.5px; }
.barcode-bar.b4 { width: 3.5px; }

/* Linha do Scanner a Laser */
.mock-label-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, var(--accent) 50%, transparent 95%);
  box-shadow: 0 0 10px var(--accent), 0 0 4px var(--accent-2);
  animation: scan 4.5s infinite linear;
  pointer-events: none;
}

@keyframes scan {
  0% { top: 0%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Overlay de Texto da Etiqueta */
.empty-placeholder-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(4, 4, 6, 0.35);
  backdrop-filter: blur(0.5px);
  -webkit-backdrop-filter: blur(0.5px);
  padding: 8px;
  pointer-events: none;
}

.placeholder-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 10px;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
}

.placeholder-subtext {
  font-size: 8.5px;
  color: var(--muted);
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
  max-width: 110px;
}

/* Animação no Dropzone Cloud Icon */
.drop-inner::before {
  animation: cloudPulse 3.5s infinite ease-in-out;
}

@keyframes cloudPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
  50% { transform: scale(1.08) translateY(-2px); filter: drop-shadow(0 0 8px rgba(255, 106, 0, 0.55)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
}

/* ==========================================================================
   THUMBNAILS AND GRID
   ========================================================================== */

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.thumb {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 4, 6, 0.85);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s var(--ease);
  position: relative;
  aspect-ratio: 2 / 3;
}

.thumb:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(255, 106, 0, 0.2);
}

.thumb canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #ffffff;
}

.thumb-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(5, 5, 8, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10px;
  font-weight: 600;
  color: #ffffff;
  font-family: monospace;
}

/* ==========================================================================
   SUMMARY COMPONENT
   ========================================================================== */

.summary {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(8, 8, 12, 0.85);
  border: 1px solid rgba(255, 106, 0, 0.15);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  display: grid;
  gap: 12px;
}

.summary-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 500px) {
  .summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.summary-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  margin-bottom: 6px;
}

.summary-value {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#summaryMode {
  color: var(--accent-2);
}

.summary .btn-small {
  margin-top: 4px;
}

/* ==========================================================================
   TIPS / ADVISORIES
   ========================================================================== */

.tips {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 106, 0, 0.03);
  color: var(--text);
  border: 1px solid rgba(255, 106, 0, 0.12);
}

.tips-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  color: #ffffff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tips-title::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ff6a00'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.tips ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.tips li {
  margin-bottom: 6px;
}

.tips li:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   TOASTS / NOTIFICATIONS
   ========================================================================== */

.toasts {
  position: fixed;
  right: 24px;
  bottom: 28px;
  display: grid;
  gap: 12px;
  z-index: 100;
  max-width: 360px;
  width: calc(100vw - 48px);
}

.toast {
  background: rgba(10, 10, 15, 0.95);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
  color: var(--text);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: all 0.3s var(--ease);
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
}

.toast--show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast--ok {
  border-left: 4px solid #10b981;
  border-color: rgba(16, 185, 129, 0.25) rgba(16, 185, 129, 0.25) rgba(16, 185, 129, 0.25) #10b981;
}

.toast--ok::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2310b981'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E");
}

.toast--warn {
  border-left: 4px solid var(--accent-2);
  border-color: rgba(255, 157, 0, 0.25) rgba(255, 157, 0, 0.25) rgba(255, 157, 0, 0.25) var(--accent-2);
}

.toast--warn::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ff9d00'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z'/%3E%3C/svg%3E");
}

.toast--err {
  border-left: 4px solid #ef4444;
  border-color: rgba(239, 68, 68, 0.25) rgba(239, 68, 68, 0.25) rgba(239, 68, 68, 0.25) #ef4444;
}

.toast--err::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ef4444'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E");
}

/* ==========================================================================
   MODAL IMAGE VIEWER
   ========================================================================== */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 5, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.viewer-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: 90vh;
  border-radius: 20px;
  background: rgba(10, 10, 14, 0.95);
  border: 1px solid rgba(255, 106, 0, 0.2);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.9);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  animation: modalScaleUp 0.4s var(--ease) both;
}

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

.viewer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 106, 0, 0.12);
  background: rgba(6, 6, 9, 0.5);
}

.viewer-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
}

.viewer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.viewer-scale {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  font-family: monospace;
  min-width: 44px;
  text-align: center;
}

.viewer-body {
  padding: 24px;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(4, 4, 6, 0.7);
}

.viewer-canvas {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  background: #ffffff;
  border-radius: 8px;
}

/* ==========================================================================
   FOOTER AND EXTRA
   ========================================================================== */

.footer-note {
  text-align: center;
  margin: 16px auto 8px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted-2);
  letter-spacing: 0.03em;
  font-family: var(--font-body);
}

.footer-highlight {
  color: var(--accent);
  font-weight: 600;
}

/* ==========================================================================
   MEDIA QUERY BREAKPOINTS
   ========================================================================== */

@media (max-width: 1150px) {
  .panel-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  }
  .panel-card--extra {
    grid-column: span 2;
    border-top: 1px solid rgba(255, 106, 0, 0.12);
    border-left: none !important;
  }
}

@media (max-width: 768px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }
  
  .panel-card {
    padding: 22px;
  }
  
  .panel-card--extra {
    grid-column: span 1;
  }
  
  .panel-card + .panel-card {
    border-left: none;
    border-top: 1px solid rgba(255, 106, 0, 0.12);
  }
  
  .summary-grid {
    grid-template-columns: 1fr;
  }
}
