* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: #434343;
  background: #f6f7f9;
  line-height: 1.5;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: #fff; border-bottom: 1px solid #e6e8eb;
}
.brand { font-weight: 700; }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a { color: #434343; text-decoration: none; padding: 6px 8px; border-radius: 4px; }
.topbar nav a:hover { background: #f0f1f4; }
.topbar nav a.active { color: #000; font-weight: 600; }
.topbar .user { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #6b7280; }
.topbar .user img { width: 28px; height: 28px; border-radius: 50%; }
.topbar .logout { font-size: 14px; color: #6b7280; }
main { max-width: 1100px; margin: 32px auto; padding: 0 24px; }
.card { background: #fff; border-radius: 8px; padding: 32px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.card.centered { text-align: center; max-width: 480px; margin: 80px auto; }
h1 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
h2 { font-size: 18px; font-weight: 600; margin: 20px 0 8px; }
.muted { color: #6b7280; font-size: 14px; }
.btn-primary, .btn-secondary {
  display: inline-block; padding: 10px 20px; border-radius: 6px;
  text-decoration: none; font-weight: 500; font-size: 14px; cursor: pointer;
  border: none; font-family: inherit;
}
.btn-primary { background: #000; color: #fff; margin: 16px 8px; }
.btn-primary:hover { background: #1a1a1a; }
.btn-secondary { background: #f0f1f4; color: #434343; margin: 16px 8px; }
.btn-secondary:hover { background: #e6e8eb; }
.btn-link { color: #2563eb; text-decoration: none; padding: 6px 8px; font-size: 14px; }
.btn-link:hover { text-decoration: underline; }
.btn-toggle {
  background: #000; color: #fff; padding: 6px 14px; border-radius: 4px;
  border: none; cursor: pointer; font-size: 13px; font-family: inherit;
}
.btn-toggle:hover { background: #1a1a1a; }
.btn-toggle:disabled { opacity: 0.5; cursor: wait; }
.status-pending { background: #fff7ed; padding: 20px; border-radius: 6px; border-left: 4px solid #f59e0b; }
.status-ready { background: #eff6ff; padding: 20px; border-radius: 6px; border-left: 4px solid #2563eb; }
.status-ready .actions { margin-top: 12px; }
table.reports { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
table.reports th, table.reports td { padding: 10px 12px; border-bottom: 1px solid #e6e8eb; text-align: left; vertical-align: middle; }
table.reports th { font-weight: 600; color: #6b7280; font-size: 12px; text-transform: uppercase; }
table.reports.compact th, table.reports.compact td { padding: 8px 10px; white-space: nowrap; }
table.reports .right { text-align: right; }
table.reports .actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.badge { padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; display: inline-block; }
.badge.nowrap { white-space: nowrap; }
.badge-released { background: #dbeafe; color: #1e40af; }
.badge-pending { background: #fef3c7; color: #92400e; white-space: nowrap; }
.small { font-size: 12px; }

/* Icon-only buttons with hover tooltips */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: #f0f1f4; color: #434343; border: none; border-radius: 4px;
  cursor: pointer; text-decoration: none; font-size: 14px;
  transition: background 0.15s;
}
.icon-btn:hover { background: #2563eb; color: #fff; }
footer { text-align: center; padding: 24px; color: #6b7280; font-size: 12px; }

/* Search form */
.search-form { display: flex; gap: 8px; margin: 16px 0; }
.search-form input {
  flex: 1; padding: 10px 14px; border: 1px solid #e6e8eb; border-radius: 6px;
  font-family: inherit; font-size: 14px; color: #434343;
}
.search-form input:focus { outline: 2px solid #2563eb; border-color: transparent; }
.search-form .btn-primary, .search-form .btn-secondary { margin: 0; }

/* PDF preview modal */
.pdf-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.pdf-modal-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.6);
}
.pdf-modal-content {
  position: relative; background: #fff; border-radius: 8px; overflow: hidden;
  width: 90vw; max-width: 900px; height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.pdf-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: #f6f7f9; border-bottom: 1px solid #e6e8eb;
  font-weight: 500;
}
.pdf-modal-header > div { display: flex; gap: 8px; }
.pdf-modal-header button { background: none; border: none; cursor: pointer; font-family: inherit; }
#pdf-modal-frame { flex: 1; width: 100%; border: none; }
