/* ==========================================================================
   Techgirda Nigeria — AI Structural Studio
   Central Webapp Stylesheet: base.css
   Derived from Homepage Design System: Blueprint Dark, Glassmorphism & High-Contrast Typography
   ========================================================================== */

/* ── Custom Design Tokens ────────────────────────────────────────────────── */
:root {
  /* Homepage Palette & Deep Dark Blueprints */
  --bg-deep: #07111d;
  --bg-main: #0b1726;
  --bg-surface: #0e2238;
  --bg-surface-elevated: #132a45;
  --bg-panel: rgba(13, 31, 49, 0.78);
  --bg-panel-strong: rgba(14, 38, 58, 0.92);
  --bg-input: rgba(7, 17, 29, 0.75);

  /* Tech Accents */
  --cyan: #2ec4ff;
  --cyan-light: #73ddff;
  --cyan-dark: #0099e6;
  --cyan-glow: rgba(46, 196, 255, 0.28);
  --blue: #2563eb;
  --blue-light: #38bdf8;
  --green: #2ed573;
  --green-soft: rgba(46, 213, 115, 0.16);
  --orange: #ffb142;
  --orange-soft: rgba(255, 177, 66, 0.16);
  --red: #ff4757;
  --red-soft: rgba(255, 71, 87, 0.16);
  --indigo: #6366f1;
  --purple: #a855f7;

  /* Typography Colors */
  --text-main: #f4fbff;
  --text-body: #e2e8f0;
  --text-muted: #94a3b8;
  --text-soft: #a7bfd0;
  --text-dim: #64748b;

  /* Structural Borders & Shadows */
  --border-subtle: rgba(112, 211, 255, 0.12);
  --border: rgba(46, 196, 255, 0.22);
  --border-strong: rgba(46, 196, 255, 0.42);
  --border-focus: #2ec4ff;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 22px rgba(46, 196, 255, 0.22);

  /* Component Aliases */
  --bg: var(--bg-deep);
  --text: var(--text-main);
  --muted: var(--text-muted);
  --card: var(--bg-panel);
  --card-elevated: var(--bg-surface-elevated);
  --accent: var(--cyan);
  --accentLight: rgba(46, 196, 255, 0.14);
  --accentDark: var(--cyan-dark);
  --danger: var(--red);
  --success: var(--green);
  --warning: var(--orange);
  --chip: rgba(46, 196, 255, 0.08);
  --chipHover: rgba(46, 196, 255, 0.18);

  /* Fonts */
  --font-heading: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", Consolas, monospace;

  /* Sizing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --nav-h: 68px;
  --sidebar-w: 260px;
}

/* ── Reset & Document Base ────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(rgba(46, 196, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 196, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
  color: var(--text-body);
  min-height: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

p, li, label, span {
  font-family: var(--font-body);
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

a:hover {
  color: var(--cyan-light);
  text-shadow: 0 0 10px rgba(46, 196, 255, 0.4);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

img, svg {
  vertical-align: middle;
  max-width: 100%;
}

/* ── Master Topbar ────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  height: var(--nav-h);
  position: sticky;
  top: 0;
  background: rgba(7, 17, 29, 0.88);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(46, 196, 255, 0.12);
  border: 1px solid rgba(46, 196, 255, 0.35);
  box-shadow: 0 0 12px rgba(46, 196, 255, 0.25);
  flex-shrink: 0;
}

.brand-icon svg,
.brand-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(46, 196, 255, 0.45));
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.15;
}

.brand-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--cyan);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Desktop Navigation Links */
.nav-links-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links-desktop a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-links-desktop a::after {
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 2px;
  content: "";
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links-desktop a:hover,
.nav-links-desktop a.active {
  color: var(--text-main);
  background: rgba(46, 196, 255, 0.1);
  text-shadow: none;
}

.nav-links-desktop a:hover::after,
.nav-links-desktop a.active::after {
  transform: scaleX(1);
}

.nav-links-desktop a.active {
  color: var(--cyan);
}

/* Topbar Actions */
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  flex-shrink: 0;
}

.search-wrapper {
  position: relative;
  width: 240px;
}

.search-input {
  width: 100%;
  padding: 8px 14px 8px 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 13px;
  transition: all 0.2s ease;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
  outline: none;
  background: rgba(13, 31, 49, 0.9);
}

.search-icon-inside {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 280px;
  overflow-y: auto;
  display: none;
  z-index: 100;
  backdrop-filter: blur(14px);
}

.search-dropdown.show {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.12s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(46, 196, 255, 0.12);
  color: var(--text-main);
  text-shadow: none;
}

.search-result-badge {
  font-size: 10.5px;
  color: var(--cyan);
  font-family: var(--font-mono);
  background: rgba(46, 196, 255, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
}

/* Upgrade Pill */
.upgrade-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(46, 196, 255, 0.18) 0%, rgba(37, 99, 235, 0.25) 100%);
  border: 1px solid var(--border);
  color: var(--cyan-light);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-heading);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.upgrade-pill:hover {
  background: linear-gradient(135deg, rgba(46, 196, 255, 0.3) 0%, rgba(37, 99, 235, 0.4) 100%);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(46, 196, 255, 0.35);
  color: #fff;
}

