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


body {
  font-family: system-ui, sans-serif;
  background-color: white;
  color: #1a1a1a;
  margin: 1rem;
}

h1 {
  font-size: 35px;
  font-weight: 800;
  margin-bottom: 4px;
}

button:is([visibility="hidden"]) {
  pointer-events: none !important;
}
*[disabled="true"] {
  user-select: none !important;
  cursor: not-allowed !important;
}
#hidden-item {
  display: none;
}
.panel > h2 > span {
  display: none !important;
}
#modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: -1px;
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999; /* ensures it stays above all content */
}
footer {
  bottom: 0;
  margin: 0 auto;
}

.main-container {
  padding: 1.5rem;
  display: flex;
}
h3 {
  font-size: 18px;
  font-weight: 500;
}
h2 {
  font-size: 25px;
  font-weight: 700;
}
.subtitle {
  font-size: 13px;
  color: #666;
  margin-bottom: 1.5rem;
}

/* Status bar */
.status-bar {
  margin-top: 10px;
  display: none;
}
.status-bar.visible {
  display: block;
}
.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.status-text {
  font-size: 11px;
}
.status-text.ok {
  color: #085041;
}
.status-text.err {
  color: #a32d2d;
}
.spinner {
  width: 13px;
  height: 13px;
  border: 2px solid #e0e0e0;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
  display: none;
}
.status-bar.loading .spinner {
  display: block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.progress-track {
  height: 4px;
  background: #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition:
    width 0.3s ease,
    background 0.3s;
  background: #183115;
}
.status-bar.ok .progress-fill {
  background: #1d9e75;
}
.status-bar.err .progress-fill {
  background: #e24b4a;
}
.status-bar.loading .progress-fill {
  background: #12681d;
}

/* Toolbar */
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}
.toolbar button {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 0.5px solid #ccc;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.toolbar button:hover {
  background: #f0f0f0;
}
.toolbar button:active {
  transform: scale(0.98);
}
.toolbar button.primary {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}
.toolbar button.primary:hover {
  background: #333;
}
.toolbar button.danger {
  border-color: #e24b4a;
  color: #a32d2d;
}
.toolbar button.danger:hover {
  background: #fcebeb;
}
.toolbar button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.divider {
  width: 0.5px;
    background: white;

  height: 28px;
  margin: 0 4px;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}
.stat {
    background: white;

  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}
.stat-num {
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 3px;
}
.stat-label {
  font-size: 11px;
  color: #666;
}
.stat-num.avail {
  color: #085041;
}
.stat-num.taken {
  color: #a32d2d;
}
.stat-num.busy {
  color: #633806;
}

/* Panel */
.panel {
    background: white;

  border: 0.5px solid #ddd;
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
}
.panel-header span {
  font-size: 13px;
  font-weight: 500;
}
.arrow {
  font-size: 11px;
  color: #888;
  display: inline-block;
  transition: transform 0.2s;
}
.arrow.open {
  transform: rotate(180deg);
}
.panel-body {
  display: none;
  border-top: 0.5px solid #ddd;
}

/* Checked list */
.checked-scroll {
  max-height: 300px;
  overflow-y: auto;
  border-bottom: 0.5px solid #eee;
}
.crow-wrapper {
  border-bottom: 0.5px solid #e8e8e8;
  background: #fff;
}
.crow-wrapper:last-child {
  border-bottom: none;
}
.crow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
}
.crow-num {
  font-size: 11px;
  color: #aaa;
  min-width: 22px;
  text-align: right;
  flex-shrink: 0;
}
.crow-name {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
}
.crow-cat {
  font-size: 11px;
  color: #888;
  min-width: 52px;
  flex-shrink: 0;
}
.ctag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.ctag-available {
   background: white;

  color: #085041;
}
.ctag-taken {
    background: white;

  color: #a32d2d;
}
.ctag-checking {
  background: white;

  color: #633806;
}
.ctag-pending {
   background: white;

  color: #aaa;
  border: 0.5px solid #ddd;
}
.crow-toggle {
  font-size: 10px;
  color: #bbb;
  cursor: pointer;
  padding: 0 2px;
  user-select: none;
  flex-shrink: 0;
  transition: color 0.15s;
}
.crow-toggle:hover {
  color: #555;
}
.crow-detail {
  display: none;
  padding: 6px 14px 10px 58px;
    background: white;

  border-top: 0.5px solid #f0f0f0;
}
.crow-detail.open {
  display: block;
}
.crow-detail-meaning {
  font-size: 12px;
  color: #444;
  line-height: 1.6;
}
.crow-detail-scripture {
  font-size: 11px;
  color: #aaa;
  font-style: italic;
  margin-top: 3px;
}
.crow-detail-loading {
  font-size: 11px;
  color: #633806;
  font-style: italic;
}

