/* Miffy Panel - Landio Inspired Theme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

:root {
  --bg-primary: #09090b;
  --bg-secondary: #0f0f11;
  --bg-tertiary: #161618;
  --bg-card: #18181b;
  --bg-card-hover: #1c1c1f;
  --bg-nav: #111113;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --shadow: rgba(0, 0, 0, 0.5);
  --shadow-lg: rgba(0, 0, 0, 0.8);
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #06b6d4;
  --gradient-purple: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Animated gradient background like Landio */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 60% at 50% -30%, rgba(99, 102, 241, 0.15), transparent 70%),
    radial-gradient(ellipse 50% 50% at 90% 80%, rgba(139, 92, 246, 0.1), transparent 60%),
    radial-gradient(ellipse 40% 40% at 10% 60%, rgba(59, 130, 246, 0.08), transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: gradientShift 15s ease-in-out infinite;
}

/* Secondary animated layer */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle 600px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(99, 102, 241, 0.06), transparent 40%);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body:hover::after {
  opacity: 1;
}

@keyframes gradientShift {
  0%, 100% {
    background: 
      radial-gradient(ellipse 80% 60% at 50% -30%, rgba(99, 102, 241, 0.15), transparent 70%),
      radial-gradient(ellipse 50% 50% at 90% 80%, rgba(139, 92, 246, 0.1), transparent 60%),
      radial-gradient(ellipse 40% 40% at 10% 60%, rgba(59, 130, 246, 0.08), transparent 50%);
  }
  25% {
    background: 
      radial-gradient(ellipse 70% 50% at 30% -20%, rgba(139, 92, 246, 0.15), transparent 70%),
      radial-gradient(ellipse 60% 60% at 80% 90%, rgba(99, 102, 241, 0.1), transparent 60%),
      radial-gradient(ellipse 50% 50% at 20% 50%, rgba(59, 130, 246, 0.08), transparent 50%);
  }
  50% {
    background: 
      radial-gradient(ellipse 90% 70% at 70% -10%, rgba(59, 130, 246, 0.12), transparent 70%),
      radial-gradient(ellipse 40% 40% at 10% 70%, rgba(99, 102, 241, 0.1), transparent 60%),
      radial-gradient(ellipse 60% 60% at 90% 40%, rgba(139, 92, 246, 0.08), transparent 50%);
  }
  75% {
    background: 
      radial-gradient(ellipse 60% 50% at 80% -25%, rgba(99, 102, 241, 0.14), transparent 70%),
      radial-gradient(ellipse 70% 70% at 20% 85%, rgba(59, 130, 246, 0.1), transparent 60%),
      radial-gradient(ellipse 45% 45% at 60% 55%, rgba(139, 92, 246, 0.08), transparent 50%);
  }
}

#particle-canvas {
  display: none;
}

/* Typography - Landio style */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.italic-accent, .accent-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

/* Navigation Bar - Landio pill style */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 48px;
}

