@import url('https://fonts.googleapis.com/css2?family=Jua:wght@400;600;700&display=swap');

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Jua", sans-serif;

  /* Chrome and Opera */
  user-select: none;

  /* Safari */
  -webkit-user-select: none;

  /* Konqueror HTML */
  -khtml-user-select: none;

  /* Firefox */
  -moz-user-select: none;

  /* Internet Explorer/Edge */
  -ms-user-select: none;
}

:link {
  color: #6f6;
}

:visited {
  color: #66f;
}

/* THEMES */
:root,
[data-theme="classic"] {
  --brand: #ccffcc;
  --brand-mid: #a8f0a8;
  --brand-deep: #6dcf6d;
  --brand-text: #1a4d1a;
  --bg: #f0fff0;
  --bg2: #e4fce4;
  --glass-bg: rgba(204, 255, 204, 0.35);
  --glass-border: rgba(204, 255, 204, 0.6);
  --glass-shadow: rgba(109, 207, 109, 0.15);
  --text: #1a2e1a;
  --text-muted: #4a7a4a;
  --valid-bg: rgba(204, 255, 204, 0.5);
  --invalid-bg: rgba(255, 200, 200, 0.5);
  --notfound-bg: rgba(255, 235, 180, 0.5);
}

[data-theme="notgreen1"] {
  --brand: #ffcccc;
  --brand-mid: #f0a8a8;
  --brand-deep: #cf6d6d;
  --brand-text: #4d1a1a;
  --bg: #fff0f0;
  --bg2: #fce4e4;
  --glass-bg: rgba(255, 204, 204, 0.35);
  --glass-border: rgba(255, 204, 204, 0.6);
  --glass-shadow: rgba(207, 109, 109, 0.15);
  --text: #2e1a1a;
  --text-muted: #7a4a4a;
  --valid-bg: rgba(204, 255, 204, 0.5);
  --invalid-bg: rgba(255, 200, 200, 0.5);
  --notfound-bg: rgba(255, 235, 180, 0.5);
}

[data-theme="notgreen2"] {
  --brand: #ccccff;
  --brand-mid: #a8a8f0;
  --brand-deep: #6d6dcf;
  --brand-text: #1a1a4d;
  --bg: #f0f0ff;
  --bg2: #e4e4fc;
  --glass-bg: rgba(204, 204, 255, 0.35);
  --glass-border: rgba(204, 204, 255, 0.6);
  --glass-shadow: rgba(109, 109, 207, 0.15);
  --text: #1a1a2e;
  --text-muted: #4a4a7a;
  --valid-bg: rgba(204, 255, 204, 0.5);
  --invalid-bg: rgba(255, 200, 200, 0.5);
  --notfound-bg: rgba(255, 235, 180, 0.5);
}

[data-theme="notgreen3"] {
  --brand: #ffffcc;
  --brand-mid: #f0f0a8;
  --brand-deep: #cfcf6d;
  --brand-text: #4d4d1a;
  --bg: #fffff0;
  --bg2: #fcfce4;
  --glass-bg: rgba(255, 255, 204, 0.35);
  --glass-border: rgba(255, 255, 204, 0.6);
  --glass-shadow: rgba(207, 207, 109, 0.15);
  --text: #2e2e1a;
  --text-muted: #7a7a4a;
  --valid-bg: rgba(204, 255, 204, 0.5);
  --invalid-bg: rgba(255, 200, 200, 0.5);
  --notfound-bg: rgba(255, 235, 180, 0.5);
}

[data-theme="notgreen4"] {
  --brand: #ffccff;
  --brand-mid: #f0a8f0;
  --brand-deep: #cf6dcf;
  --brand-text: #4d1a4d;
  --bg: #fff0ff;
  --bg2: #fce4fc;
  --glass-bg: rgba(255, 204, 255, 0.35);
  --glass-border: rgba(255, 204, 255, 0.6);
  --glass-shadow: rgba(207, 109, 207, 0.15);
  --text: #2e1a2e;
  --text-muted: #7a4a7a;
  --valid-bg: rgba(204, 255, 204, 0.5);
  --invalid-bg: rgba(255, 200, 200, 0.5);
  --notfound-bg: rgba(255, 235, 180, 0.5);
}

