/* ============================================================
   EU Design Group — Safety Compliance Portal
   Global Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --black:      #0a0a0a;
  --gray-dark:  #1a1a1a;
  --gray-mid:   #2e2e2e;
  --gray-light: #3e3e3e;
  --yellow:     #f5c400;
  --yellow-dark:#d4a800;
  --white:      #f5f0e8;
  --red:        #c8373a;
  --red-dark:   #a02e30;
  --green:      #2ecc71;
  --green-dark: #27ae60;
  --blue:       #3b82f6;
  --text-muted: #888;
  --border:     rgba(245,196,0,0.15);
  --radius:     8px;
  --radius-lg:  12px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.2s ease;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

a { color: var(--yellow); text-decoration: none; }
a:hover { color: var(--yellow-dark); }

img { max-width: 100%; }

/* ── Layout Utilities ────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border: none;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--yellow);
  color: var(--black);
}
.btn-primary:hover {
  background: var(--yellow-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245,196,0,0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200,55,58,0.35);
}

.btn-success {
  background: var(--green);
  color: #fff;
}
.btn-success:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--yellow);
  border: 1.5px solid var(--yellow);
}
.btn-ghost:hover {
  background: rgba(245,196,0,0.1);
  transform: translateY(-1px);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
}
.btn-icon:hover { color: var(--white); background: var(--gray-mid); }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--gray-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: var(--yellow);
}

/* ── Inputs ──────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input, select, textarea {
  background: var(--gray-mid);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  transition: border-color var(--transition);
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245,196,0,0.15);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

select option {
  background: var(--gray-dark);
  color: var(--white);
}

textarea { resize: vertical; min-height: 80px; }

.input-error {
  border-color: var(--red) !important;
}

.field-error {
  font-size: 0.8rem;
  color: var(--red);
  margin-top: 0.2rem;
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease;
}

.modal-content {
  background: var(--gray-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: var(--yellow);
  letter-spacing: 0.05em;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.3rem;
  border-radius: 4px;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--white); }

.modal-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* ── Toast Notifications ─────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  min-width: 260px;
  max-width: 380px;
  pointer-events: all;
  animation: toastIn 0.25s ease forwards;
  border-left: 4px solid;
}

.toast-success {
  background: #1a2e1a;
  border-color: var(--green);
  color: #a8f0c0;
}
.toast-error {
  background: #2e1a1a;
  border-color: var(--red);
  color: #f0a8a8;
}
.toast-info {
  background: #1a1f2e;
  border-color: var(--blue);
  color: #a8c0f0;
}
.toast-warning {
  background: #2e2a1a;
  border-color: var(--yellow);
  color: #f0e0a8;
}
.toast.removing {
  animation: toastOut 0.25s ease forwards;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-admin {
  background: rgba(245,196,0,0.15);
  color: var(--yellow);
  border: 1px solid rgba(245,196,0,0.3);
}

.badge-supervisor {
  background: rgba(59,130,246,0.15);
  color: #93c5fd;
  border: 1px solid rgba(59,130,246,0.3);
}

.badge-active {
  background: rgba(46,204,113,0.15);
  color: var(--green);
  border: 1px solid rgba(46,204,113,0.3);
}

.badge-inactive {
  background: rgba(200,55,58,0.15);
  color: #f0a8a8;
  border: 1px solid rgba(200,55,58,0.3);
}

/* ── Table ───────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  background: var(--gray-mid);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background var(--transition);
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(245,196,0,0.04); }

tbody td {
  padding: 0.9rem 1rem;
  color: var(--white);
  vertical-align: middle;
}

/* ── Toggle Switch ───────────────────────────────────────── */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-light);
  border-radius: 24px;
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
}

.toggle input:checked + .toggle-slider { background: var(--green); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Avatar ──────────────────────────────────────────────── */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Stats Cards ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--gray-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
}

.stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  color: var(--yellow);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.3rem;
}

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(245,196,0,0.2);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

.spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  gap: 1rem;
}

.loading-overlay p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Auth Pages (Login) ──────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse at top left, rgba(245,196,0,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(245,196,0,0.04) 0%, transparent 60%),
    var(--black);
}