/* Icon Buttons */
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(13, 31, 49, 0.7);
  color: var(--text-main);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(46, 196, 255, 0.15);
  border-color: var(--cyan);
  color: var(--cyan-light);
}

/* Avatar & Profile Menu */
.avatar-wrap {
  position: relative;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
  color: #07111d;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid rgba(46, 196, 255, 0.3);
  box-shadow: 0 0 12px rgba(46, 196, 255, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(46, 196, 255, 0.45);
}

.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 240px;
  background: #0b1a2d;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 1200;
  display: none;
  backdrop-filter: blur(16px);
}

.profile-menu.open {
  display: block;
  animation: fadeInDown 0.18s ease;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(7, 17, 29, 0.5);
  border-bottom: 1px solid var(--border-subtle);
}

.profile-avatar-lg {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
  color: #07111d;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
}

.profile-email {
  font-size: 11.5px;
  color: var(--text-muted);
}

.profile-divider {
  height: 1px;
  background: var(--border-subtle);
}

.profile-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 13.5px;
  color: var(--text-body);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
}

.profile-item:hover {
  background: rgba(46, 196, 255, 0.1);
  color: var(--text-main);
}

.profile-item.danger {
  color: var(--red);
}

.profile-item.danger:hover {
  background: var(--red-soft);
}

/* ── Mobile Navigation Drawer ────────────────────────────────────────────── */
.menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background: #071526;
  border-left: 1px solid var(--border);
  padding: 24px 20px;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1100;
  overflow-y: auto;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6);
}

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

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.menu-header h3 {
  font-size: 16px;
  font-family: var(--font-heading);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-btn {
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.close-btn:hover {
  color: var(--text-main);
  background: rgba(46, 196, 255, 0.12);
}

.menu-section-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  padding: 12px 10px 6px;
  font-family: var(--font-heading);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 3px;
  transition: all 0.15s ease;
}

.menu-item:hover, .menu-item.active {
  background: rgba(46, 196, 255, 0.12);
  color: var(--cyan-light);
  text-shadow: none;
}

.menu-item svg {
  color: var(--cyan);
  flex-shrink: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 15, 0.75);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 1050;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ── Common Responsive Layout Containers ─────────────────────────────────── */
.page-body {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.app-container, .page-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .app-container, .page-container {
    padding: 32px 32px 64px;
  }
}

/* ── Standard Page Headers ───────────────────────────────────────────────── */
.page-header,
.page-header-box,
.vcs-header,
.dir-header,
.tickets-header,
.tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
}

.page-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  flex-wrap: wrap;
}

.page-header-left,
.page-title-group,
.vcs-title-box,
.dir-header-box,
.tickets-title-box,
.tracker-title-box {
  flex: 1;
  min-width: 260px;
}

.page-header-right,
.header-actions,
.tickets-actions,
.tracker-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-title,
.page-main-title,
.dir-title,
.page-title-group h1,
.tickets-title-box h1,
.tracker-title-box h2,
.page-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  line-height: 1.25;
}

