.front-page.project-mode .agent-knowledge {
  grid-template-rows: auto 1fr auto auto;
}

.front-page.project-mode .agent-model-picker {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #30313a;
  border-radius: 11px;
  background: #1c1d24;
}

.front-page.project-mode .agent-model-picker span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.front-page.project-mode .agent-model-picker select {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #373944;
  border-radius: 9px;
  background: #111217;
  color: #fff;
  font-size: 13px;
}

.front-page #profileTab {
  min-height: calc(100vh - 130px);
  margin: -24px;
  padding: 34px 24px 56px;
  overflow: auto;
  background: #f4f7fb;
}

.front-page.hide-page-topbar .topbar {
  display: none !important;
}

.front-page .top-account {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.front-page .top-account-credit,
.front-page .top-account-user {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: rgba(255, 255, 255, .06);
  font-weight: 900;
  white-space: nowrap;
}

.front-page .top-account-user {
  max-width: 168px;
  padding-left: 6px;
}

.front-page .top-account-user b {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #08152d;
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.front-page .top-account-user span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.front-page .top-account .logout {
  justify-self: auto;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  color: #fff;
}

.front-page .profile-page {
  max-width: 1280px;
  margin: 0 auto;
}

.front-page .profile-settings-card {
  padding: 24px;
  border: 1px solid #d6e0ee;
  border-radius: 8px;
  background: #fff;
  color: #071327;
  box-shadow: 0 20px 55px rgba(15, 23, 42, .08);
}

.front-page .profile-settings-head {
  margin-bottom: 32px;
}

.front-page .profile-settings-head h3,
.front-page .profile-section h4,
.front-page .profile-feature-row h4,
.front-page .profile-billing-head h3,
.front-page .profile-billing-card h4 {
  margin: 0;
  color: #071327;
  font-size: 20px;
  font-weight: 900;
}

.front-page .profile-settings-head p,
.front-page .profile-section p,
.front-page .profile-feature-row p {
  margin: 14px 0 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.55;
}

.front-page .profile-feature-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  margin-bottom: 16px;
}

.front-page .profile-feature-row article,
.front-page .profile-section,
.front-page .profile-billing-card {
  border: 1px solid #d6e0ee;
  border-radius: 8px;
  background: #fff;
}

.front-page .profile-feature-row article {
  min-height: 132px;
  padding: 32px 14px 22px;
}

.front-page .profile-section {
  margin-top: 16px;
  padding: 28px 14px 22px;
}

.front-page .profile-form-grid,
.front-page .profile-password-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.front-page .profile-password-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.front-page .profile-section label,
.front-page .profile-billing-card label {
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
}

.front-page .profile-section input,
.front-page .profile-billing-card input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d6e0ee;
  border-radius: 7px;
  background: #fff;
  color: #071327;
  font-size: 15px;
}

.front-page .profile-section input::placeholder,
.front-page .profile-billing-card input::placeholder {
  color: #64748b;
}

.front-page .profile-section button,
.front-page .profile-feature-row button,
.front-page .profile-billing-card button {
  width: fit-content;
  min-height: 42px;
  margin-top: 12px;
  padding: 0 15px;
  border: 1px solid #d6e0ee;
  border-radius: 7px;
  background: #fff;
  color: #071327;
  font-weight: 800;
}

.front-page .profile-password-grid button,
.front-page .profile-billing-card form button {
  align-self: end;
  background: #071327;
  color: #fff;
}

.front-page .profile-billing-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .62);
}

.front-page .profile-billing-modal.hidden {
  display: none;
}

.front-page .profile-billing-card {
  width: min(760px, 94vw);
  padding: 20px;
}

.front-page .profile-billing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.front-page .profile-billing-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 14px;
}

.front-page .profile-billing-stats article {
  min-height: 114px;
  padding: 16px 14px;
  border: 1px solid #d6e0ee;
  border-radius: 8px;
}

.front-page .profile-billing-stats span {
  display: block;
  margin-bottom: 20px;
  color: #475569;
  font-size: 13px;
}

.front-page .profile-billing-stats strong {
  color: #071327;
  font-size: 28px;
}

.front-page .profile-billing-card form {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.front-page .media-library-panel {
  min-height: 520px;
  overflow: visible;
}

.front-page .media-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.front-page .media-library-head h3 {
  margin: 0;
}

.front-page .media-library-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.front-page .media-library-tabs button {
  min-width: 74px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.front-page .media-library-tabs button.active {
  background: #ff2e68;
}

.front-page .media-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  overflow: visible;
}

.front-page .media-library-card {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
}

.front-page .media-library-card:hover {
  z-index: 30;
}

.front-page .media-library-preview {
  position: relative;
  min-height: 112px;
  display: grid;
  place-items: center;
  background: rgba(3, 7, 18, .55);
}

.front-page .media-library-preview a {
  display: block;
  width: 100%;
  line-height: 0;
}

.front-page .media-library-preview img,
.front-page .media-library-preview video {
  width: 100%;
  height: 132px;
  max-height: 132px;
  display: block;
  object-fit: contain;
  background: #000;
  transition: transform .22s ease, filter .22s ease;
  transform-origin: center;
}

.front-page .media-library-card:hover .media-library-preview video {
  transform: scale(1.12);
  filter: brightness(1.05);
}

.front-page .media-library-card:hover .media-library-preview img {
  position: relative;
  z-index: 40;
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .46);
  transform: scale(2.15);
  filter: brightness(1.05);
}

.front-page .media-library-card:nth-child(4n):hover .media-library-preview img,
.front-page .media-library-card:last-child:hover .media-library-preview img {
  transform-origin: right center;
}

.front-page .media-library-card:nth-child(4n + 1):hover .media-library-preview img {
  transform-origin: left center;
}

.front-page .media-library-pending {
  display: grid;
  gap: 6px;
  text-align: center;
  color: rgba(255, 255, 255, .72);
}

.front-page .media-library-meta {
  padding: 9px 10px 10px;
}

.front-page .media-library-meta strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.front-page .media-library-meta span,
.front-page .media-library-meta p {
  margin: 0;
  color: rgba(255, 255, 255, .55);
  font-size: 11px;
  line-height: 1.35;
}

.front-page .media-library-meta p {
  overflow: hidden;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.front-page .media-library-delete {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(3, 7, 18, .72);
  color: #fff;
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
}

.front-page .media-library-delete:hover {
  background: #ff2e68;
  border-color: #ff2e68;
}

@media (max-width: 900px) {
  .front-page .profile-feature-row,
  .front-page .profile-form-grid,
  .front-page .profile-password-grid,
  .front-page .profile-billing-stats {
    grid-template-columns: 1fr;
  }
}