.auth-card {
  background: var(--gray-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-logo {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-logo-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  color: var(--yellow);
  letter-spacing: 0.1em;
  line-height: 1;
}

.auth-logo-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.2rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  background: var(--gray-mid);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.1);
  width: 100%;
}
.btn-google:hover {
  background: var(--gray-light);
  border-color: rgba(255,255,255,0.2);
}

.btn-google img {
  width: 18px;
  height: 18px;
}

.error-message {
  background: rgba(200,55,58,0.12);
  border: 1px solid rgba(200,55,58,0.3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: #f0a8a8;
  margin-bottom: 1rem;
  display: none;
}

.error-message.show { display: block; }

/* ── Admin Layout ────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--gray-dark);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  color: var(--yellow);
  letter-spacing: 0.08em;
  line-height: 1;
}

.sidebar-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.2rem;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-item:hover {
  background: rgba(245,196,0,0.08);
  color: var(--white);
}

.sidebar-item.active {
  background: rgba(245,196,0,0.12);
  color: var(--yellow);
}

.sidebar-item .icon { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--border);
}

.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 2rem;
  min-height: 100vh;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.05em;
}

/* ── Supervisor Layout ───────────────────────────────────── */
.supervisor-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.supervisor-header {
  background: var(--gray-dark);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.supervisor-header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.supervisor-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  color: var(--yellow);
  letter-spacing: 0.08em;
}

.supervisor-talk-name {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.supervisor-talk-name strong {
  color: var(--white);
  font-weight: 600;
}

.supervisor-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 60px);
}

.pdf-panel {
  flex: 0 0 60%;
  background: #111;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdf-toolbar {
  background: var(--gray-dark);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.pdf-page-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0.5rem;
}

.pdf-canvas-wrapper {
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
  background: #222;
}

#pdf-canvas {
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
  max-width: 100%;
}

.attendance-panel {
  flex: 0 0 40%;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--black);
}

