.panel-layout {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 32px 18px 0;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.sidebar > .brand {
  margin: 0 12px 30px;
}
.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 30px;
}
.workspace .small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  margin-top: 1px;
}
.workspace-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  background: var(--hover);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.workspace-tag {
  font-size: 8px;
  letter-spacing: 0.6px;
  margin-left: auto;
  color: var(--muted);
}
.nav-heading {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 600;
  padding: 0 13px 12px;
}
nav {
  display: grid;
  gap: 5px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 550;
}
nav a:hover {
  background: var(--hover);
  color: var(--text);
}
nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--nav-active);
}
nav .icon {
  width: 18px;
  height: 18px;
}
.sidebar-bottom {
  margin-top: auto;
}
.foundation-note {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  border-radius: 9px;
  padding: 17px 14px;
  margin: 28px 2px 20px;
}
.foundation-note > .icon {
  color: var(--accent);
  width: 22px;
  height: 22px;
  margin-bottom: 10px;
}
.foundation-note strong {
  display: block;
  font-size: 11px;
}
.foundation-note p {
  font-size: 10px;
  color: var(--muted);
  margin: 4px 0 12px;
}
.foundation-note .badge {
  font-size: 9px;
}
.sidebar-user {
  margin: 0 -18px;
  padding: 17px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-summary {
  min-width: 0;
  flex: 1;
}
.user-summary strong {
  display: block;
  font-size: 11px;
}
.user-summary > span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user .icon {
  width: 16px;
  height: 16px;
}
.panel-content {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  height: 75px;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 0 38px;
  background: var(--surface);
}
.breadcrumb {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.breadcrumb strong {
  color: var(--text);
  font-weight: 550;
}
.breadcrumb-slash {
  opacity: 0.4;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
}
.menu-toggle {
  display: none;
}
#main {
  padding: 36px 38px;
  flex: 1;
  outline: none;
}
.page {
  max-width: 1320px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 9px;
}
.date-label {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.welcome-banner {
  display: flex;
  align-items: center;
  gap: 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 21px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.banner-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--success-soft);
  border-radius: 50%;
  color: var(--success);
  flex-shrink: 0;
}
.welcome-banner h2 {
  font-size: 14px;
}
.welcome-banner p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.welcome-banner > .badge {
  margin-left: auto;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}
.stat-card {
  padding: 21px 23px;
}
.stat-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  font-weight: 550;
  gap: 8px;
}
.stat-label > .icon {
  width: 17px;
  height: 17px;
  opacity: 0.8;
}
.stat-card > strong {
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.8px;
  display: block;
  margin: 13px 0 6px;
}
.stat-detail {
  font-size: 10px;
  color: var(--muted);
  display: block;
}
.stat-detail.text-link {
  color: var(--accent);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 24px;
}
.subtle-icon {
  color: var(--muted);
}
.activity-list {
  list-style: none;
  padding: 0 24px;
  margin: 0;
  min-height: 265px;
  max-height: 400px;
  overflow: auto;
}
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding: 15px 0;
}
.activity-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 31px;
  height: 31px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
}
.activity-icon .icon {
  width: 15px;
  height: 15px;
}
.activity-text {
  min-width: 0;
  flex: 1;
}
.activity-text strong {
  display: block;
  font-size: 11px;
  font-weight: 550;
}
.activity-text span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.activity-item time {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.empty-state {
  padding: 30px 0;
  color: var(--muted);
  font-size: 12px;
}
.card-footnote {
  padding: 15px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
}
.account-identity {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 4px 24px 19px;
  gap: 10px;
}
.account-identity > strong {
  font-size: 12px;
  word-break: break-word;
  text-align: center;
}
.account-identity > .badge {
  font-size: 9px;
}
.workspace-details {
  margin: 0 24px 22px;
  font-size: 10px;
}
.workspace-details > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
}
.workspace-details dd {
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: right;
}
.account-card > .button {
  margin: 0 24px 24px;
  width: calc(100% - 48px);
}
.scope-note {
  display: flex;
  align-items: center;
  gap: 17px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 26px;
}
.scope-number {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.scope-note strong {
  font-size: 11px;
  font-weight: 600;
}
.scope-note p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.scope-note > .badge {
  margin-left: auto;
  font-size: 9px;
}
.panel-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 9px;
  color: var(--muted);
  padding: 20px 38px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
.footer-dot {
  margin: 0 8px;
  color: var(--border);
}
.settings-card {
  margin-bottom: 24px;
}
.profile-details {
  margin: 0;
  padding: 0 24px 24px;
  max-width: 750px;
  font-size: 13px;
}
.profile-details > div {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.profile-details dd {
  overflow-wrap: anywhere;
}
.theme-options {
  border: 0;
  padding: 0 24px;
  margin: 0;
  display: flex;
  gap: 20px;
}
.theme-option {
  position: relative;
  display: block;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  max-width: 230px;
  width: 50%;
  cursor: pointer;
  margin: 0;
}
.theme-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.theme-option input {
  position: absolute;
  right: 14px;
  bottom: 17px;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  margin: 0;
}
.theme-preview {
  display: grid;
  grid-template-columns: 28% 1fr;
  grid-template-rows: 20px 45px;
  gap: 7px;
  padding: 9px;
  height: 94px;
  border-radius: 5px;
  border: 1px solid #dfe2e9;
}
.theme-preview span {
  border-radius: 3px;
  border: 1px solid #e5e8ee;
  background: #fff;
}
.theme-preview span:first-child {
  grid-row: span 2;
}
.light-preview {
  background: #f4f5f8;
}
.dark-preview {
  background: #12151d;
  border-color: #383e50;
}
.dark-preview span {
  background: #242a37;
  border-color: #343d50;
}
.theme-option > span:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.theme-option .icon {
  width: 17px;
  height: 17px;
}
.settings-note {
  font-size: 11px;
  color: var(--muted);
  padding: 19px 24px;
}
.password-form {
  padding: 0 24px 24px;
  max-width: 540px;
}
.password-form #password-help {
  margin: -10px 0 20px;
}
.password-form > .button {
  margin-top: 5px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}
th {
  background: var(--surface-subtle);
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}
th,
td {
  padding: 13px 24px;
  border-top: 1px solid var(--border);
}
td .badge {
  margin-left: 8px;
  font-size: 9px;
}
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  background: var(--story);
  padding: 42px 50px 28px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.story-content {
  max-width: 470px;
  margin: auto;
}
.story-content .eyebrow {
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}
.story-content h1 {
  font-size: 44px;
  letter-spacing: -1.8px;
  line-height: 1.18;
}
.story-content > p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 22px;
  line-height: 1.8;
}
.control-visual {
  margin-top: 45px;
  background: var(--surface);
  border: 1px solid var(--story-line);
  border-radius: 13px;
  padding: 0 20px 22px;
  box-shadow: 0 20px 50px #32266208;
  transform: rotate(-2deg);
}
.visual-top {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
  font-size: 8px;
  letter-spacing: 1.1px;
  font-weight: 600;
  color: var(--muted);
}
.visual-dots {
  margin-left: auto;
  font-size: 16px;
}
.visual-core {
  padding: 25px 0;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}
