/* /repairhub/public/assets/css/ticket_status.css */

/* ─────────────────────────────────────────
   Theme Tokens — Dark (default)
───────────────────────────────────────── */
:root {
  --bg:           #0b0d14;
  --surface:      #12151f;
  --surface-2:    #181c28;
  --surface-3:    #1e2333;
  --border:       rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.13);

  --text-primary: #f0f2f7;
  --text-body:    #b8bfd4;
  --text-muted:   #6b748a;
  --text-faint:   #3d4357;

  --indigo:       #6366f1;
  --indigo-dim:   rgba(99,102,241,0.15);
  --blue:         #3b82f6;
  --green:        #10b981;
  --amber:        #f59e0b;
  --red:          #ef4444;

  --radius-page:  24px;
  --radius-card:  16px;
  --radius-item:  10px;
  --radius-pill:  999px;

  --shadow-card:  0 1px 3px rgba(0,0,0,0.5), 0 4px 20px rgba(0,0,0,0.3);

  /* glow colors */
  --glow-top:     rgba(99,102,241,0.08);
  --glow-bottom:  rgba(16,185,129,0.05);

  /* alert error */
  --alert-bg:     rgba(239,68,68,0.08);
  --alert-border: rgba(239,68,68,0.25);
  --alert-text:   #fca5a5;

  /* policy block */
  --policy-bg:    rgba(99,102,241,0.05);
  --policy-border:rgba(99,102,241,0.12);
  --policy-title: #818cf8;

  /* note item */
  --note-head-bg: var(--surface-2);
}

/* ─────────────────────────────────────────
   Theme Tokens — Light
───────────────────────────────────────── */
html[data-theme="light"] {
  --bg:           #f0f4f8;
  --surface:      #ffffff;
  --surface-2:    #f8fafc;
  --surface-3:    #f1f5f9;
  --border:       rgba(15,23,42,0.09);
  --border-hover: rgba(15,23,42,0.18);

  --text-primary: #0f172a;
  --text-body:    #334155;
  --text-muted:   #64748b;
  --text-faint:   #94a3b8;

  --indigo:       #6366f1;
  --indigo-dim:   rgba(99,102,241,0.08);
  --blue:         #3b82f6;
  --green:        #10b981;
  --amber:        #f59e0b;
  --red:          #ef4444;

  --shadow-card:  0 1px 3px rgba(15,23,42,0.06), 0 4px 20px rgba(15,23,42,0.07);

  --glow-top:     rgba(99,102,241,0.05);
  --glow-bottom:  rgba(16,185,129,0.03);

  --alert-bg:     rgba(239,68,68,0.06);
  --alert-border: rgba(239,68,68,0.2);
  --alert-text:   #b91c1c;

  --policy-bg:    rgba(99,102,241,0.04);
  --policy-border:rgba(99,102,241,0.12);
  --policy-title: #6366f1;

  --note-head-bg: #f8fafc;
}

/* ─────────────────────────────────────────
   Reset & Base
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text-body);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────
   Background ambient glow
───────────────────────────────────────── */
.bg-glow { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-glow::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, var(--glow-top) 0%, transparent 70%);
  border-radius: 50%;
}
.bg-glow::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse at center, var(--glow-bottom) 0%, transparent 70%);
  border-radius: 50%;
}

/* ─────────────────────────────────────────
   Layout
───────────────────────────────────────── */
.page-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 40px 18px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─────────────────────────────────────────
   Page Header
───────────────────────────────────────── */
.page-header { text-align: center; padding: 12px 0 8px; }

.page-logo { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.page-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--indigo-dim);
  border: 1px solid rgba(99,102,241,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--indigo);
}
.page-logo-text { font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.02em; }

.page-title {
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.page-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 340px;
  margin: 0 auto;
}

/* ─────────────────────────────────────────
   Search Form
───────────────────────────────────────── */
.search-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-page);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.search-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.search-input-row { display: flex; gap: 8px; align-items: stretch; }

