/* ===================================================================
   QuickLink - Next-Gen Enterprise UI Design System
   Hyper-Performance URL Shortener & Analytics
   Theme: Midnight Obsidian with Electric Violet & Neon Cyan Aurora
   =================================================================== */

:root {
  /* Color Palette */
  --bg-app: #07090e;
  --bg-surface: #0c101c;
  --bg-surface-raised: #121829;
  --bg-surface-hover: #19223a;
  --bg-card: rgba(12, 16, 28, 0.78);
  --bg-glass: rgba(18, 24, 41, 0.6);

  /* Borders & Highlights */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(99, 102, 241, 0.28);
  --border-glow: rgba(99, 102, 241, 0.5);

  /* Primary Brand: Electric Violet & Indigo */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #818cf8;
  --primary-glow: rgba(99, 102, 241, 0.35);

  /* Secondary Accent: Neon Cyan */
  --cyan: #06b6d4;
  --cyan-light: #22d3ee;
  --cyan-glow: rgba(6, 182, 212, 0.3);

  /* Purple / Magenta Accent */
  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.28);

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --grad-button: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
  --grad-hover: linear-gradient(135deg, #4338ca 0%, #6d28d9 50%, #0891b2 100%);
  --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%);
  --grad-text: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --grad-lightning: linear-gradient(135deg, #facc15 0%, #fb923c 50%, #ec4899 100%);

  /* State Colors */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --success-border: rgba(16, 185, 129, 0.3);
  --success-glow: rgba(16, 185, 129, 0.25);

  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.3);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.3);
  --danger-glow: rgba(239, 68, 68, 0.25);

  /* Typography Colors */
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-highlight: #38bdf8;

  /* Typography Font Families */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Outfit', var(--font-family);
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;

  /* Radius */
  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Shadows & Lightning Glows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.55), 0 0 20px rgba(99, 102, 241, 0.08);
  --shadow-lg: 0 20px 48px -8px rgba(0, 0, 0, 0.7), 0 0 32px rgba(99, 102, 241, 0.15);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.4), 0 0 50px rgba(6, 182, 212, 0.2);
}

/* ===================================================================
   Reset & Global Styles
   =================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* ===================================================================
   Ambient Background Lighting & Aurora Mesh
   =================================================================== */
.ambient-glow {
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 650px;
  background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.22) 0%, rgba(139, 92, 246, 0.15) 35%, rgba(6, 182, 212, 0.08) 60%, transparent 80%);
  z-index: -2;
  pointer-events: none;
  filter: blur(40px);
  animation: auroraPulse 10s ease-in-out infinite alternate;
}

@keyframes auroraPulse {
  0% {
    opacity: 0.7;
    transform: translateX(-50%) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1.06);
  }
}

.lightning-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -2;
  filter: blur(90px);
  opacity: 0.45;
}

.orb-1 {
  top: 15%;
  left: 5%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, transparent 70%);
  animation: floatOrb1 16s ease-in-out infinite alternate;
}

.orb-2 {
  top: 30%;
  right: 5%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, transparent 70%);
  animation: floatOrb2 18s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 80px); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-70px, -60px); }
}

/* Subtle Geometric Pattern Overlay */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: -1;
}

/* ===================================================================
   Navigation Bar
   =================================================================== */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.9rem 0;
  transition: border-color 0.2s, background 0.2s;
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--grad-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}

.brand:hover .brand-badge {
  transform: rotate(-8deg) scale(1.05);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.6);
}

.brand-title {
  color: #ffffff;
  font-weight: 800;
}

.brand-dot {
  color: var(--cyan-light);
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.7);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

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

.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem 0.35rem 0.45rem;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  width: 26px;
  height: 26px;
  background: var(--grad-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===================================================================
   Main Layout & Hero Header
   =================================================================== */
.main-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

.hero-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3rem;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.18);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

.pill-sparkle {
  color: var(--cyan-light);
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.6));
}

.hero-heading {
  font-family: var(--font-heading);
  font-size: 2.85rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .hero-heading {
    font-size: 2.15rem;
  }
}

.highlight-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 25px rgba(99, 102, 241, 0.4));
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 620px;
  margin: 0 auto;
}

/* ===================================================================
   Shortener Card Component
   =================================================================== */
.shortener-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 1.85rem;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.12);
  margin-bottom: 3rem;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.shortener-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.8), rgba(6, 182, 212, 0.8), transparent);
  border-radius: var(--radius-full);
}

.shortener-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: var(--shadow-lg), 0 0 50px rgba(99, 102, 241, 0.2);
}

.shortener-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-row {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .input-row {
    flex-direction: row;
    align-items: center;
  }
}

.input-field-group {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 1.15rem;
  color: var(--cyan-light);
  font-size: 1rem;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.4));
}