.visual-core small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 3px;
}
.visual-core .brand-mark {
  width: 40px;
  height: 40px;
}
.visual-check {
  color: var(--success);
  margin-left: auto;
  background: var(--success-soft);
  padding: 2px 7px;
  border-radius: 50%;
}
.visual-branches {
  display: flex;
  gap: 9px;
}
.visual-branches > span {
  flex: 1;
  text-align: center;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 6px;
  font-size: 9px;
  color: var(--muted);
}
.story-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  margin-top: 50px;
}
.story-footer > span:last-child {
  margin-left: auto;
}
.login-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 50px;
  background: var(--surface);
}
.login-form-wrap {
  width: 100%;
  max-width: 355px;
  margin: auto;
}
.login-form-wrap h2 {
  font-size: 26px;
  letter-spacing: -0.8px;
}
.login-form-wrap > p {
  font-size: 12px;
  margin-top: 9px;
}
.login-form-wrap form {
  margin-top: 35px;
}
.login-form-wrap .button {
  margin-top: 7px;
  min-height: 45px;
}
.login-form-wrap .login-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 10px;
  color: var(--muted);
}
.login-note .icon {
  width: 15px;
  height: 15px;
}
.login-copyright {
  font-size: 9px;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin-top: 50px;
}
.login-copyright span {
  margin: 0 10px;
}
@media (min-width: 1600px) {
  #main {
    padding-top: 48px;
  }
  .stat-card {
    padding: 27px;
  }
  .dashboard-grid {
    grid-template-columns: 1.8fr 1fr;
  }
  .activity-item {
    padding: 18px 0;
  }
}
@media (max-width: 1100px) {
  :root {
    --sidebar-width: 222px;
  }
  .sidebar {
    padding-left: 14px;
    padding-right: 14px;
  }
  .sidebar-user {
    margin: 0 -14px;
  }
  .sidebar > .brand {
    margin-left: 5px;
  }
  .workspace {
    gap: 7px;
    padding: 10px 7px;
  }
  .workspace-tag {
    font-size: 7px;
  }
  .topbar {
    padding: 0 25px;
  }
  #main {
    padding: 28px 25px;
  }
  .stat-grid {
    gap: 14px;
  }
  .stat-card {
    padding: 18px;
  }
  .dashboard-grid {
    gap: 18px;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr);
  }
  .date-label {
    display: none;
  }
  .card-heading {
    padding: 20px;
  }
  .activity-list {
    padding: 0 20px;
  }
  .scope-note > .badge {
    display: none;
  }
  .login-story {
    padding: 35px;
  }
  .story-content h1 {
    font-size: 36px;
  }
  .login-main {
    padding: 35px;
  }
}
@media (max-width: 850px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .account-identity {
    align-items: flex-start;
  }
  .account-identity > strong {
    text-align: left;
  }
  .stat-card > strong {
    font-size: 21px;
  }
  .stat-detail {
    font-size: 9px;
  }
  .welcome-banner > .badge {
    display: none;
  }
  .login-layout {
    grid-template-columns: 42% 58%;
  }
  .story-content h1 {
    font-size: 30px;
  }
  .login-story {
    padding: 30px 23px;
  }
  .story-content > p {
    font-size: 11px;
  }
  .control-visual {
    padding: 0 12px 16px;
  }
  .visual-core {
    font-size: 10px;
  }
  .visual-core small {
    font-size: 8px;
  }
  .visual-branches {
    gap: 5px;
  }
  .visual-branches > span {
    font-size: 8px;
    padding: 10px 2px;
  }
  .story-footer {
    flex-wrap: wrap;
  }
  .story-footer > span:last-child {
    margin-left: 13px;
  }
  .login-main {
    padding: 28px;
  }
  .page-heading h1 {
    font-size: 27px;
  }
}
@media (max-width: 640px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 8px 0 30px #0002;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .panel-content {
    margin-left: 0;
    width: 100%;
  }
  .topbar {
    height: 62px;
    padding: 0 18px;
  }
  .topbar-right {
    gap: 10px;
  }
  .topbar-divider {
    display: none;
  }
  .menu-toggle {
    display: grid;
  }
  .breadcrumb {
    gap: 10px;
  }
  .breadcrumb > span:first-of-type {
    display: none;
  }
  .breadcrumb-slash {
    display: none;
  }
  #main {
    padding: 25px 18px;
  }
  .page-heading {
    margin-bottom: 23px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .welcome-banner {
    padding: 17px;
    gap: 12px;
  }
  .welcome-banner p {
    font-size: 11px;
  }
  .welcome-banner h2 {
    font-size: 13px;
  }
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .stat-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px;
  }
  .stat-label {
    justify-content: flex-start;
    gap: 8px;
  }
  .stat-label .icon {
    order: -1;
  }
  .stat-card > strong {
    grid-column: 2;
    grid-row: 1 / span 2;
    font-size: 20px;
    margin: 0;
    align-self: center;
  }
  .stat-detail {
    grid-column: 1;
    font-size: 10px;
    padding-left: 25px;
  }
  .scope-note {
    padding: 17px;
    gap: 13px;
    align-items: flex-start;
  }
  .scope-note p {
    line-height: 1.7;
  }
  .panel-footer {
    padding: 16px 18px;
    flex-wrap: wrap;
    font-size: 8px;
  }
  .settings-card .card-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .profile-details > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .theme-options {
    gap: 12px;
    padding: 0 18px;
  }
  .theme-option {
    padding: 10px;
  }
  .theme-option input {
    right: 10px;
    bottom: 13px;
  }
  .theme-option > span:last-child {
    font-size: 11px;
    gap: 5px;
  }
  .theme-option .icon {
    width: 14px;
  }
  .theme-preview {
    padding: 7px;
    gap: 5px;
    height: 80px;
    grid-template-rows: 16px 40px;
  }
  th,
  td {
    padding: 12px 18px;
  }
  .activity-item {
    gap: 10px;
  }
  .activity-item time {
    font-size: 9px;
  }
  .login-layout {
    display: block;
  }
  .login-story {
    min-height: 0;
    padding: 25px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .login-story > .brand {
    font-size: 16px;
  }
  .story-content,
  .story-footer {
    display: none;
  }
  .login-main {
    min-height: calc(100vh - 88px);
    padding: 35px 25px;
  }
  .login-form-wrap h2 {
    font-size: 25px;
  }
  .login-copyright {
    margin-top: 45px;
  }
  .toast {
    bottom: 18px;
    width: max-content;
  }
  .notice {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
