.top-nav {
  background: #374151;
  border-bottom: 2px solid var(--accent-primary);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md)
}
.top-nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl)
}
.top-nav-left {
  display: flex;
  align-items: baseline;
  gap: var(--space-md)
}
.page-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-white);
  margin: 0;
  letter-spacing: -.02em
}
.page-subtitle {
  font-size: var(--font-size-sm);
  color: #e5e7eb;
  font-weight: 500
}
.top-nav-right {
  display: flex;
  align-items: center
}
.app-container {
  display: flex;
  margin-top: var(--topnav-height);
  padding: 0;
  background: 0 0
}
.main-ce-container {
  display: flex;
  position: relative;
  min-height: calc(100vh - var(--topnav-height))
}
.project-content {
  flex: 1;
  min-height: calc(100vh - var(--topnav-height));
  padding: var(--space-xl);
  background: var(--bg-light);
  overflow-x: auto;
}
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  left: 0;
  top: var(--topnav-height);
  height: auto;
  min-height: calc(100vh - var(--topnav-height));
  z-index: 100;
  overflow: visible;
  background: var(--bg-white);
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column
}
.main-container {
  display: flex;
  position: relative
}
.content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: calc(100vh - var(--topnav-height));
  padding: var(--space-xl);
  background: var(--bg-light)
}
.main-content {
  background: var(--bg-light);
  min-width: calc(100vw - var(--sidebar-width))
}
.content-area {
  max-width: var(--content-max-width);
  margin: 0 auto
}
@media (max-width:1024px) {
  .top-nav-container {
    padding: 0 var(--space-md)
  }
  .page-subtitle {
    display: none
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-smooth)
  }
  .sidebar.open {
    transform: translateX(0)
  }
  .main-content {
    margin-left: 0
  }
}
@media (max-width:768px) {
  .top-nav-container {
    padding: 0 var(--space-md)
  }
  .page-title {
    font-size: var(--font-size-xl)
  }
  .main-content {
    padding: var(--space-md)
  }
}
body,
html {
  background: var(--bg-light)
}

/* ============================================
   Main Layout
   (migrated from MainLayout.razor.css)
   ============================================ */

.page {
    position: relative;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.sidebar {
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    box-shadow: 1px 0 3px 0 rgba(0, 0, 0, 0.1);
}

.top-row {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.top-row a, .top-row .btn-link {
    white-space: nowrap;
    margin-left: 1.5rem;
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
}

.top-row a:hover, .top-row .btn-link:hover {
    text-decoration: none;
    color: #1d4ed8;
}

.top-row a:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640.98px) {
    .top-row {
        justify-content: space-between;
    }

    .top-row a, .top-row .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 280px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row.auth a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row, article {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fef3c7;
    bottom: 0;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-top: 1px solid #f59e0b;
    color: #92400e;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    color: #92400e;
    font-weight: bold;
}

#blazor-error-ui .dismiss:hover {
    color: #78350f;
}