[data-theme="notgreen5"] {
  --brand: #ccffff;
  --brand-mid: #a8f0f0;
  --brand-deep: #6dcfcf;
  --brand-text: #1a4d4d;
  --bg: #f0ffff;
  --bg2: #e4fcfc;
  --glass-bg: rgba(204, 255, 255, 0.35);
  --glass-border: rgba(204, 255, 255, 0.6);
  --glass-shadow: rgba(109, 207, 207, 0.15);
  --text: #1a2e2e;
  --text-muted: #4a7a7a;
  --valid-bg: rgba(204, 255, 204, 0.5);
  --invalid-bg: rgba(255, 200, 200, 0.5);
  --notfound-bg: rgba(255, 235, 180, 0.5);
}

[data-theme="white"] {
  --brand: #ffffff;
  --brand-mid: #f0f0f0;
  --brand-deep: #cccccc;
  --brand-text: #333333;
  --bg: #fafafa;
  --bg2: #f5f5f5;
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: rgba(0, 0, 0, 0.08);
  --text: #222222;
  --text-muted: #666666;
  --valid-bg: rgba(204, 255, 204, 0.5);
  --invalid-bg: rgba(255, 200, 200, 0.5);
  --notfound-bg: rgba(255, 235, 180, 0.5);
}

/* RESET & BASE */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Jua', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}


