@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,400..700,0..1,-50..200");

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ap-ink);
  background:
    radial-gradient(circle at 82% 0%, rgba(220, 207, 255, 0.38), transparent 32%),
    linear-gradient(180deg, #FBFAFF 0%, #F7F4FD 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.material-symbols-rounded {
  direction: ltr;
  display: inline-block;
  font-family: "Material Symbols Rounded";
  font-feature-settings: "liga";
  font-size: 22px;
  font-style: normal;
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
}

.ap-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.ap-workspace {
  min-width: 0;
}

.ap-topbar {
  position: sticky;
  top: 0;
  z-index: 34;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 72px;
  border-bottom: 1px solid rgba(230, 223, 248, 0.72);
  padding: 12px 36px;
  width: 100%;
  background: rgba(251, 250, 255, 0.86);
  backdrop-filter: blur(16px);
}

.ap-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.ap-topbar-search,
.ap-topbar-action,
.ap-topbar-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid #EFE9FB;
  border-radius: 999px;
  background: #FFFFFF;
  box-shadow: 0 8px 22px rgba(75, 46, 131, 0.05);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.ap-topbar-search {
  flex: 0 1 430px;
  width: min(34vw, 430px);
  gap: 9px;
  padding: 9px 16px;
  color: var(--ap-muted);
  font-size: 13px;
  font-weight: 550;
}

.ap-topbar-search:hover,
.ap-topbar-action:hover,
.ap-topbar-status-chip:hover {
  transform: translateY(-1px);
}

.ap-topbar-search .material-symbols-rounded,
.ap-topbar-action .material-symbols-rounded,
.ap-topbar-status-chip .material-symbols-rounded {
  font-size: 19px;
}

.ap-topbar-search .material-symbols-rounded,
.ap-topbar-action .material-symbols-rounded {
  color: var(--ap-purple-700);
}

.ap-icon-button,
.ap-user-chip {
  border: 1px solid #EFE9FB;
  background: #FFFFFF;
  box-shadow: 0 8px 22px rgba(75, 46, 131, 0.05);
}

.ap-icon-button {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: var(--ap-purple-900);
  cursor: pointer;
}

.ap-icon-button.has-dot::after {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 8px;
  height: 8px;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  background: var(--ap-purple-700);
  content: "";
}

.ap-topbar-action {
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  color: var(--ap-purple-900);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.ap-topbar-action.is-primary {
  border-color: rgba(123, 77, 204, 0.24);
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--ap-purple-700), var(--ap-purple-500));
  box-shadow: 0 12px 24px rgba(123, 77, 204, 0.18);
}

.ap-topbar-action.is-primary .material-symbols-rounded {
  color: #FFFFFF;
}

.ap-topbar-status-chip {
  gap: 7px;
  padding: 9px 13px;
  color: #166534;
  background: #F0FDF4;
  border-color: rgba(22, 163, 74, 0.16);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.ap-topbar-status-chip .material-symbols-rounded {
  color: #16A34A;
}

.ap-profile-menu {
  position: relative;
  flex: 0 0 auto;
}

.ap-profile-trigger {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #EFE9FB;
  border-radius: 50%;
  color: var(--ap-purple-900);
  background: #FFFFFF;
  box-shadow: 0 8px 22px rgba(75, 46, 131, 0.05);
  cursor: pointer;
  list-style: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.ap-profile-trigger::-webkit-details-marker {
  display: none;
}

.ap-profile-trigger .material-symbols-rounded {
  color: var(--ap-purple-700);
  font-size: 24px;
}

.ap-profile-trigger:hover,
.ap-profile-menu[open] .ap-profile-trigger {
  border-color: rgba(123, 77, 204, 0.24);
  background: var(--ap-purple-100);
  box-shadow: 0 12px 26px rgba(75, 46, 131, 0.10);
  transform: translateY(-1px);
}

.ap-profile-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 52;
  display: grid;
  min-width: 230px;
  gap: 8px;
  border: 1px solid #EFE9FB;
  border-radius: 16px;
  padding: 14px;
  color: var(--ap-ink);
  background: #FFFFFF;
  box-shadow: 0 18px 46px rgba(75, 46, 131, 0.14);
}

.ap-profile-popover::before {
  position: absolute;
  top: -6px;
  right: 16px;
  width: 12px;
  height: 12px;
  border-top: 1px solid #EFE9FB;
  border-left: 1px solid #EFE9FB;
  background: #FFFFFF;
  content: "";
  transform: rotate(45deg);
}

.ap-profile-popover span {
  color: var(--ap-muted);
  font-size: 12px;
  font-weight: 650;
}

.ap-profile-popover strong {
  color: var(--ap-purple-900);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
}

.ap-profile-popover a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  margin-top: 4px;
  padding: 8px 12px;
  color: var(--ap-purple-900);
  background: var(--ap-purple-100);
  font-size: 12.5px;
  font-weight: 700;
}

.ap-menu-toggle,
.ap-sidebar-backdrop {
  display: none;
}

.ap-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  color: var(--ap-purple-900);
  cursor: pointer;
}

.ap-user-name {
  color: var(--ap-purple-900);
  font-size: 13px;
  font-weight: 650;
}

.ap-user-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--ap-purple-700), var(--ap-purple-500));
  font-size: 12px;
  font-weight: 700;
}

.ap-main {
  min-width: 0;
  max-width: 1260px;
  margin: 0 auto;
  padding: 18px 36px 40px;
}

@media (max-width: 1180px) {
  .ap-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .ap-main {
    padding: 16px 24px 36px;
  }

  .ap-topbar {
    min-height: 68px;
    padding: 12px 24px;
  }

  .ap-topbar-search {
    display: none;
  }
}

@media (max-width: 920px) {
  .ap-shell {
    grid-template-columns: 1fr;
  }

  .ap-workspace {
    width: 100%;
    overflow-x: hidden;
  }

  body.is-sidebar-open {
    overflow: hidden;
  }

  .ap-main {
    width: 100%;
    max-width: 100%;
    padding: 18px;
  }

  .ap-topbar {
    min-height: auto;
    padding: 12px 18px;
    width: 100vw;
    max-width: 100vw;
  }

  .ap-menu-toggle {
    display: grid;
    margin-right: 0;
  }

  .ap-topbar-actions {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .ap-topbar-action,
  .ap-topbar-status-chip {
    justify-content: center;
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .ap-topbar-action span:last-child,
  .ap-topbar-status-chip span:last-child {
    display: none;
  }

  .ap-user-name {
    display: none;
  }

  .ap-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    border: 0;
    padding: 0;
    background: rgba(23, 17, 58, 0.30);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }

  body.is-sidebar-open .ap-sidebar-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 560px) {
  .ap-topbar {
    gap: 10px;
    justify-content: flex-start;
    padding: 14px 16px;
  }

  .ap-topbar-actions {
    gap: 8px;
    margin-left: auto;
    margin-right: 48px;
  }

  .ap-topbar-action.is-primary {
    width: 42px;
    padding: 0;
  }

  .ap-profile-trigger {
    width: 40px;
    height: 40px;
  }

  .ap-profile-menu {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
  }

  .ap-profile-popover {
    right: -2px;
    min-width: min(230px, calc(100vw - 32px));
  }

  .ap-user-chip {
    display: none;
  }
}