.page-subtitle,
.page-main-desc,
.vcs-subtitle,
.dir-subtitle,
.tickets-title-box p,
.page-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.page-breadcrumb a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.15s ease;
}

.page-breadcrumb a:hover {
  color: var(--cyan-light);
  text-decoration: underline;
}

.page-badge,
.cad-badge,
.badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(46, 196, 255, 0.12);
  border: 1px solid rgba(46, 196, 255, 0.3);
  color: var(--cyan-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

.page-status {
  font-size: 12px;
  color: var(--text-soft);
  font-family: var(--font-mono);
}

/* ── Glassmorphic Cards & Panels ─────────────────────────────────────────── */
.card, .panel, .glass-card, .toolbar-card, .nav-bar-card, .control-section, .auth-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.card:hover, .panel:hover, .toolbar-card:hover, .nav-bar-card:hover {
  border-color: var(--border);
}

.card-header, .panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(7, 17, 29, 0.4);
}

.card-title, .panel-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg, .panel-title svg {
  color: var(--cyan);
  flex-shrink: 0;
}

.card-body, .panel-body {
  padding: 20px;
  color: var(--text-body);
}

/* ── Standard Buttons ────────────────────────────────────────────────────── */
.btn, .primary-btn, .btn-vcs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover, .primary-btn:hover {
  text-decoration: none;
}

.btn-primary, .primary-btn {
  background: linear-gradient(135deg, #2ec4ff 0%, #0088ff 100%);
  color: #07111d !important;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 14px rgba(46, 196, 255, 0.35);
}

.btn-primary:hover, .primary-btn:hover {
  background: linear-gradient(135deg, #73ddff 0%, #2ec4ff 100%);
  box-shadow: 0 6px 22px rgba(46, 196, 255, 0.55);
  transform: translateY(-1px);
  color: #07111d !important;
}

.btn-outline {
  background: rgba(46, 196, 255, 0.08);
  border-color: var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(46, 196, 255, 0.18);
  border-color: var(--cyan);
  color: var(--cyan-light);
}

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

.btn-ghost:hover {
  background: rgba(46, 196, 255, 0.12);
  color: var(--text-main);
}

.btn-danger {
  background: rgba(255, 71, 87, 0.15);
  border-color: rgba(255, 71, 87, 0.4);
  color: #ff6b81;
}

.btn-danger:hover {
  background: #ff4757;
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 71, 87, 0.4);
}

.btn-success {
  background: rgba(46, 213, 115, 0.15);
  border-color: rgba(46, 213, 115, 0.4);
  color: #2ed573;
}

.btn-success:hover {
  background: #2ed573;
  color: #07111d;
  box-shadow: 0 4px 14px rgba(46, 213, 115, 0.4);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

.btn-full {
  width: 100%;
}

/* ── Badges & Status Pills ───────────────────────────────────────────────── */
.badge, .cad-badge, .vcs-badge, .badge-tag, .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-heading);
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(46, 196, 255, 0.12);
  border: 1px solid rgba(46, 196, 255, 0.28);
  color: var(--cyan);
  white-space: nowrap;
}

.badge-green, .badge-functioning {
  background: var(--green-soft);
  border-color: rgba(46, 213, 115, 0.35);
  color: var(--green);
}

.badge-red, .badge-non-functioning {
  background: var(--red-soft);
  border-color: rgba(255, 71, 87, 0.35);
  color: var(--red);
}

.badge-orange, .badge-warn {
  background: var(--orange-soft);
  border-color: rgba(255, 177, 66, 0.35);
  color: var(--orange);
}

.badge-gray {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
}

/* ── Form Controls & Inputs ──────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
}

.form-input, .form-select, .form-textarea,
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 14px;
  font-family: var(--font-body);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-input::placeholder, textarea::placeholder {
  color: var(--text-dim);
}

.form-input:focus, .form-select:focus, .form-textarea:focus,
input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
  outline: none;
  background: rgba(13, 31, 49, 0.9);
}

.form-hint {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 3px;
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.form-row > * {
  flex: 1;
  min-width: 160px;
}

/* ── Responsive Tables ───────────────────────────────────────────────────── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  margin: 12px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

th {
  background: rgba(46, 196, 255, 0.07);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-body);
  transition: background 0.12s ease;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(46, 196, 255, 0.05);
  color: var(--text-main);
}

/* ── Responsive Grids ────────────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ── Alerts & Notices ────────────────────────────────────────────────────── */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-error {
  background: var(--red-soft);
  border: 1px solid rgba(255, 71, 87, 0.35);
  color: #ff8596;
}