.search-input-group {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-item);
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.search-input-group:focus-within {
  border-color: rgba(99,102,241,0.5);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.search-input-icon { flex-shrink: 0; padding: 0 10px 0 12px; color: var(--text-faint); display: flex; align-items: center; }

input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 13px 12px 13px 0;
  min-width: 0;
  letter-spacing: 0.04em;
  -webkit-appearance: none;
}
input[type="text"]::placeholder { color: var(--text-faint); font-weight: 400; letter-spacing: 0; }

.search-btn {
  flex-shrink: 0;
  background: var(--indigo);
  color: #fff;
  border: none;
  border-radius: var(--radius-item);
  padding: 13px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}
.search-btn:hover  { background: #4f46e5; }
.search-btn:active { transform: scale(0.97); }

/* Last4 field row */
.last4-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.last4-row-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.last4-input-wrap {
  flex: 1;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-item);
  display: flex;
  align-items: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.last4-input-wrap:focus-within {
  border-color: rgba(99,102,241,0.5);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.last4-input-wrap input {
  width: 100%;
  letter-spacing: 0.2em;
  text-align: center;
  padding: 11px 14px;
  font-family: 'DM Mono', monospace;
  font-size: 15px;
}

/* Tags strip */
.tag-strip { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 4px 0; }
.tag-chip {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.01em;
}

/* Clear link */
.clear-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.clear-link:hover { color: var(--text-body); }

/* ─────────────────────────────────────────
   Error Alert
───────────────────────────────────────── */
.alert-error {
  background: var(--alert-bg);
  border: 1px solid var(--alert-border);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-error-icon { flex-shrink: 0; width: 18px; height: 18px; color: var(--red); margin-top: 1px; }
.alert-error-text { font-size: 14px; color: var(--alert-text); line-height: 1.5; }

/* ─────────────────────────────────────────
   Ticket Result Card
───────────────────────────────────────── */
.ticket-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-page);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  animation: fade-up 0.4s ease both;
}
.ticket-stripe { height: 3px; background: linear-gradient(90deg, var(--indigo), var(--blue), var(--green)); }
.ticket-inner { padding: 22px 20px 20px; }

.ticket-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.ticket-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.ticket-number {
  font-family: 'DM Mono', monospace;
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.ticket-device { font-size: 14px; color: var(--text-muted); margin-top: 6px; font-weight: 400; }

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1.5px solid transparent;
  transition: transform 0.15s, filter 0.15s;
}
.status-pill:hover { transform: translateY(-1px); filter: brightness(1.1); }
.status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  flex-shrink: 0;
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* Dark mode — solid vivid fills */
.status-color-navy {
  background: #1d4ed8;
  color: #fff;
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px rgba(59,130,246,0.25), 0 3px 14px rgba(29,78,216,0.5);
}
.status-color-sky {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.25), 0 3px 14px rgba(2,132,199,0.5);
}
.status-color-orange {
  background: #d97706;
  color: #fff;
  border-color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(251,191,36,0.25), 0 3px 14px rgba(217,119,6,0.5);
}
.status-color-green {
  background: #059669;
  color: #fff;
  border-color: #34d399;
  box-shadow: 0 0 0 1px rgba(52,211,153,0.25), 0 3px 14px rgba(5,150,105,0.5);
}
.status-color-pink {
  background: #db2777;
  color: #fff;
  border-color: #f472b6;
  box-shadow: 0 0 0 1px rgba(244,114,182,0.25), 0 3px 14px rgba(219,39,119,0.5);
}
.status-color-red {
  background: #dc2626;
  color: #fff;
  border-color: #f87171;
  box-shadow: 0 0 0 1px rgba(248,113,113,0.25), 0 3px 14px rgba(220,38,38,0.5);
}
.status-color-black {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #e2e8f0;
  border-color: rgba(226,232,240,0.25);
  box-shadow: 0 0 0 1px rgba(226,232,240,0.08), 0 3px 14px rgba(0,0,0,0.55);
}
.status-color-black::before { background: rgba(226,232,240,0.85); }
.status-color-secondary {
  background: #334155;
  color: #e2e8f0;
  border-color: rgba(226,232,240,0.2);
  box-shadow: 0 0 0 1px rgba(226,232,240,0.06), 0 3px 10px rgba(0,0,0,0.35);
}