.input-field-group input {
  width: 100%;
  padding: 1rem 3.2rem 1rem 3rem;
  background: rgba(7, 9, 14, 0.8);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.98rem;
  font-family: var(--font-family);
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-field-group input:focus {
  border-color: var(--primary-light);
  background: rgba(10, 14, 24, 0.95);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 0 25px rgba(99, 102, 241, 0.25);
}

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

.field-action-btn {
  position: absolute;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.field-action-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Custom Alias Expand */
.alias-toggle-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.alias-toggle-link {
  background: none;
  border: none;
  color: #a5b4fc;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  transition: all 0.15s;
}

.alias-toggle-link i {
  color: var(--cyan-light);
}

.alias-toggle-link:hover {
  color: #ffffff;
  transform: translateX(2px);
}

.alias-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(7, 9, 14, 0.85);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  max-width: 400px;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.alias-input-wrapper:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2), 0 0 15px rgba(99, 102, 241, 0.2);
}

.alias-prefix {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  user-select: none;
}

.alias-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  padding-left: 0.4rem;
  font-family: var(--font-mono);
}

/* Result Box */
.result-panel {
  margin-top: 1.5rem;
  padding: 1.25rem 1.35rem;
  background: rgba(18, 24, 43, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(16, 185, 129, 0.15);
  animation: resultReveal 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes resultReveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.result-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #34d399;
}

.result-status i {
  font-size: 1rem;
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.6));
}

.result-main {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .result-main {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.result-url-wrapper {
  flex: 1;
  display: flex;
  background: rgba(7, 9, 14, 0.9);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.result-url-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  outline: none;
  font-family: var(--font-mono);
}

.btn-copy {
  background: var(--bg-surface-raised);
  border-left: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0 1.25rem;
  border-top: none;
  border-right: none;
  border-bottom: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s;
}

.btn-copy:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #ffffff;
}

.btn-copy i {
  color: var(--cyan-light);
}

.result-actions {
  display: flex;
  gap: 0.6rem;
}

/* ===================================================================
   Buttons
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.72rem 1.35rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary-solid {
  background: var(--grad-button);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4), 0 0 20px rgba(6, 182, 212, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary-solid:hover {
  background: var(--grad-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5), 0 0 35px rgba(6, 182, 212, 0.35);
}

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

.btn-shorten {
  padding: 0.95rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.btn-shorten i {
  color: #fef08a;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.6));
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: #ffffff;
  background: var(--bg-surface-raised);
}

.btn-outline {
  background: rgba(18, 24, 41, 0.6);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: rgba(99, 102, 241, 0.6);
  color: #ffffff;
  background: rgba(25, 34, 58, 0.8);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.48rem 0.95rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* ===================================================================
   Metrics Grid
   =================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.metric-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.45rem;
  box-shadow: var(--shadow-md);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.15);
}

.metric-card:hover::before {
  opacity: 1;
}

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

.metric-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.metric-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  color: var(--cyan-light);
  font-size: 0.95rem;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.1;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.metric-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ===================================================================
   Dashboard Table Section
   =================================================================== */
.dashboard-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.dashboard-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem 1.65rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(18, 24, 43, 0.45);
}

@media (min-width: 640px) {
  .dashboard-toolbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.toolbar-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.toolbar-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

.toolbar-right {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field i {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-field input {
  background: rgba(7, 9, 14, 0.8);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.48rem 0.85rem 0.48rem 2.2rem;
  color: #ffffff;
  font-size: 0.85rem;
  outline: none;
  width: 200px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-field input:focus {
  width: 250px;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2), 0 0 15px rgba(99, 102, 241, 0.2);
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.data-table th {
  background: rgba(18, 24, 43, 0.5);
  padding: 0.85rem 1.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 1rem 1.45rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  transition: background 0.15s;
}

.data-table tr:hover td {
  background: rgba(25, 34, 58, 0.55);
}

.cell-index {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.82rem;
}

.destination-wrapper {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.destination-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.destination-link:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.short-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(7, 9, 14, 0.85);
  border: 1px solid var(--border-strong);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

.short-href {
  color: #38bdf8;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.short-href:hover {
  text-decoration: underline;
}

.btn-cell-copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  font-size: 0.8rem;
  transition: all 0.15s;
}

.btn-cell-copy:hover {
  color: #ffffff;
  transform: scale(1.15);
}

.click-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.click-chip i {
  color: #10b981;
}

.cell-date {
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.cell-actions {
  text-align: right;
  white-space: nowrap;
}

.btn-action {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.85rem;
  margin-left: 0.25rem;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-action:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.btn-action-delete:hover {
  background: var(--danger-bg);
  color: #f87171;
  border-color: var(--danger-border);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.empty-state-cell {
  padding: 4.5rem 1.5rem !important;
  text-align: center;
}

.empty-state-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-muted);
}

.empty-state-wrap i {
  font-size: 2.4rem;
  color: var(--primary-light);
  opacity: 0.45;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3));
}

.empty-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.empty-subtitle {
  font-size: 0.85rem;
  max-width: 360px;
}

/* ===================================================================
   QR Code Modal Component
   =================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 10, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 410px;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.25);
  animation: modalZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
}

.modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
}

@keyframes modalZoomIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.modal-heading-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-sm);
  color: var(--cyan-light);
  font-size: 0.95rem;
}

.modal-heading {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.modal-btn-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.modal-btn-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.qr-scan-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--cyan-light);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  text-align: center;
}

.qr-glow-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.qr-canvas-holder {
  background: #ffffff;
  padding: 0.95rem;
  border-radius: var(--radius-md);
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.3), 0 8px 24px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

.qr-canvas-holder canvas,
.qr-canvas-holder img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.qr-link-preview-box {
  background: rgba(7, 9, 14, 0.85);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  margin-bottom: 1.25rem;
}

.qr-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.qr-url-caption {
  font-size: 0.82rem;
  color: #38bdf8;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-qr-copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  font-size: 0.85rem;
  transition: color 0.15s;
}

.btn-qr-copy:hover {
  color: #ffffff;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

/* ===================================================================
   Auth Views (Sign In & Sign Up)
   =================================================================== */
.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 1.5rem;
  position: relative;
}

.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}

.blob-1 {
  top: 10%;
  left: 15%;
  width: 450px;
  height: 450px;
  background: rgba(99, 102, 241, 0.4);
}

.blob-2 {
  bottom: 10%;
  right: 15%;
  width: 400px;
  height: 400px;
  background: rgba(6, 182, 212, 0.35);
}

.auth-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 10;
}

