:root {
  --bg-slate-50: #f6fbff;
  --bg-slate-100: #eef7fd;
  --panel-bg: rgba(255, 255, 255, 0.72);
  --panel-border: rgba(255, 255, 255, 0.62);
  --glass-bg: rgba(255, 255, 255, 0.56);
  --glass-border: rgba(255, 255, 255, 0.58);
  --ink: #0b1f3d;
  --muted: #53657c;
  --line: rgba(48, 80, 160, 0.12);
  --primary-cyan: #30b0e0;
  --primary-blue: #3050a0;
  --primary-sky: #30c0e0;
  --navy: #0b1f3d;
  --emerald: #10b981;
  --danger: #ef4444;
  --orange: #f97316;
  --ring: rgba(48, 176, 224, 0.22);
  --glow-shadow: 0 20px 50px rgba(11, 31, 61, 0.08), 0 0 32px rgba(48, 176, 224, 0.12);
  --lift-shadow: 0 28px 70px rgba(11, 31, 61, 0.14), 0 0 30px rgba(48, 176, 224, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(48, 176, 224, 0.24), transparent 34rem),
    radial-gradient(circle at 92% 12%, rgba(48, 80, 160, 0.18), transparent 32rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(238, 247, 253, 0.82)),
    var(--bg-slate-50);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(48, 80, 160, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(48, 80, 160, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 78%);
}

.glass-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.56));
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--panel-border);
  box-shadow: 
    var(--glow-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  border-radius: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.68), transparent 38%),
    radial-gradient(circle at 12% 0%, rgba(48, 176, 224, 0.12), transparent 22rem);
}

.glass-panel > * {
  position: relative;
}

.glass-input {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(48, 80, 160, 0.12);
  border-radius: 0.9rem;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.glass-input:focus {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--primary-cyan);
  box-shadow: 
    0 0 0 4px var(--ring),
    0 10px 24px -12px rgba(48, 80, 160, 0.28);
  outline: none;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(48, 80, 160, 0.18);
  border-radius: 100px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(48, 80, 160, 0.32);
}

.sidebar {
  position: fixed;
  background:
    linear-gradient(180deg, rgba(48, 80, 160, 0.97), rgba(14, 76, 138, 0.94) 48%, rgba(48, 176, 224, 0.9)),
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.32), transparent 18rem) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 18px 0 50px rgba(11, 31, 61, 0.14);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  width: 4.75rem !important;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 84%);
}

.sidebar:hover {
  width: 16.5rem !important;
  box-shadow: 22px 0 58px rgba(11, 31, 61, 0.18);
}