/* Divider */
.ticket-divider { height: 1px; background: var(--border); margin: 18px 0; }

/* Meta grid */
.meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.meta-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-item);
  padding: 13px 14px;
}
.meta-item:hover { border-color: var(--border-hover); }
.meta-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.meta-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}
.meta-value.mono { font-family: 'DM Mono', monospace; font-size: 12px; }
.meta-link { color: #818cf8; text-decoration: none; font-weight: 500; }
.meta-link:hover { color: #a5b4fc; text-decoration: underline; }

/* Share Row */
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.share-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: 2px;
  flex-shrink: 0;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-body);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
}
.share-btn:hover { background: var(--surface-2); border-color: var(--border-hover); }
.share-btn-primary {
  background: var(--indigo-dim);
  border-color: rgba(99,102,241,0.3);
  color: #a5b4fc;
}
.share-btn-primary:hover { background: rgba(99,102,241,0.22); }

/* Privacy note */
.privacy-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.4;
}
.privacy-note-icon { flex-shrink: 0; color: var(--text-faint); }

/* Policy */
.policy-text { font-size: 13px; color: var(--text-muted); line-height: 1.6; font-weight: 400; }

/* Updates Card */
.updates-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-page);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  animation: fade-up 0.4s 0.08s ease both;
}
.updates-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.updates-head-left { display: flex; align-items: center; gap: 8px; }
.updates-head-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--indigo-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--indigo);
  flex-shrink: 0;
}
.updates-head-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.updates-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-3);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}
.updates-body { padding: 16px 20px; }

.no-updates { text-align: center; padding: 24px 0; color: var(--text-muted); font-size: 14px; }
.no-updates-icon { font-size: 28px; margin-bottom: 8px; opacity: 0.5; }

.note-list { display: flex; flex-direction: column; gap: 12px; }

.note-item { border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.note-type-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid;
}
.note-badge-update { background: rgba(99,102,241,0.1); color: #a5b4fc; border-color: rgba(99,102,241,0.2); }

.note-meta { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.note-body-wrap { padding: 14px; }
.note-body {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.65;
  white-space: pre-wrap;
  font-weight: 400;
}

/* Policy block */
.policy-block {
  background: var(--policy-bg);
  border: 1px solid var(--policy-border);
  border-radius: var(--radius-item);
  padding: 14px 16px;
  margin-top: 16px;
}
.policy-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--policy-title);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Note head */
.note-item-head {
  padding: 10px 14px;
  background: var(--note-head-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

/* Contact Footer */
.contact-footer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-page);
  padding: 20px;
  text-align: center;
  animation: fade-up 0.4s 0.14s ease both;
}
.contact-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.contact-shop { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 8px; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: #818cf8;
  text-decoration: none;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.15);
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
}
.contact-link:hover { background: rgba(99,102,241,0.14); }
.contact-link-plain { background: var(--surface-2); border-color: var(--border); color: var(--text-body); }
.contact-link-plain:hover { background: var(--surface-3); }
.contact-address, .contact-details { font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }
.contact-details { white-space: pre-wrap; }
.contact-fallback { font-size: 13px; color: var(--text-muted); }

/* QR Modal */
.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  backdrop-filter: blur(4px);
}
.qr-modal.show { display: flex; }
.qr-card {
  width: 300px;
  max-width: 90vw;
  background: var(--surface-2);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-page);
  padding: 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.qr-header { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 14px; }
.qr-box { background: #fff; border-radius: 12px; padding: 12px; display: inline-block; margin-bottom: 12px; }
.qr-note { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.4; }
.qr-close {
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-body);
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}

/* Animations */
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.search-card { animation: fade-up 0.35s ease both; }
.tag-strip { animation: fade-up 0.35s 0.05s ease both; }

