:root {
  --bg-primary: #070a0f;
  --bg-secondary: #0b1018;
  --bg-surface: rgba(13, 18, 28, 0.82);
  --bg-card: rgba(18, 25, 37, 0.68);
  --bg-card-strong: rgba(21, 29, 43, 0.9);
  --bg-hover: rgba(39, 52, 73, 0.72);
  --border-subtle: rgba(226, 232, 240, 0.09);
  --border-strong: rgba(226, 232, 240, 0.16);
  --text-primary: #f7fafc;
  --text-secondary: #a8b3c5;
  --text-muted: #6f7d91;
  --accent-primary: #7dd3fc;
  --accent-secondary: #a7f3d0;
  --accent-tertiary: #c4b5fd;
  --accent-gradient: linear-gradient(135deg, #7dd3fc 0%, #a7f3d0 52%, #c4b5fd 100%);
  --accent-glow: rgba(125, 211, 252, 0.18);
  --status-active: #34d399;
  --status-pending: #fbbf24;
  --status-urgent: #fb7185;
  --status-info: #60a5fa;
  --sidebar-width: 268px;
  --topbar-height: 72px;
  --radius-lg: 8px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.32);
  --transition-smooth: 180ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(145deg, rgba(11, 16, 24, 0.96), rgba(7, 10, 15, 0.98) 48%, rgba(10, 17, 25, 0.98)),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.03) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.03) 0 1px, transparent 1px 40px);
  color: var(--text-primary);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(125, 211, 252, 0.08), transparent 32%, rgba(167, 243, 208, 0.055) 68%, transparent),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.28));
  animation: gridDrift 24s linear infinite;
  z-index: -1;
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 0 0, 44px 44px, 44px 44px; }
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: rgba(8, 12, 19, 0.86);
  border-right: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sidebar-header {
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-tile {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.95), rgba(167, 243, 208, 0.78));
  color: #06111a;
  font-weight: 900;
}

.brand-logo strong,
.brand-logo small {
  display: block;
}

.brand-logo strong {
  font-size: 0.98rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand-logo small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.73rem;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section-title {
  padding: 10px 10px 8px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-item {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 560;
  text-decoration: none;
  transition: color var(--transition-smooth), background var(--transition-smooth), border-color var(--transition-smooth);
}

.nav-item:hover,
.nav-item.active {
  background: rgba(125, 211, 252, 0.08);
  border-color: rgba(125, 211, 252, 0.16);
  color: var(--text-primary);
}

svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex: 0 0 auto;
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  padding: 14px 12px 18px;
  border-top: 1px solid var(--border-subtle);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.system-status span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--status-active);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.72);
}

.logout-button,
.icon-button,
.btn,
button.primary,
button.secondary {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 650;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), background var(--transition-smooth), color var(--transition-smooth);
}

.logout-button {
  width: 100%;
  justify-content: flex-start;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.logout-button:hover {
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.25);
  color: #fecdd3;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
  background: rgba(8, 12, 19, 0.72);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-actions {
  justify-content: flex-end;
}

.eyebrow {
  color: var(--accent-primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.topbar-title {
  margin-top: 1px;
  color: var(--text-primary);
  font-size: 1.12rem;
  font-weight: 760;
  letter-spacing: 0;
}

.icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-decoration: none;
}

.icon-button:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-secondary);
  box-shadow: 0 0 12px rgba(167, 243, 208, 0.75);
}

.mobile-menu-button {
  display: none;
}

.user-profile-badge {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 6px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  max-width: 320px;
}

.avatar-circle {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #06111a;
  font-size: 0.8rem;
  font-weight: 900;
}

.user-meta {
  min-width: 0;
}

.user-meta strong,
.user-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta strong {
  font-size: 0.82rem;
}

.user-meta small {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: capitalize;
}

.workspace-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.page-heading h2 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 760;
  letter-spacing: 0;
}

.page-heading p {
  margin-top: 4px;
  max-width: 680px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.panel-card,
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.panel-card {
  padding: 18px;
}

.panel-card:hover {
  border-color: var(--border-strong);
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title h2 {
  font-size: 1rem;
  font-weight: 720;
}

.section-title span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 760;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.active,
.status-pill.completed,
.status-pill.development {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.22);
  color: var(--status-active);
}

.status-pill.pending,
.status-pill.in-progress,
.status-pill.planning {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.2);
  color: var(--status-pending);
}

.status-pill.high,
.status-pill.urgent {
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.22);
  color: var(--status-urgent);
}

.empty-state {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.empty-state-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  color: var(--accent-primary);
}

.empty-state-icon svg {
  width: 32px;
  height: 32px;
}

.empty-state-title {
  font-size: 1rem;
  font-weight: 760;
}

.empty-state-desc {
  max-width: 380px;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.primary,
button.primary,
.btn-primary {
  padding: 0 14px;
  background: var(--accent-gradient);
  color: #06111a;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.secondary,
button.secondary,
.btn-secondary {
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.primary:hover,
.secondary:hover,
.btn:hover {
  transform: translateY(-1px);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(8, 12, 19, 0.72);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth), background var(--transition-smooth);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(125, 211, 252, 0.48);
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.1);
}

.progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress div {
  height: 100%;
  background: var(--accent-gradient);
  transition: width 280ms ease;
}

.hidden-panel {
  display: none;
}

@media (max-width: 1024px) {
  .app-sidebar {
    transform: translateX(-104%);
    transition: transform var(--transition-smooth);
  }

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

  .app-main {
    margin-left: 0;
  }

  .mobile-menu-button {
    display: inline-flex;
  }
}

@media (max-width: 720px) {
  .app-topbar {
    padding: 12px 16px;
  }

  .workspace-container {
    padding: 18px 14px 24px;
  }

  .page-heading {
    display: grid;
  }

  .user-profile-badge {
    max-width: 44px;
    padding: 5px;
  }

  .user-meta {
    display: none;
  }
}