.sidebar h1 span,
.sidebar .sidebar-footer-text div,
.sidebar .sidebar-footer-text span:not(.live-indicator) {
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.sidebar:hover h1 span,
.sidebar:hover .sidebar-footer-text div,
.sidebar:hover .sidebar-footer-text span:not(.live-indicator) {
  opacity: 1;
  pointer-events: auto;
}

.sidebar h1 img {
  min-width: 2.15rem;
  height: 2.15rem;
  transition: transform 0.25s ease;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.25rem;
  box-shadow: 0 16px 34px rgba(11, 31, 61, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.sidebar:hover h1 img {
  transform: scale(1.05);
}

.menu-link {
  display: flex;
  align-items: center;
  width: 100%;
  border-radius: 0.75rem;
  padding: 0.7rem 1.1rem; /* aligns icons in collapsed state */
  color: rgba(255, 255, 255, 0.86) !important;
  text-decoration: none;
  margin-bottom: 0.4rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  border: none;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.menu-link i {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 1.1rem;
  min-width: 1.5rem;
  text-align: center;
  transition: color 0.2s ease;
}

.menu-link span {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  margin-left: 0.5rem;
  transition: opacity 0.15s ease, max-width 0.15s ease;
  display: inline-block;
  vertical-align: middle;
}

.sidebar:hover .menu-link span {
  opacity: 1;
  max-width: 200px;
}

.menu-link:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  transform: translateX(4px);
}

.menu-link:hover i {
  color: #ffffff !important;
}

.menu-link.active {
  background: rgba(255, 255, 255, 0.96) !important;
  color: var(--primary-blue) !important;
  font-weight: 800;
  border-color: rgba(255, 255, 255, 0.68) !important;
  box-shadow: 0 18px 34px rgba(11, 31, 61, 0.16);
}

.menu-link.active i {
  color: var(--primary-blue) !important;
}

.main-content {
  margin-left: 4.75rem !important;
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.live-indicator {
  animation: pulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Card raising micro-interactions */
.card-raise {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-raise:hover {
  transform: translateY(-4px);
  box-shadow: 
    var(--lift-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  border-color: rgba(48, 176, 224, 0.32);
  background: rgba(255, 255, 255, 0.9);
}

/* Beautiful drop zone styles */
.upload-drop-zone {
  border: 2px dashed rgba(48, 176, 224, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.4);
  border-radius: 1rem;
}

.upload-drop-zone:hover, .upload-drop-zone.dragover {
  border-color: var(--primary-cyan);
  background: rgba(48, 176, 224, 0.07);
  transform: scale(1.01);
  box-shadow: 0 10px 25px -10px rgba(48, 176, 224, 0.24);
}

/* Translucent Tables */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.56);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem;
}

.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
  background-color: transparent;
}

.data-table tbody tr {
  transition: all 0.2s ease;
}

.data-table tbody tr:hover td {
  background-color: rgba(48, 176, 224, 0.055);
}

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

/* Premium pills */
.badge-pill {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.1875rem 0.625rem;
  font-size: 0.75rem;
  letter-spacing: 0.025em;
  border: 1px solid transparent;
}

.badge-pill-emerald {
  background-color: rgba(16, 185, 129, 0.08);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.18);
}

.badge-pill-amber {
  background-color: rgba(245, 158, 11, 0.08);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.18);
}

.badge-pill-rose {
  background-color: rgba(239, 68, 68, 0.08);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.18);
}

.badge-pill-violet {
  background-color: rgba(139, 92, 246, 0.08);
  color: #5b21b6;
  border-color: rgba(139, 92, 246, 0.18);
}

.badge-pill-slate {
  background-color: rgba(100, 116, 139, 0.08);
  color: #334155;
  border-color: rgba(100, 116, 139, 0.18);
}

/* Custom premium buttons */
.btn-premium-primary {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-cyan) 100%);
  color: white;
  font-weight: 700;
  box-shadow: 
    0 16px 32px rgba(48, 80, 160, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
}

.btn-premium-primary:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 20px 40px rgba(48, 80, 160, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  filter: brightness(1.05);
}

.btn-premium-primary:active {
  transform: translateY(0.5px);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.35);
}

.btn-premium-success {
  background: linear-gradient(135deg, var(--emerald) 0%, #059669 100%);
  color: white;
  font-weight: 700;
  box-shadow: 
    0 4px 14px rgba(16, 185, 129, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
}

.btn-premium-success:hover {
  transform: translateY(-1.5px);
  box-shadow: 
    0 6px 20px rgba(16, 185, 129, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  filter: brightness(1.05);
}

.btn-premium-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: white;
  font-weight: 700;
  box-shadow: 
    0 4px 14px rgba(239, 68, 68, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
}

.btn-premium-danger:hover {
  transform: translateY(-1.5px);
  box-shadow: 
    0 6px 20px rgba(239, 68, 68, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  filter: brightness(1.05);
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.9);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.brand-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(48, 80, 160, 0.98), rgba(14, 76, 138, 0.94) 48%, rgba(48, 176, 224, 0.88)),
    radial-gradient(circle at 82% 0%, rgba(255, 255, 255, 0.28), transparent 20rem);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 26px 70px rgba(11, 31, 61, 0.16);
}

.brand-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 82%);
}

.brand-logo-tile {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 38px rgba(11, 31, 61, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.surface-band {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(48, 80, 160, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

@media (max-width: 767px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0 !important;
    padding-top: 3.5rem;
  }
}