.session-info-box {
  background: var(--gray-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.qr-box {
  background: var(--gray-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.qr-box h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  color: var(--yellow);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

#qr-code-container {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0;
}

#qr-code-container canvas,
#qr-code-container img {
  border: 8px solid #fff;
  border-radius: 4px;
}

.token-url {
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-all;
  background: var(--gray-mid);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  margin-top: 0.5rem;
  text-align: left;
}

.attendee-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.attendee-item {
  background: var(--gray-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.attendee-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  color: var(--yellow);
  min-width: 24px;
}

.attendee-name {
  flex: 1;
  font-weight: 500;
}

.attendee-sig {
  width: 60px;
  height: 30px;
  object-fit: contain;
  background: #fff;
  border-radius: 3px;
}

.attendee-check {
  color: var(--green);
  font-size: 1rem;
}

.attendee-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.attendee-source {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  background: var(--gray-mid);
  color: var(--text-muted);
}

.session-history {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.session-item {
  background: var(--gray-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.session-main {
  min-width: 0;
}

.session-title {
  font-weight: 600;
}

.session-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.session-actions {
  display: flex;
  gap: 0.4rem;
}

@media (max-width: 900px) {
  .session-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Employee Page ───────────────────────────────────────── */
.employee-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.employee-header {
  text-align: center;
  padding: 1.5rem 1rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.pdf-pages-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.pdf-pages-wrapper canvas {
  max-width: 100%;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.signature-section {
  background: var(--gray-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.sig-canvas-wrapper {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0.75rem 0;
  border: 2px dashed var(--gray-mid);
  cursor: crosshair;
}

.sig-canvas-wrapper canvas {
  display: block;
  width: 100%;
  height: 160px;
  touch-action: none;
}

.sig-canvas-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.confirmation-screen {
  text-align: center;
  padding: 3rem 2rem;
}

.checkmark-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(46,204,113,0.15);
  border: 3px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ── Report Page ─────────────────────────────────────────── */
.report-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: #fff;
  color: #000;
  font-family: 'DM Sans', sans-serif;
}

.report-toolbar {
  background: var(--gray-dark);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.report-content {
  background: #fff;
  color: #000;
  padding: 2rem;
  max-width: 860px;
  margin: 0 auto;
}

.report-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #000;
}

.report-company-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  color: #000;
  letter-spacing: 0.08em;
  line-height: 1;
}

.report-doc-title {
  text-align: right;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #333;
  line-height: 1.4;
}

.report-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.report-info-row {
  display: flex;
  gap: 0.5rem;
}

.report-info-label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  min-width: 90px;
  color: #555;
}

.report-info-value {
  font-weight: 500;
  color: #000;
}

.report-topics {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.report-topics strong {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  display: block;
  margin-bottom: 0.3rem;
  color: #555;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}

.report-table th {
  background: #222;
  color: #fff;
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.report-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #ddd;
  vertical-align: middle;
}

.report-table tr:nth-child(even) td { background: #fafafa; }

.report-table .sig-cell img {
  max-height: 40px;
  max-width: 120px;
  object-fit: contain;
}

.report-disclaimer {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #444;
  column-count: 2;
  column-gap: 1.5rem;
}

.report-disclaimer strong { display: block; margin-bottom: 0.3rem; }

/* ── Convert PDFs Page ───────────────────────────────────── */
.convert-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.drop-zone {
  border: 2px dashed rgba(245,196,0,0.4);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  background: var(--gray-dark);
}

.drop-zone.dragover {
  border-color: var(--yellow);
  background: rgba(245,196,0,0.06);
}

.drop-zone h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: var(--yellow);
  margin-bottom: 0.5rem;
}

.drop-zone p { color: var(--text-muted); font-size: 0.9rem; }

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.slot-card {
  background: var(--gray-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  position: relative;
}

.slot-card.filled {
  border-color: var(--green);
  background: rgba(46,204,113,0.05);
}

.slot-index {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: var(--yellow);
  line-height: 1;
}

.slot-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.3rem 0 0.75rem;
}

.slot-status {
  font-size: 0.78rem;
  font-weight: 600;
}

.slot-card.filled .slot-status { color: var(--green); }
.slot-card:not(.filled) .slot-status { color: var(--text-muted); }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes toastOut {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

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

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .supervisor-body {
    flex-direction: column;
    height: auto;
  }
  .pdf-panel, .attendance-panel {
    flex: none;
    width: 100%;
  }
  .pdf-panel { height: 50vh; }
  .attendance-panel { height: auto; max-height: 60vh; overflow-y: auto; }
}

@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-nav { flex-direction: row; overflow-x: auto; padding: 0.5rem; }
  .sidebar-item { white-space: nowrap; flex-shrink: 0; }
  .main-content { margin-left: 0; padding: 1rem; }

  .report-info-grid { grid-template-columns: 1fr; }
  .report-disclaimer { column-count: 1; }
  .report-header-row { flex-direction: column; gap: 0.75rem; }
  .report-doc-title { text-align: left; }

  .modal-content { padding: 1.5rem; }
  .auth-card { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
}

/* ── Print Styles ────────────────────────────────────────── */
@media print {
  .report-toolbar,
  .btn,
  .no-print { display: none !important; }

  body {
    background: #fff;
    color: #000;
  }

  .report-content {
    padding: 0;
    max-width: 100%;
  }

  .report-table th {
    background: #222 !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-table tr:nth-child(even) td {
    background: #fafafa !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  @page {
    size: Letter portrait;
    margin: 0.75in;
  }
}

/* ── Checkbox Styles ─────────────────────────────────────── */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--gray-mid);
  border-radius: var(--radius);
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  cursor: pointer;
  accent-color: var(--yellow);
  margin-top: 0.15rem;
}

.checkbox-group span {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ── Scroll to unlock indicator ──────────────────────────── */
.scroll-indicator {
  position: sticky;
  bottom: 1rem;
  text-align: center;
  pointer-events: none;
}

.scroll-indicator-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(10,10,10,0.9);
  border: 1px solid var(--yellow);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  color: var(--yellow);
  animation: pulse 2s ease-in-out infinite;
}

/* ── Fullscreen styles ───────────────────────────────────── */
.pdf-panel:-webkit-full-screen { background: #000; }
.pdf-panel:-moz-full-screen    { background: #000; }
.pdf-panel:fullscreen          { background: #000; }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.9rem; }

/* ── Token display ───────────────────────────────────────── */
.token-display {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--yellow);
  letter-spacing: 0.2em;
  text-align: center;
  background: var(--gray-mid);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
}
