/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #fed557;
  --primary-dark: #e6b800;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f0f0f0;
  padding: 1rem;
}

/* Print Button */
.print-btn {
  position: fixed;
  top: 0.75rem;
    right: 0.75rem;
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--primary);
    color: #333;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  z-index: 100;
  transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.print-btn:hover {
  background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  
  .print-btn:active {
    transform: translateY(0);
}

.print-btn:disabled {
  background: #ddd;
    color: #999;
  cursor: not-allowed;
  box-shadow: none;
    transform: none;
}

/* Pages Container */
#pages-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: 3.5rem;
}

/* Empty State */
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4in;
  height: 6in;
  background: white;
  border-radius: 8px;
    color: #bbb;
    font-size: 0.95rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Page */
.page {
  width: 4in;
  height: 6in;
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Sticker Row */
.sticker-row {
  height: 0.6in;
  border-bottom: 0.5px dashed #ddd;
  display: grid;
  grid-template-columns: 0.9in 1.8in 0.6in;
  padding: 0 0.3in;
  align-content: center;
  justify-content: space-between;
  gap: 0;
}

.sticker-row:last-child {
  border-bottom: none;
}

/* Column */
.sticker-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.sticker-col.col-code {
  /* First column: student_code */
}

.sticker-col.col-name {
  /* Second column: full_name */
}

.sticker-col.col-nickname {
  /* Third column: nickname */
}

/* Header text (small, muted) */
.sticker-header {
  font-size: 7pt;
  color: #888;
  line-height: 1.6;
  white-space: nowrap;
  overflow: visible;
}

/* Value text */
.sticker-value {
  font-size: 10pt;
  color: #000;
  line-height: 1.6;
  white-space: nowrap;
  overflow: visible;
}

/* ========== PRINT STYLES ========== */
@media print {
  /* Hide print button */
  .print-btn {
    display: none !important;
  }

  /* Reset body for print */
  body {
    background: white;
    padding: 0;
    margin: 0;
  }

  /* Page setup: 4x6 inches, no margins */
  @page {
    size: 4in 6in;
    margin: 0;
  }

  /* Pages container */
  #pages-container {
    padding: 0;
    gap: 0;
  }

  /* Hide empty state when printing */
  .empty-state {
    display: none !important;
  }

  /* Each page */
  .page {
    width: 4in;
    height: 6in;
    box-shadow: none;
    border-radius: 0;
    page-break-after: always;
    break-after: page;
  }

  .page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  /* Sticker row border for cutting guide */
  .sticker-row {
    border-bottom: 0.5px dashed #ddd;
  }

  .sticker-row:last-child {
    border-bottom: none;
  }
}
