/* ============================================================
   UCB BLOCKCHAIN CERTIFICATION SYSTEM — style.css
   Universidad Católica Boliviana
   ============================================================ */

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

:root {
  --ucb-navy:       #0B1E3D;
  --ucb-blue:       #1A3F7A;
  --ucb-mid:        #2563EB;
  --ucb-light:      #3B82F6;
  --ucb-accent:     #F59E0B;
  --ucb-accent-d:   #D97706;
  --ucb-success:    #059669;
  --ucb-success-l:  #D1FAE5;
  --ucb-danger:     #DC2626;
  --ucb-danger-l:   #FEE2E2;
  --ucb-warn:       #D97706;
  --ucb-warn-l:     #FEF3C7;
  --ucb-info-l:     #EFF6FF;
  --bg:             #F0F4FA;
  --surface:        #FFFFFF;
  --surface2:       #F8FAFD;
  --border:         #DDE3EF;
  --border-soft:    #EBF0F8;
  --text-primary:   #0B1E3D;
  --text-secondary: #4B5B7C;
  --text-muted:     #8A99B8;
  --shadow-sm:      0 1px 3px rgba(11,30,61,.06), 0 1px 2px rgba(11,30,61,.04);
  --shadow-md:      0 4px 16px rgba(11,30,61,.08), 0 2px 6px rgba(11,30,61,.04);
  --shadow-lg:      0 12px 40px rgba(11,30,61,.12), 0 4px 12px rgba(11,30,61,.06);
  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      16px;
  --radius-xl:      22px;
  --font:           'Plus Jakarta Sans', sans-serif;
  --mono:           'JetBrains Mono', monospace;
  --transition:     0.2s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 240px;
  background: var(--ucb-navy);
  display: flex; flex-direction: column;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(11,30,61,.18);
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand .brand-logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.sidebar-brand .brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--ucb-mid), var(--ucb-light));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.sidebar-brand h1 {
  font-size: 13px; font-weight: 700;
  color: #fff; letter-spacing: .5px;
  text-transform: uppercase;
  line-height: 1.2;
}
.sidebar-brand p {
  font-size: 10px; color: rgba(255,255,255,.45);
  letter-spacing: .3px;
}

.sidebar-nav { flex: 1; padding: 16px 10px; overflow-y: auto; }

.nav-section-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: rgba(255,255,255,.3);
  padding: 0 10px; margin: 16px 0 6px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.65); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  text-decoration: none; border: none; background: none; width: 100%;
  text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--ucb-mid); color: #fff; }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: rgba(255,255,255,.5);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ucb-success);
  box-shadow: 0 0 0 3px rgba(5,150,105,.25);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 3px rgba(5,150,105,.25); }
  50% { box-shadow: 0 0 0 5px rgba(5,150,105,.12); }
}

/* ── MAIN LAYOUT ── */
.main-content {
  margin-left: 240px;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  padding: 0 28px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.topbar-left h2 {
  font-size: 16px; font-weight: 700; color: var(--text-primary);
}
.topbar-left p { font-size: 12px; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.page-body { padding: 24px 28px; flex: 1; }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title {
  display: flex; align-items: center; gap: 10px;
}
.card-title h3 { font-size: 15px; font-weight: 700; }
.card-title .card-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.card-body { padding: 20px 22px; }

/* ── STAT CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
}
.stat-card.blue::before { background: linear-gradient(90deg,var(--ucb-mid),var(--ucb-light)); }
.stat-card.green::before { background: linear-gradient(90deg,#059669,#34D399); }
.stat-card.amber::before { background: linear-gradient(90deg,#D97706,#F59E0B); }
.stat-card.purple::before { background: linear-gradient(90deg,#7C3AED,#A78BFA); }

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-header { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); }
.stat-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.stat-card.blue .stat-icon { background: var(--ucb-info-l); }
.stat-card.green .stat-icon { background: var(--ucb-success-l); }
.stat-card.amber .stat-icon { background: var(--ucb-warn-l); }
.stat-card.purple .stat-icon { background: #EDE9FE; }

.stat-value {
  font-size: 32px; font-weight: 700; letter-spacing: -1px;
  color: var(--text-primary); line-height: 1;
}
.stat-sub { font-size: 11px; color: var(--text-muted); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; font-family: var(--font);
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: var(--ucb-mid);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--ucb-blue); }

.btn-secondary {
  background: var(--surface2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--border-soft); color: var(--text-primary); }

.btn-success { background: var(--ucb-success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #047857; }

.btn-danger { background: var(--ucb-danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface2); color: var(--text-primary); }
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-lg { padding: 12px 24px; font-size: 14px; }
.btn-full { width: 100%; justify-content: center; }

.btn-loader { display: none; }
.btn.loading .btn-loader { display: block; }
.btn.loading .btn-text { opacity: .7; }

/* ── FORMS ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-secondary);
}
.form-label .required { color: var(--ucb-danger); margin-left: 2px; }

.form-input, .form-select, .form-file {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px; font-family: var(--font);
  color: var(--text-primary);
  background: var(--surface);
  transition: var(--transition);
  outline: none; width: 100%;
}
.form-input:focus, .form-select:focus {
  border-color: var(--ucb-mid);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-input::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A99B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 32px;
}

.file-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.file-upload-zone:hover, .file-upload-zone.drag-over {
  border-color: var(--ucb-mid);
  background: var(--ucb-info-l);
}
.file-upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.file-upload-icon { font-size: 28px; margin-bottom: 8px; }
.file-upload-zone p { font-size: 13px; color: var(--text-secondary); }
.file-upload-zone strong { color: var(--ucb-mid); }
.file-upload-zone .file-name {
  display: none; font-size: 12px; font-weight: 600;
  color: var(--ucb-success); margin-top: 6px;
}
.file-upload-zone.has-file .file-name { display: block; }

/* ── PROGRESS STEPS ── */
.progress-steps {
  display: none;
  margin: 20px 0;
}
.progress-steps.visible { display: block; }
.progress-steps-header { margin-bottom: 14px; }
.progress-steps-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.progress-track { height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; margin-bottom: 16px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--ucb-mid), var(--ucb-light)); border-radius: 99px; transition: width .4s ease; }