.navbar-brand {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.brand-logo.jump-spin {
  animation: jumpSpin 0.6s ease-out;
}

.brand-logo.coin-flip {
  animation: coinFlip 0.8s ease-in-out;
}

.brand-logo.go-crazy {
  animation: goCrazy 4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes jumpSpin {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  30% {
    transform: translateY(-20px) rotate(180deg);
  }
  50% {
    transform: translateY(-25px) rotate(270deg);
  }
  70% {
    transform: translateY(-15px) rotate(330deg);
  }
  100% {
    transform: translateY(0) rotate(360deg);
  }
}

@keyframes coinFlip {
  0% {
    transform: perspective(400px) rotateY(0deg);
  }
  100% {
    transform: perspective(400px) rotateY(360deg);
  }
}

@keyframes goCrazy {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  2% { transform: translate(30px, 20px) rotate(45deg); opacity: 1; }
  4% { transform: translate(65px, 45px) rotate(90deg); opacity: 1; }
  6% { transform: translate(105px, 75px) rotate(135deg); opacity: 1; }
  8% { transform: translate(150px, 110px) rotate(180deg); opacity: 1; }
  10% { transform: translate(200px, 150px) rotate(225deg); opacity: 1; }
  12% { transform: translate(255px, 195px) rotate(270deg); opacity: 1; }
  14% { transform: translate(315px, 245px) rotate(315deg); opacity: 1; }
  16% { transform: translate(380px, 300px) rotate(360deg); opacity: 1; }
  18% { transform: translate(450px, 360px) rotate(405deg); opacity: 1; }
  20% { transform: translate(525px, 425px) rotate(450deg); opacity: 1; }
  22% { transform: translate(605px, 495px) rotate(495deg); opacity: 1; }
  24% { transform: translate(690px, 570px) rotate(540deg); opacity: 1; }
  26% { transform: translate(780px, 650px) rotate(585deg); opacity: 1; }
  28% { transform: translate(875px, 735px) rotate(630deg); opacity: 0.95; }
  30% { transform: translate(975px, 825px) rotate(675deg); opacity: 0.9; }
  32% { transform: translate(1080px, 920px) rotate(720deg); opacity: 0.8; }
  34% { transform: translate(1190px, 1020px) rotate(765deg); opacity: 0.6; }
  36% { transform: translate(1305px, 1125px) rotate(810deg); opacity: 0.3; }
  38% { transform: translate(1425px, 1235px) rotate(855deg); opacity: 0; }
  /* Teleport to top-left */
  40% { transform: translate(-200px, -200px) rotate(855deg); opacity: 0; }
  42% { transform: translate(-190px, -190px) rotate(870deg); opacity: 0.1; }
  44% { transform: translate(-175px, -175px) rotate(885deg); opacity: 0.2; }
  46% { transform: translate(-158px, -158px) rotate(900deg); opacity: 0.3; }
  48% { transform: translate(-140px, -140px) rotate(915deg); opacity: 0.4; }
  50% { transform: translate(-122px, -122px) rotate(930deg); opacity: 0.5; }
  52% { transform: translate(-105px, -105px) rotate(945deg); opacity: 0.55; }
  54% { transform: translate(-90px, -90px) rotate(960deg); opacity: 0.6; }
  56% { transform: translate(-76px, -76px) rotate(975deg); opacity: 0.65; }
  58% { transform: translate(-64px, -64px) rotate(990deg); opacity: 0.7; }
  60% { transform: translate(-53px, -53px) rotate(1005deg); opacity: 0.75; }
  62% { transform: translate(-44px, -44px) rotate(1020deg); opacity: 0.78; }
  64% { transform: translate(-36px, -36px) rotate(1035deg); opacity: 0.81; }
  66% { transform: translate(-29px, -29px) rotate(1050deg); opacity: 0.84; }
  68% { transform: translate(-23px, -23px) rotate(1065deg); opacity: 0.87; }
  70% { transform: translate(-18px, -18px) rotate(1080deg); opacity: 0.9; }
  74% { transform: translate(-12px, -12px) rotate(1095deg); opacity: 0.92; }
  78% { transform: translate(-8px, -8px) rotate(1110deg); opacity: 0.94; }
  82% { transform: translate(-5px, -5px) rotate(1125deg); opacity: 0.96; }
  86% { transform: translate(-3px, -3px) rotate(1140deg); opacity: 0.98; }
  90% { transform: translate(-1.5px, -1.5px) rotate(1155deg); opacity: 0.99; }
  95% { transform: translate(-0.5px, -0.5px) rotate(1165deg); opacity: 1; }
  100% { transform: translate(0, 0) rotate(1170deg); opacity: 1; }
}

/* Landio-style nav pills container */
.nav-menu {
  display: flex;
  gap: 0;
  list-style: none;
  background: var(--bg-nav);
  padding: 6px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
}

.nav-item {
  position: relative;
}

.nav-link {
  padding: 10px 20px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.2s ease;
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Dropdown - Landio style */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 20px 60px var(--shadow-lg);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  padding: 8px;
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: block;
  padding: 12px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  border-radius: 12px;
  font-size: 0.875rem;
}

.dropdown-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.dropdown-item.active {
  background: var(--accent-glow);
  color: var(--accent);
}

/* Custom select wrapper for better styling */
.select-wrapper {
  position: relative;
  display: inline-block;
}

.select-wrapper::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Page Content */
.page-content {
  margin-top: 72px;
  padding: 40px 32px;
  min-height: calc(100vh - 72px);
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.page-section {
  display: none;
  animation: fadeIn 0.4s ease;
}

.page-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections - Landio card style */
.section {
  background: var(--bg-card);
  margin: 24px 0;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.section:hover {
  border-color: var(--border-hover);
}

.section:hover::before {
  opacity: 1;
}

.section h2 {
  font-size: 1.25rem;
  margin-bottom: 24px;
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.02em;
}

.section h2::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--accent);
  border-radius: 2px;
}

/* Buttons - Landio dark style */
button, .btn {
  padding: 12px 24px;
  margin: 4px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  font-family: inherit;
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

button:hover, .btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

button:active, .btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.btn-danger {
  background: var(--bg-tertiary);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: none;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

.btn-success {
  background: var(--bg-tertiary);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
  box-shadow: none;
}

.btn-success:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--success);
}

.btn-warning {
  background: var(--bg-tertiary);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: none;
}

.btn-warning:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
  border-radius: 10px;
}

/* Secondary/Ghost button */
.btn-secondary, .btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover, .btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Inputs - Landio style */
input, select, textarea {
  padding: 14px 18px;
  margin: 4px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

/* Select specific styling */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 48px;
  cursor: pointer;
}

select option {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 0;
}

select option:hover,
select option:focus,
select option:checked {
  background: var(--accent);
  color: white;
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: var(--bg-tertiary);
}

input:hover, select:hover, textarea:hover {
  border-color: var(--border-hover);
}

/* Tables - Landio style */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--bg-secondary);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