.alert-success {
  background: var(--green-soft);
  border: 1px solid rgba(46, 213, 115, 0.35);
  color: #55efc4;
}

.alert-info {
  background: rgba(46, 196, 255, 0.12);
  border: 1px solid rgba(46, 196, 255, 0.3);
  color: var(--cyan-light);
}

/* ── Empty States ────────────────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 48px 24px;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.empty-title {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 380px;
  margin: 0 auto;
}

/* ── Code Viewers & Pre Blocks ───────────────────────────────────────────── */
pre, code {
  font-family: var(--font-mono);
}

code {
  background: rgba(46, 196, 255, 0.08);
  color: var(--cyan-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  background: #040a12;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.5;
}

/* ── /ai Integrated Ambient Background, Glass Cards, Pills & CTA ──────────── */
.app-ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(46, 196, 255, 0.08), transparent 32%),
    radial-gradient(circle at 82% 65%, rgba(46, 213, 115, 0.055), transparent 34%);
}

.app-ambient-bg .grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(77, 197, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 197, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 70%, transparent 100%);
}

.app-ambient-bg .gradient-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.42;
}

.app-ambient-bg .circle-1 {
  top: -260px;
  left: -180px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(46, 196, 255, 0.28), transparent 68%);
  animation: floatGlow 12s ease-in-out infinite alternate;
}

.app-ambient-bg .circle-2 {
  right: -210px;
  bottom: -260px;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, rgba(46, 213, 115, 0.18), transparent 67%);
  animation: floatGlow 14s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(45px, 25px, 0) scale(1.08);
  }
}

.page-body,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Section Headers & Eyebrow Pills (from /ai) */
.section-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 14px;
  color: var(--cyan-light);
  border: 1px solid rgba(46, 196, 255, 0.27);
  border-radius: 999px;
  background: rgba(46, 196, 255, 0.08);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 18px rgba(46, 196, 255, 0.05);
}