/* Responsive */
@media (max-width: 480px) {
  .page-wrap { padding: 28px 14px 60px; gap: 12px; }
  .page-title { font-size: 24px; }
  .search-card { padding: 16px; }
  .search-btn { padding: 13px 16px; font-size: 13px; }
  .meta-grid { grid-template-columns: 1fr; gap: 8px; }
  .ticket-inner { padding: 18px 16px 16px; }
  .updates-body { padding: 14px 16px; }
  .contact-footer { padding: 16px; }
  .share-row { flex-direction: column; align-items: flex-start; }
}

/* Light mode — status pill overrides */
html[data-theme="light"] .status-color-navy {
  background: #1d4ed8; color: #fff; border-color: #60a5fa;
  box-shadow: 0 0 0 1px rgba(29,78,216,0.2), 0 2px 10px rgba(29,78,216,0.3);
}
html[data-theme="light"] .status-color-sky {
  background: #0284c7; color: #fff; border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(2,132,199,0.2), 0 2px 10px rgba(2,132,199,0.3);
}
html[data-theme="light"] .status-color-orange {
  background: #d97706; color: #fff; border-color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(217,119,6,0.2), 0 2px 10px rgba(217,119,6,0.3);
}
html[data-theme="light"] .status-color-green {
  background: #059669; color: #fff; border-color: #34d399;
  box-shadow: 0 0 0 1px rgba(5,150,105,0.2), 0 2px 10px rgba(5,150,105,0.3);
}
html[data-theme="light"] .status-color-pink {
  background: #db2777; color: #fff; border-color: #f472b6;
  box-shadow: 0 0 0 1px rgba(219,39,119,0.2), 0 2px 10px rgba(219,39,119,0.3);
}
html[data-theme="light"] .status-color-red {
  background: #dc2626; color: #fff; border-color: #f87171;
  box-shadow: 0 0 0 1px rgba(220,38,38,0.2), 0 2px 10px rgba(220,38,38,0.3);
}
html[data-theme="light"] .status-color-black {
  background: #1e293b; color: #f1f5f9; border-color: rgba(241,245,249,0.2);
  box-shadow: 0 0 0 1px rgba(15,23,42,0.15), 0 2px 10px rgba(15,23,42,0.25);
}
html[data-theme="light"] .status-color-secondary {
  background: #475569; color: #f8fafc; border-color: rgba(248,250,252,0.15);
  box-shadow: 0 0 0 1px rgba(71,85,105,0.15), 0 2px 8px rgba(71,85,105,0.2);
}
html[data-theme="light"] .meta-link { color: #6366f1; }
html[data-theme="light"] .meta-link:hover { color: #4f46e5; }
html[data-theme="light"] .share-btn-primary {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.2);
  color: #6366f1;
}
html[data-theme="light"] .share-btn-primary:hover { background: rgba(99,102,241,0.14); }
html[data-theme="light"] .contact-link {
  background: rgba(99,102,241,0.06);
  border-color: rgba(99,102,241,0.15);
  color: #6366f1;
}
html[data-theme="light"] .contact-link:hover { background: rgba(99,102,241,0.12); }
html[data-theme="light"] .contact-link-plain {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-body);
}

/* Smooth theme transition */
body, .search-card, .ticket-card, .updates-card, .contact-footer,
.meta-item, .note-item, .tag-chip, .share-btn, .contact-link {
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 100;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-hover);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3), 0 0 0 1px var(--border);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover {
  background: var(--surface-3);
  transform: scale(1.08);
  box-shadow: 0 4px 18px rgba(0,0,0,0.35), 0 0 0 1px var(--border-hover);
}
.theme-toggle:active { transform: scale(0.95); }

.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle { box-shadow: 0 2px 12px rgba(15,23,42,0.12), 0 0 0 1px var(--border); }

@media (max-width: 360px) {
  .theme-toggle { bottom: 16px; right: 14px; width: 42px; height: 42px; }
}