.steps-list { display: flex; flex-direction: column; gap: 8px; }
.step-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--surface2);
  transition: var(--transition);
}
.step-item.active { border-color: var(--ucb-mid); background: var(--ucb-info-l); }
.step-item.done { border-color: var(--ucb-success); background: var(--ucb-success-l); }
.step-item.error { border-color: var(--ucb-danger); background: var(--ucb-danger-l); }

.step-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  background: var(--border); color: var(--text-muted);
}
.step-item.active .step-icon { background: var(--ucb-mid); color: #fff; }
.step-item.done .step-icon { background: var(--ucb-success); color: #fff; }
.step-item.error .step-icon { background: var(--ucb-danger); color: #fff; }

.step-info { flex: 1; }
.step-name { font-size: 13px; font-weight: 600; }
.step-desc { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.step-item.active .step-desc { color: var(--ucb-mid); }
.step-item.done .step-desc { color: var(--ucb-success); }

/* Spinner */
.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESULT PANEL ── */
.result-panel {
  display: none;
  margin-top: 20px;
  border: 1.5px solid var(--ucb-success);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.result-panel.visible { display: block; }

.result-header {
  background: var(--ucb-success);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 10px;
  color: #fff;
}
.result-header h4 { font-size: 14px; font-weight: 700; }
.result-body { padding: 20px; background: var(--surface); }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.result-item { display: flex; flex-direction: column; gap: 4px; }
.result-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.result-value {
  font-size: 12px; font-family: var(--mono);
  color: var(--text-primary); word-break: break-all;
  background: var(--surface2); border: 1px solid var(--border-soft);
  padding: 7px 10px; border-radius: var(--radius-sm);
}
.result-link { color: var(--ucb-mid); text-decoration: none; }
.result-link:hover { text-decoration: underline; }

.result-qr-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: flex-start; gap: 20px;
}
.qr-box {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px;
  flex-shrink: 0;
}
.qr-box canvas, .qr-box img { display: block; }
.qr-info { flex: 1; }
.qr-info h5 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.qr-info p { font-size: 12px; color: var(--text-secondary); }

/* ── TABLE ── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--surface2); }
thead th {
  padding: 10px 14px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-muted);
  text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border-soft); transition: var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
tbody td { padding: 11px 14px; font-size: 13px; vertical-align: middle; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 99px;
  font-size: 10px; font-weight: 700;
}
.badge-blue { background: var(--ucb-info-l); color: var(--ucb-blue); }
.badge-green { background: var(--ucb-success-l); color: #065F46; }
.badge-amber { background: var(--ucb-warn-l); color: #92400E; }
.badge-gray { background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border); }
.badge-purple { background: #EDE9FE; color: #5B21B6; }

.hash-cell {
  font-family: var(--mono); font-size: 11px; color: var(--text-muted);
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── VERIFY PAGE ── */
.verify-hero {
  background: var(--ucb-navy);
  color: #fff;
  padding: 40px 0 60px;
}
.verify-container { max-width: 860px; margin: 0 auto; padding: 0 24px; }

.verify-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(5,150,105,.2); border: 1px solid rgba(5,150,105,.4);
  color: #34D399; padding: 6px 14px; border-radius: 99px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  margin-bottom: 16px;
}
.verify-badge.invalid {
  background: rgba(220,38,38,.2); border-color: rgba(220,38,38,.4); color: #F87171;
}

.verify-title { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.verify-sub { font-size: 14px; color: rgba(255,255,255,.55); }

.verify-body { padding: 32px 0; }

.verify-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.chain-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 20px;
}
.chain-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 16px; text-align: center;
  transition: var(--transition);
  background: var(--surface);
  position: relative; overflow: hidden;
}
.chain-card.verified { border-color: var(--ucb-success); }
.chain-card.unverified { border-color: var(--border); opacity: .6; }
.chain-card-icon { font-size: 24px; margin-bottom: 8px; }
.chain-card-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.chain-card-status { font-size: 10px; margin-top: 4px; }
.chain-card.verified .chain-card-status { color: var(--ucb-success); }
.chain-card.unverified .chain-card-status { color: var(--text-muted); }
.chain-card-check {
  position: absolute; top: 8px; right: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ucb-success); color: #fff;
  font-size: 10px; display: flex; align-items: center; justify-content: center;
}
.chain-animate {
  animation: chain-in .4s cubic-bezier(.4,0,.2,1) both;
}
@keyframes chain-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.pdf-viewer-frame {
  width: 100%; height: 500px;
  border: none; border-radius: var(--radius);
  background: var(--surface2);
}

/* ── ALERTS ── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 12px;
}
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--ucb-success-l); border: 1px solid #A7F3D0; color: #065F46; }
.alert-danger  { background: var(--ucb-danger-l); border: 1px solid #FECACA; color: #991B1B; }
.alert-warn    { background: var(--ucb-warn-l); border: 1px solid #FDE68A; color: #92400E; }
.alert-info    { background: var(--ucb-info-l); border: 1px solid #BFDBFE; color: var(--ucb-blue); }

/* ── SEARCH BAR ── */
.search-bar {
  display: flex; gap: 10px; margin-bottom: 20px;
}
.search-bar .form-input { flex: 1; }

/* ── MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(11,30,61,.5); backdrop-filter: blur(4px);
  z-index: 200; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  animation: modal-in .25s cubic-bezier(.4,0,.2,1);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-soft);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ── TABS ── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  padding: 10px 16px;
  font-size: 13px; font-weight: 600; font-family: var(--font);
  border: none; background: none; cursor: pointer;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: var(--transition);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--ucb-mid); border-bottom-color: var(--ucb-mid); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── SKELETON LOADER ── */
.skeleton {
  background: linear-gradient(90deg, var(--border-soft) 25%, var(--border) 50%, var(--border-soft) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── DIVIDER ── */
.divider {
  height: 1px; background: var(--border-soft); margin: 20px 0;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 48px 20px;
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.empty-state h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.empty-state p { font-size: 13px; color: var(--text-muted); }

/* ── UTILITY ── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-mono { font-family: var(--mono); }
.text-sm { font-size: 12px; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--ucb-success); }
.text-danger { color: var(--ucb-danger); }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-bold { font-weight: 700; }
.w-full { width: 100%; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .chain-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .result-qr-section { flex-direction: column; }
  .chain-grid { grid-template-columns: 1fr 1fr; }
  .page-body { padding: 16px; }
  .topbar { padding: 0 16px; }
  .mobile-menu-btn { display: flex !important; }
}

.mobile-menu-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: none; cursor: pointer;
  color: var(--text-secondary);
}

/* ── TOPBAR REFRESH COUNTER ── */
.refresh-badge {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 5px;
}
.refresh-badge span { font-weight: 600; color: var(--text-secondary); }

/* ── VERIFY STANDALONE PAGE ── */
body.verify-page {
  background: var(--bg);
  margin: 0;
}
.verify-topbar {
  background: var(--ucb-navy);
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.verify-topbar-brand { display: flex; align-items: center; gap: 10px; }
.verify-topbar-brand .brand-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--ucb-mid), var(--ucb-light));
  border-radius: 6px; display: flex; align-items: center;
  justify-content: center; font-size: 14px;
}
.verify-topbar-brand span { font-size: 13px; font-weight: 700; color: #fff; }
.verify-topbar a {
  font-size: 12px; color: rgba(255,255,255,.6); text-decoration: none;
}
.verify-topbar a:hover { color: #fff; }

.info-table { width: 100%; }
.info-table tr { border-bottom: 1px solid var(--border-soft); }
.info-table tr:last-child { border-bottom: none; }
.info-table td { padding: 10px 0; vertical-align: top; }
.info-table td:first-child {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted); width: 140px;
}
.info-table td:last-child { font-size: 13px; color: var(--text-primary); }

/* ── LOADING OVERLAY ── */
.page-loader {
  position: fixed; inset: 0; background: var(--ucb-navy);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; flex-direction: column; gap: 16px;
  transition: opacity .4s, visibility .4s;
}
.page-loader.hidden { opacity: 0; visibility: hidden; }
.page-loader .loader-logo { font-size: 36px; }
.page-loader p { color: rgba(255,255,255,.6); font-size: 13px; }
.page-loader .loader-bar {
  width: 200px; height: 3px; background: rgba(255,255,255,.15);
  border-radius: 99px; overflow: hidden;
}
.page-loader .loader-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ucb-mid), var(--ucb-light));
  border-radius: 99px;
  animation: loader-anim 1.6s ease-in-out infinite;
}
@keyframes loader-anim {
  0% { width: 0; margin-left: 0; }
  50% { width: 100%; margin-left: 0; }
  100% { width: 0; margin-left: 100%; }
}