.auth-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: #ffffff;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--grad-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.5);
}

.logo-text .highlight {
  color: var(--cyan-light);
}

.btn-back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s;
}

.btn-back-link:hover {
  color: #ffffff;
  transform: translateX(-3px);
}

.auth-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(99, 102, 241, 0.18);
  position: relative;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(7, 9, 14, 0.8);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
  border: 1px solid var(--border-subtle);
}

.auth-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.auth-tab.active {
  background: var(--bg-surface-raised);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.auth-form-header {
  margin-bottom: 1.5rem;
}

.auth-form-header h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.35rem;
}

.auth-form-header p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group label i {
  color: var(--cyan-light);
  margin-right: 0.25rem;
}

.form-group input {
  padding: 0.85rem 1rem;
  background: rgba(7, 9, 14, 0.8);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.92rem;
  font-family: var(--font-family);
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-group input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 0 20px rgba(99, 102, 241, 0.2);
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-right: 2.8rem;
}

.btn-toggle-pwd {
  position: absolute;
  right: 0.85rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  transition: color 0.15s;
}

.btn-toggle-pwd:hover {
  color: #ffffff;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-auth {
  margin-top: 1rem;
  padding: 0.85rem;
  font-size: 0.95rem;
}

.auth-switch-prompt {
  text-align: center;
  margin-top: 1.45rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.auth-switch-prompt a {
  color: var(--cyan-light);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.auth-switch-prompt a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.alert-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  margin-bottom: 1.35rem;
}

.alert-error {
  background: var(--danger-bg);
  color: #fca5a5;
  border: 1px solid var(--danger-border);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
}

.alert-success {
  background: var(--success-bg);
  color: #86efac;
  border: 1px solid var(--success-border);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

/* ===================================================================
   404 Page Styles
   =================================================================== */
.error-page-body {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
}

.error-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.2);
}

.error-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.error-icon-glow {
  font-size: 3.5rem;
  color: var(--primary-light);
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 0 25px rgba(99, 102, 241, 0.5));
}

.error-card h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.error-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.shortid-pill {
  background: rgba(7, 9, 14, 0.9);
  border: 1px solid var(--border-medium);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  color: #38bdf8;
  font-family: var(--font-mono);
}

.error-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===================================================================
   Toast Notifications
   =================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.35rem;
  background: rgba(18, 24, 43, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(99, 102, 241, 0.18);
  font-size: 0.88rem;
  font-weight: 500;
  color: #ffffff;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 380px;
}

.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
}
.toast-success i { color: #34d399; filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.5)); }

.toast-error {
  border-color: rgba(239, 68, 68, 0.4);
}
.toast-error i { color: #f87171; filter: drop-shadow(0 0 8px rgba(248, 113, 113, 0.5)); }

.toast-info {
  border-color: rgba(6, 182, 212, 0.4);
}
.toast-info i { color: var(--cyan-light); filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.5)); }

@keyframes toastSlideIn {
  from { transform: translateY(16px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes toastSlideOut {
  from { transform: translateY(0) scale(1); opacity: 1; }
  to { transform: translateY(16px) scale(0.95); opacity: 0; }
}

/* ===================================================================
   Footer
   =================================================================== */
.footer-bar {
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 9, 14, 0.8);
  padding: 1.75rem 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
  }
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-secondary);
}

.footer-note {
  margin-left: 0.5rem;
  font-size: 0.8rem;
}

.footer-right {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s;
}

.footer-link:hover {
  color: #38bdf8;
}

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