/* GLASS UTILITY */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 8px 32px var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-right: none;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-badge {
  font-family: 'Jua', sans-serif;
  background: var(--brand-deep);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.brand-badge.lg {
  font-size: 1.1rem;
  padding: 0.3rem 0.8rem;
}

.brand-name {
  font-family: 'Jua', sans-serif;
  font-size: 1.3rem;
  color: var(--brand-text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* BUTTONS */
.btn-primary {
  font-family: 'Jua', sans-serif;
  background: var(--brand-deep);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.65rem 1.4rem;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
  box-shadow: 0 4px 14px var(--glass-shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--glass-shadow);
}

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

.btn-primary.full {
  width: 100%;
}

.btn-ghost {
  font-family: 'Jua', sans-serif;
  background: transparent;
  border: 2px solid var(--brand-deep);
  color: var(--brand-text);
  border-radius: 12px;
  padding: 0.6rem 1.3rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-ghost:hover {
  background: var(--glass-bg);
  transform: translateY(-1px);
}

.btn-profile {
  font-family: 'Jua', sans-serif;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--glass-bg);
  border: 2px solid var(--brand-deep);
  color: var(--brand-text);
  padding: 0.4rem 0.85rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-profile:hover {
  background: var(--brand-mid);
  transform: translateY(-1px);
}

.btn-profile i {
  font-size: 1.1rem;
}

.btn-icon {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 8px;
  transition: background 0.2s;
  color: var(--text);
}

.btn-icon:hover {
  background: var(--glass-bg);
}

.btn-danger {
  font-family: 'Jua', sans-serif;
  background: #e05555;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.65rem 1.4rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-danger:hover {
  background: #c43f3f;
  transform: translateY(-1px);
}

/* INPUTS */
.input-glass {
  font-family: 'Jua', sans-serif;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(8px);
}

.input-glass:focus {
  border-color: var(--brand-deep);
  box-shadow: 0 0 0 3px rgba(109, 207, 109, 0.2);
}

.input-glass::placeholder {
  color: var(--text-muted);
}

textarea.input-glass {
  resize: vertical;
}

select.input-glass {
  appearance: none;
  cursor: pointer;
}

/* HERO */
#publicSection {
  position: relative;
  z-index: 1;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
}

.hero-content {
  flex: 1;
  max-width: 560px;
}

.hero-badge {
  display: inline-block;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}

.hero-title {
  font-family: 'Jua', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.hero-title .accent {
  color: var(--brand-deep);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.or-divider {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.id-input-row {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  min-width: 280px;
}

.id-input-row .input-glass {
  min-width: 0;
  flex: 1;
  font-family: 'Jua', sans-serif;
  letter-spacing: 0.05em;
}

/* HERO VISUAL */
.hero-visual {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  animation: floatIn 0.8s ease both;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.float-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-radius: 18px;
  min-width: 280px;
  animation: floatBob 4s ease-in-out infinite;
}

.fc-2 {
  animation-delay: 2s;
}

@keyframes floatBob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.fc-icon {
  font-size: 2rem;
}

.fc-title {
  font-family: 'Jua', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
}

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

/* RESULT SECTION */
.result-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.result-card {
  width: 100%;
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  animation: fadeUp 0.4s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-card.valid {
  background: var(--valid-bg);
}

.result-card.invalid {
  background: var(--invalid-bg);
}

.result-card.notfound {
  background: var(--notfound-bg);
}

.result-icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
}

.result-status {
  font-family: 'Jua', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.result-fields {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-field {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.result-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  min-width: 110px;
}

.result-value {
  font-weight: 700;
  color: var(--text);
}

.result-timestamp {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.mt-2 {
  margin-top: 0.5rem;
}

/* SCANNER */
#scannerContainer {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  width: 100%;
  aspect-ratio: 1;
  max-width: 320px;
  margin: 0 auto;
}

#scannerVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scanner-frame {
  position: absolute;
  inset: 24px;
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--brand);
  border-style: solid;
}

.corner.tl {
  top: 0;
  left: 0;
  border-width: 3px 0 0 3px;
}

.corner.tr {
  top: 0;
  right: 0;
  border-width: 3px 3px 0 0;
}

.corner.bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 3px 3px;
}

.corner.br {
  bottom: 0;
  right: 0;
  border-width: 0 3px 3px 0;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--brand-deep);
  box-shadow: 0 0 8px var(--brand-deep);
  animation: scanMove 2s ease-in-out infinite;
}

@keyframes scanMove {

  0%,
  100% {
    top: 0;
  }

  50% {
    top: calc(100% - 2px);
  }
}

.scanner-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeOverlay 0.2s ease;
}

@keyframes fadeOverlay {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  border-radius: 24px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideModal 0.3s ease both;
  background: rgba(255, 255, 255, 0.88);
}

@keyframes slideModal {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.modal-header h2 {
  font-family: 'Jua', sans-serif;
  font-size: 1.4rem;
  color: var(--text);
}

.modal-body-text {
  color: var(--text-muted);
  line-height: 1.6;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}

.modal-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.sm-modal {
  max-width: 380px;
}

/* LOGIN MODAL */
.login-modal {
  max-width: 400px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Jua', sans-serif;
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 2rem;
}

.login-step {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.totp-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.totp-input {
  font-family: 'Jua', sans-serif;
  font-size: 2rem;
  text-align: center;
  letter-spacing: 0.5em;
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: 'Jua', sans-serif;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  text-align: center;
}

.btn-link:hover {
  color: var(--brand-text);
}

.totp-input.backup-mode {
  font-size: 1.2rem;
  letter-spacing: 0.15em;
}

.trust-device-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.trust-device-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--brand-deep);
  cursor: pointer;
}

/* THEME MODAL */
.theme-modal {
  max-width: 420px;
}

.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.theme-swatch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 2px solid var(--glass-border);
  background: var(--glass-bg);
  cursor: pointer;
  font-family: 'Jua', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color 0.2s, transform 0.15s;
}

.theme-swatch:hover {
  transform: translateY(-2px);
  border-color: var(--brand-deep);
}

.theme-swatch.active {
  border-color: var(--brand-deep);
  box-shadow: 0 0 0 2px var(--brand-deep);
}

.swatch-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* QR MODAL */
.qr-modal {
  max-width: 420px;
}

.qr-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.qr-doc-info {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.qr-doc-info strong {
  color: var(--text);
  font-size: 1rem;
  display: block;
}

#qrCanvas {
  border-radius: 12px;
  max-width: 220px;
}

.qr-id {
  font-family: 'Jua', sans-serif;
  font-size: 1.1rem;
  color: var(--brand-text);
  letter-spacing: 0.08em;
}

.qr-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* DASHBOARD */
.dashboard-layout {
  display: flex;
  min-height: calc(100vh - 65px);
  position: relative;
  z-index: 1;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-bottom: none;
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  gap: 0.5rem;
}

.sidebar-user {
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--glass-bg);
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sidebar-user strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.snav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: 'Jua', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  text-align: left;
  transition: background 0.2s;
}

.snav-item:hover {
  background: var(--glass-bg);
}

.snav-item.active {
  background: var(--brand-mid);
  color: var(--brand-text);
}

.sidebar-logout {
  margin-top: auto;
  width: 100%;
}

.dashboard-main {
  flex: 1;
  padding: 2rem;
  min-width: 0;
}

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

.dash-header h2 {
  font-family: 'Jua', sans-serif;
  font-size: 1.6rem;
  color: var(--text);
}

.dash-header .input-glass {
  max-width: 260px;
}

/* DOC TABLE */
.doc-table-wrap {
  border-radius: 18px;
  overflow: hidden;
  overflow-x: auto;
}

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

.doc-table thead tr {
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
}

.doc-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: 'Jua', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.doc-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.doc-table tbody tr:last-child td {
  border-bottom: none;
}

.doc-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.15);
}