th {
  background: var(--bg-tertiary);
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-tertiary);
}

/* Cards - Landio style */
.user-menu, .card {
  background: var(--bg-card);
  padding: 24px;
  margin: 16px 0;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.user-menu:hover, .card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Stats Cards - Landio feature box style */
.stats-card {
  background: var(--gradient-purple);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.stats-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent 70%);
  pointer-events: none;
}

/* Clock Status */
.clock-status {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 16px;
  margin: 16px 0;
  border: 1px solid var(--border-color);
}

.clock-status.clocked-in {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  border-color: rgba(34, 197, 94, 0.3);
}

/* Loading Spinner */
.spinner {
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Scrollbar - Landio style */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Hidden */
.hidden {
  display: none !important;
}

/* Messages */
.error {
  color: var(--danger);
  margin: 12px 0;
  padding: 14px 18px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 12px;
  border-left: 4px solid var(--danger);
  font-size: 0.9rem;
}

.success {
  color: var(--success);
  margin: 12px 0;
  padding: 14px 18px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 12px;
  border-left: 4px solid var(--success);
  font-size: 0.9rem;
}

/* Theme Toggle - hidden in Landio style */
.theme-toggle {
  display: none;
}

/* Header */
.header {
  background: var(--bg-card);
  padding: 24px 28px;
  border-radius: 16px;
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-color);
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Geo Badge */
.geo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border-radius: 50px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.geo-badge strong {
  color: var(--text-primary);
}

/* User Card */
.user-card {
  position: relative;
}

.user-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.seedphrase-display {
  background: var(--bg-secondary);
  padding: 16px;
  border-radius: 12px;
  font-family: 'SF Mono', 'Fira Code', Monaco, monospace;
  font-size: 0.875rem;
  word-break: break-all;
  margin-top: 16px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* Company Accordion - Landio style */
.company-group {
  margin-bottom: 16px;
}

.company-header {
  background: var(--bg-tertiary);
  padding: 16px 20px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
}

.company-header:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.company-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
}

.company-count {
  background: var(--accent);
  color: white;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.company-pages {
  display: none;
  padding-left: 16px;
}

.company-group.expanded .company-pages {
  display: block;
}

/* Modal - Landio style */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 32px;
  max-width: 90vw;
  max-height: 90vh;
  border: 1px solid var(--border-color);
  box-shadow: 0 32px 100px var(--shadow-lg);
  position: relative;
  overflow: auto;
  animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-body {
  margin-bottom: 24px;
  color: var(--text-secondary);
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.modal.floating-cards-modal {
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  border: none;
}

/* Preview Modal */
.preview-modal {
  max-width: 1000px;
  width: 90vw;
}

.preview-iframe {
  width: 100%;
  height: 65vh;
  border: none;
  border-radius: 12px;
  background: white;
}

/* Flow Page Selector */
.flow-page-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.flow-page-card {
  background: var(--bg-tertiary);
  padding: 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
  text-align: center;
}

.flow-page-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.flow-page-card.selected {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.flow-page-card h4 {
  margin: 0 0 6px 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.flow-page-card p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Page Selector Container */
.page-selector-container {
  min-height: 400px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Floating Cards */
.floating-cards-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.floating-cards-overlay * {
  pointer-events: auto;
}

.floating-cards-title {
  text-align: center;
  color: var(--text-primary);
  margin: 28px 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.floating-cards-close {
  position: fixed;
  top: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 44px;
  height: 44px;
  z-index: 10003;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-cards-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.floating-cards-footer {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10002;
  background: var(--bg-card);
  padding: 12px 24px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
}

.floating-cards-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.company-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 24px;
}

.company-card {
  background: var(--bg-card);
  padding: 28px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  text-align: center;
  position: fixed;
  width: 200px;
  pointer-events: auto;
  animation: floatIn 0.5s ease backwards;
}

.company-card.floating-card {
  animation: floatIn 0.5s ease backwards, gentleFloat 8s ease-in-out infinite;
  animation-delay: 0s, var(--float-delay, 0s);
}

@keyframes floatIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gentleFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, -10px); }
}

.company-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.company-card-content h3 {
  margin: 0 0 10px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
}

.company-page-count {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Page Grid */
.page-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 0;
}

.page-grid-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
  text-align: center;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-grid-card.empty {
  background: transparent;
  border: 1px dashed var(--border-color);
  cursor: default;
}

.page-grid-card:not(.empty):hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.page-grid-card-content {
  width: 100%;
}

.page-grid-card-content h4 {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}

.page-grid-id {
  margin: 0;
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-family: 'SF Mono', Monaco, monospace;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
    height: 64px;
  }
  
  .navbar-left {
    gap: 20px;
  }
  
  .nav-menu {
    padding: 4px;
    border-radius: 40px;
  }
  
  .nav-link {
    padding: 8px 14px;
    font-size: 0.8125rem;
  }
  
  .page-content {
    padding: 24px 16px;
    margin-top: 64px;
  }
  
  .section {
    padding: 20px;
    border-radius: 16px;
  }
  
  .page-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* Status indicators - Landio style */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.status-dot.online { 
  background: var(--success); 
  box-shadow: 0 0 12px var(--success); 
}
.status-dot.offline { background: var(--text-muted); }
.status-dot.warning { 
  background: var(--warning); 
  box-shadow: 0 0 12px var(--warning); 
}

/* Badge styles - Landio pill style */
.badge {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-block;
}

.badge-admin {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
}

.badge-user {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: white;
}

/* Info button */
.btn-info {
  background: var(--bg-tertiary);
  color: var(--info);
  border: 1px solid rgba(6, 182, 212, 0.3);
  box-shadow: none;
}

.btn-info:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--info);
}

/* Landio-style form group with icon */
.form-group {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}

.form-group-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.form-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.25rem;
}

.form-group-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.form-group-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 8px 0 16px 0;
}

.form-link {
  color: var(--accent);
  text-decoration: underline;
  font-size: 0.875rem;
}

.form-link:hover {
  color: var(--accent-hover);
}

/* Login page specific */
.login-container {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 40px;
  border: 1px solid var(--border-color);
  box-shadow: 0 32px 100px var(--shadow-lg);
}

.login-container h1 {
  color: var(--accent);
  margin-bottom: 32px;
}

.login-container input {
  width: 100%;
  margin: 8px 0;
}

.login-container button {
  width: 100%;
  margin-top: 16px;
}