/* Grid cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 10px;
  padding: 14px;
}
.card {
  background: #fff;
  border: 0.5px solid #ddd;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card.available {
  border-left: 3px solid #1d9e75;
}
.card.checking {
  opacity: 0.5;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.uname {
  font-size: 15px;
  font-weight: 500;
}
.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}
.badge-greek {
  background: white;

  color: #3c3489;
}
.badge-english {
  background: white;

  color: #0c447c;
}
.badge-spanish {
   background: white;

  color: #8b3a00;
}
.badge-italian {
   background: white;

  color: #004a6e;
}
.badge-french {
   background: white;

  color: #1a3a7a;
}
.badge-tagalog {
  background: white;

  color: #7a5200;
}
.badge-latin {
  background: white;

  color: #4a3080;
}
.badge-hebrew {
  background: #e8f5e9;
  color: #1b5e20;
}
.badge-arabic {
    background: white;

  color: #880e4f;
}
.badge-manual {
   background: white;

  color: #666;
}
.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}
.tag-available {
   background: white;

  color: #085041;
}
.tag-checking {
    background: white;

  color: #633806;
}
.tag-pending {
  background: #fff;
  color: #aaa;
  border: 0.5px solid #ddd;
}
.meaning {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}
.scripture {
  font-size: 11px;
  color: #aaa;
  font-style: italic;
}
.card-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.card-actions button {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 0.5px solid #ccc;
  background: #fff;
  cursor: pointer;
}
.card-actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.card-actions button:not(:disabled):hover {
  background: #f0f0f0;
}
.copied {
  background: #e1f5ee !important;
  color: #085041 !important;
  border-color: #9fe1cb !important;
}
.empty {
  font-size: 14px;
  color: #aaa;
  padding: 2rem 0;
  text-align: center;
  grid-column: 1/-1;
}
.gen-msg {
  font-size: 13px;
  color: #633806;
  background: #faeeda;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 1rem;
  display: none;
}

/* Manual input */
.manual-box {
  background: #fff;
  border: 0.5px solid #ddd;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 1rem;
}
.manual-label {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 3px;
}
.manual-hint {
  font-size: 11px;
  color: #888;
  margin-bottom: 8px;
}
.manual-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.manual-row input {
  flex: 1;
  font-family: system-ui, sans-serif;
  font-size: 13px;
  border: 0.5px solid #ccc;
  border-radius: 8px;
  padding: 6px 10px;
  height: 34px;
  background: #fafafa;
}
.manual-row input.err {
  border-color: #e24b4a;
  background: #fff8f8;
}
.manual-row input.ok {
  border-color: #1d9e75;
  background: #f6fdf9;
}
.manual-row button {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 0.5px solid #ccc;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.manual-row button:hover {
  background: #f0f0f0;
}
.manual-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.manual-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  background: #eeedfe;
  color: #3c3489;
  border-radius: 20px;
  padding: 3px 10px 3px 12px;
}
.manual-tag button {
  font-size: 13px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: #3c3489;
  padding: 0;
  margin-left: 2px;
  opacity: 0.6;
}
.manual-tag button:hover {
  opacity: 1;
}
.manual-err {
  font-size: 11px;
  color: #a32d2d;
  margin-top: 5px;
  min-height: 16px;
}

/* Code block */
.code-wrap {
  position: relative;
}
.code-block {
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: 10px;
  padding: 16px;
  font-family: monospace;
  font-size: 12px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}
.copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 0.5px solid #555;
  background: #2d2d2d;
  color: #ccc;
  cursor: pointer;
}
.copy-code-btn:hover {
  background: #3d3d3d;
}
.kw {
  color: #569cd6;
}
.str {
  color: #ce9178;
}
.cmt {
  color: #6a9955;
}
.fn {
  color: #dcdcaa;
}
#under-construction {
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none; /* Standard syntax */
}
#csv-wrapper {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-top: 20px;
  height: 70vh; /* controls total height of the two columns */
  overflow: hidden; /* prevents the wrapper from expanding */
}

.csv-column {
  flex: 1;
  min-width: 0;
  overflow-y: auto; /* enables vertical scroll */
  overflow-x: hidden; /* prevents horizontal scrollbars */
  scroll-behavior: smooth;
  border: 1px solid #ddd;
  padding: 10px;
  background: #fff;
  overflow: auto;
}

/* Make tables readable */
.csv-column table {
  width: 100%;
  border-collapse: collapse;
}

.csv-column th,
.csv-column td {
  border: 1px solid #ccc;
  padding: 6px 10px;
  text-align: left;
}

.csv-column th {
  background: #f5f5f5;
  font-weight: bold;
}

/* Mobile: stack columns */
@media (max-width: 800px) {
  #csv-wrapper {
    flex-direction: column;
    height: auto;
  }

  .csv-column {
    max-height: 50vh;
  }
}
/* Prevent dark‑mode extensions from recoloring this section */
.force-light, #modal{

  --bg: #ffffff;
  --fg: #000000;
    color-scheme: light !important;
  background: var(--bg) !important;
}

#modal, .force-light * {
  background: var(--bg) !important;
  color: var(--fg) !important;
  border-color: #ccc !important;
}

.panel-body, .panel-title, .panel-header, .force-light * {
  background: var(--bg) !important;
  color: var(--fg) !important;
  border-color: #ccc !important;
}