.gradient-text {
  background: linear-gradient(135deg, #f4fbff 0%, #73ddff 55%, #2ec4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-glow,
.btn-primary {
  box-shadow: 0 8px 24px rgba(46, 196, 255, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-glow:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(46, 196, 255, 0.34);
}

.card,
.stat-card,
.url-card {
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cta-banner {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(117, 217, 255, 0.28);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(16, 53, 76, 0.85), rgba(5, 22, 35, 0.92));
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 0 36px rgba(46, 196, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

/* ── Full Multi-Column Footer (from /ai) ─────────────────────────────────── */
.site-footer {
  position: relative;
  padding: 74px 5.5% 24px;
  margin-top: 48px;
  overflow: hidden;
  border-top: 1px solid rgba(132, 211, 244, 0.15);
  background:
    radial-gradient(circle at 10% 0%, rgba(46, 196, 255, 0.09), transparent 26%),
    linear-gradient(180deg, #06111c 0%, #040b13 100%);
}

.site-footer::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(98, 204, 249, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 204, 249, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
  pointer-events: none;
}

.footer-container,
.footer-newsletter,
.footer-bottom {
  position: relative;
  z-index: 1;
  width: min(1380px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.footer-container {
  display: grid;
  grid-template-columns: minmax(235px, 1.55fr) repeat(4, minmax(120px, 0.72fr));
  gap: 38px;
  padding-bottom: 48px;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #e9faff;
  font-family: var(--font-heading);
  font-size: 1.03rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.footer-logo img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.footer-brand > p {
  margin: 16px 0 0;
  color: #8daeba;
  font-size: 0.78rem;
  line-height: 1.7;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.footer-social a {
  padding: 7px 9px;
  color: #9ec3d1;
  border: 1px solid rgba(133, 211, 244, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.72rem;
  text-decoration: none;
  transition: 0.2s ease;
}

.footer-social a:hover {
  transform: translateY(-2px);
  color: #e7faff;
  border-color: rgba(46, 196, 255, 0.45);
  background: rgba(46, 196, 255, 0.09);
}

.footer-column h3 {
  margin: 0 0 16px;
  color: #dff4fc;
  font-size: 0.82rem;
  font-weight: 600;
}

.footer-column ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column li,
.footer-column a {
  color: #87a8b8;
  font-size: 0.76rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-column a:hover,
.footer-column li:hover {
  color: #7fe1ff;
}

.footer-newsletter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 25px 0;
  border-top: 1px solid rgba(132, 211, 244, 0.13);
  border-bottom: 1px solid rgba(132, 211, 244, 0.13);
}

.footer-newsletter h3 {
  margin: 0;
  color: #e8f9ff;
  font-size: 0.94rem;
  font-weight: 600;
}

.footer-newsletter p {
  margin: 7px 0 0;
  color: #88a9b9;
  font-size: 0.76rem;
  line-height: 1.55;
}

.newsletter-form {
  display: flex;
  flex: 0 1 410px;
  align-items: stretch;
  gap: 8px;
}

.newsletter-form input {
  min-width: 0;
  flex: 1;
  min-height: 43px;
  padding: 0 13px;
  outline: none;
  color: #dff5fc;
  border: 1px solid rgba(134, 212, 245, 0.18);
  border-radius: 8px;
  background: rgba(2, 15, 25, 0.56);
  font-size: 0.78rem;
  transition: 0.2s ease;
}

.newsletter-form input::placeholder {
  color: rgba(143, 178, 194, 0.55);
}

.newsletter-form input:focus {
  border-color: rgba(46, 196, 255, 0.63);
  box-shadow: 0 0 0 3px rgba(46, 196, 255, 0.08);
}

.newsletter-form button {
  min-height: 43px;
  padding: 10px 16px;
  color: #04131f;
  border: 0;
  border-radius: 8px;
  background: var(--cyan);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 17px rgba(46, 196, 255, 0.16);
  transition: 0.2s ease;
}

.newsletter-form button:hover {
  transform: translateY(-2px);
  background: #7fe4ff;
  box-shadow: 0 13px 24px rgba(46, 196, 255, 0.27);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 24px;
}

.footer-bottom p {
  margin: 0;
  color: #708f9f;
  font-size: 0.73rem;
  line-height: 1.5;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 15px;
}

.legal-links a {
  color: #89a8b8;
  font-size: 0.72rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-links a:hover {
  color: #77dcff;
}

@media (max-width: 1080px) {
  .site-footer {
    padding-right: 4%;
    padding-left: 4%;
  }
  .footer-container {
    grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(120px, 1fr));
    gap: 34px 25px;
  }
  .footer-column:last-child {
    grid-column: 2 / 3;
  }
}

@media (max-width: 720px) {
  .site-footer {
    padding: 58px 22px 21px;
  }
  .footer-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 31px 22px;
    padding-bottom: 38px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    max-width: 390px;
  }
  .footer-column:last-child {
    grid-column: auto;
  }
  .footer-newsletter {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .newsletter-form {
    width: 100%;
    flex-basis: auto;
  }
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
  .legal-links {
    justify-content: flex-start;
    gap: 10px 16px;
  }
}

@media (max-width: 430px) {
  .footer-container {
    grid-template-columns: 1fr;
  }
  .footer-brand {
    grid-column: auto;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .newsletter-form button {
    width: 100%;
  }
}

/* ── Keyframe Animations ─────────────────────────────────────────────────── */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Media Queries for Full Responsiveness ───────────────────────────────── */
@media (min-width: 992px) {
  [data-menu-toggle] {
    display: none;
  }
}

@media (max-width: 991px) {
  .nav-links-desktop {
    display: none;
  }
  .search-wrapper {
    max-width: 180px;
  }
  .topbar {
    padding: 0 16px;
  }
}

@media (max-width: 640px) {
  .search-wrapper {
    display: none;
  }
  .upgrade-pill {
    display: none;
  }
  .brand-sub {
    display: none;
  }
  .topbar {
    height: 60px;
    padding: 0 14px;
  }
  .page-header,
  .page-header-box,
  .vcs-header,
  .dir-header,
  .tickets-header,
  .tracker-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 20px;
  }
  .page-header-top {
    flex-direction: column;
    gap: 12px;
  }
  .page-header-right,
  .header-actions,
  .tickets-actions,
  .tracker-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ── Theme Toggle Button & Light Theme Support ───────────────────────────── */
.theme-toggle-btn .icon-moon {
  display: none;
}

.theme-toggle-btn .icon-sun {
  display: block;
}

:root[data-theme="light"] .theme-toggle-btn .icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle-btn .icon-moon {
  display: block;
}

:root[data-theme="light"] {
  --bg-deep: #f4f8fc;
  --bg-main: #ffffff;
  --bg-surface: #eaf1f8;
  --bg-surface-elevated: #ffffff;
  --bg-panel: rgba(255, 255, 255, 0.9);
  --bg-panel-strong: rgba(255, 255, 255, 0.97);
  --bg-input: #ffffff;

  --cyan: #0284c7;
  --cyan-light: #0369a1;
  --cyan-dark: #075985;
  --cyan-glow: rgba(2, 132, 199, 0.2);
  --green: #15803d;
  --green-soft: rgba(21, 128, 61, 0.12);
  --orange: #b45309;
  --orange-soft: rgba(180, 83, 9, 0.12);
  --red: #b91c1c;
  --red-soft: rgba(185, 28, 28, 0.12);

  --text-main: #0f172a;
  --text-body: #1e293b;
  --text-muted: #475569;
  --text-soft: #334155;
  --text-dim: #64748b;

  --border-subtle: rgba(15, 23, 42, 0.1);
  --border: rgba(2, 132, 199, 0.25);
  --border-strong: rgba(2, 132, 199, 0.45);
  --border-focus: #0284c7;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.18);
}

:root[data-theme="light"] body {
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(rgba(2, 132, 199, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 132, 199, 0.05) 1px, transparent 1px);
  color: var(--text-body);
}

:root[data-theme="light"] .app-ambient-bg {
  background:
    radial-gradient(circle at 15% 20%, rgba(2, 132, 199, 0.08), transparent 34%),
    radial-gradient(circle at 82% 65%, rgba(21, 128, 61, 0.05), transparent 34%);
}

:root[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: rgba(15, 23, 42, 0.09);
}

:root[data-theme="light"] .menu,
:root[data-theme="light"] .profile-menu,
:root[data-theme="light"] .search-dropdown {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: var(--shadow-lg);
}

:root[data-theme="light"] .search-input {
  background: #f8fafc;
  color: var(--text-main);
  border-color: rgba(15, 23, 42, 0.14);
}

:root[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #0f172a 0%, #0284c7 60%, #0369a1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

:root[data-theme="light"] .cta-banner {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(232, 244, 253, 0.96));
  border-color: rgba(2, 132, 199, 0.25);
}

:root[data-theme="light"] .site-footer {
  background:
    radial-gradient(circle at 10% 0%, rgba(2, 132, 199, 0.07), transparent 28%),
    linear-gradient(180deg, #eef4fa 0%, #e4edf6 100%);
  border-top-color: rgba(15, 23, 42, 0.1);
}

:root[data-theme="light"] .footer-logo,
:root[data-theme="light"] .footer-column h3,
:root[data-theme="light"] .footer-newsletter h3 {
  color: #0f172a;
}

:root[data-theme="light"] .footer-brand > p,
:root[data-theme="light"] .footer-column li,
:root[data-theme="light"] .footer-column a,
:root[data-theme="light"] .footer-newsletter p,
:root[data-theme="light"] .footer-bottom p,
:root[data-theme="light"] .legal-links a {
  color: #475569;
}

:root[data-theme="light"] .footer-social a {
  color: #334155;
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(15, 23, 42, 0.12);
}

:root[data-theme="light"] .newsletter-form input {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.15);
}

:root[data-theme="light"] .newsletter-form button {
  color: #ffffff;
}

:root[data-theme="light"] pre {
  background: #0f172a;
  color: #f8fafc;
}