.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem !important;
}

.badge-valid {
  background: rgba(100, 220, 100, 0.3);
  color: #1a6b1a;
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  font-family: 'Jua', sans-serif;
  white-space: nowrap;
}

.badge-invalid {
  background: rgba(220, 100, 100, 0.3);
  color: #6b1a1a;
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  font-family: 'Jua', sans-serif;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.table-actions button {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: 'Jua', sans-serif;
  transition: opacity 0.2s;
}

.table-actions button:hover {
  opacity: 0.8;
}

.btn-tbl-qr {
  background: var(--brand-mid);
  color: var(--brand-text);
}

.btn-tbl-void {
  background: #ffe0e0;
  color: #b33;
}

.btn-tbl-link {
  background: var(--glass-bg);
  color: var(--text);
  border: 1px solid var(--glass-border) !important;
}

.btn-tbl-edit {
  background: var(--brand-mid);
  color: var(--brand-text);
}

/* ISSUE FORM */
.issue-form {
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 560px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-family: 'Jua', sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.optional {
  font-size: 0.78rem;
  font-style: italic;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 0.5rem;
}

.form-error {
  background: rgba(220, 50, 50, 0.15);
  border: 1px solid rgba(220, 50, 50, 0.3);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: #b33;
  font-size: 0.9rem;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  font-size: 0.9rem;
  font-family: 'Jua', sans-serif;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: toastIn 0.3s ease;
  white-space: nowrap;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* EDIT MODAL */
.edit-modal {
  max-width: 500px;
  width: 95%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 90vh;
  overflow-y: auto;
}

.edit-doc-id {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: -0.5rem;
}

.edit-actions-section {
  border-top: 1px solid var(--glass-border);
  padding-top: 1.1rem;
  margin-top: 0.25rem;
}

.edit-actions-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.65rem;
}

.edit-actions-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-sm {
  font-family: 'Jua', sans-serif;
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
}

.btn-sm:hover {
  opacity: 0.82;
}

.btn-void {
  background: #ffe0e0;
  color: #b33;
}

.btn-reenable {
  background: #d4f5d4;
  color: #1a6e1a;
}

/* UTILITIES */
.hidden {
  display: none !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1rem;
  }

  .hero {
    flex-direction: column;
    padding: 3rem 1.25rem 2rem;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .id-input-row {
    min-width: unset;
    width: 100%;
  }

  .hero-visual {
    display: none;
  }

  .dashboard-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .sidebar-user {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    flex: unset;
  }

  .sidebar-logout {
    width: auto;
    margin-top: 0;
  }

  .dashboard-main {
    padding: 1rem;
  }

  .theme-grid {
    grid-template-columns: 1fr;
  }
}
