:root {
  --c-bg: #ffffff;
  --c-card: #f7f9fb;
  --c-border: #d1d5db;
  --c-text: #111827;
  --c-muted: #6b7280;
  --c-link: #2563eb;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-size: 15px;
  background: var(--c-bg);
  color: var(--c-text);
  overflow: hidden;
}

.shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 1rem 1rem 1.5rem;
  height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--c-border);
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family:
    "Nunito",
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 1.875rem;
  font-weight: 600;
}
#nav-toolbar {
  flex: 1;
  min-width: 0;
  width: 100%;
}
#nav-toolbar .dx-toolbar-items-container {
  justify-content: flex-end;
}
#nav-toolbar .dx-toolbar-after {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.page {
  margin-top: 1rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.card-view-shell {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 1rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.card-view {
  margin-top: 0;
  flex: 1;
  min-height: 0;
  height: 100%;
}
.drawer-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
}
.drawer-shell.drawer-collapsed {
  grid-template-columns: 0 1fr;
}
.drawer-panel {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 0.5rem;
  height: 100%;
  overflow: hidden;
}
.drawer-collapsed .drawer-panel {
  display: none;
}
.drawer-content {
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.dx-cardview {
  height: 100%;
}
.dx-cardview .dx-scrollable-wrapper,
.dx-cardview .dx-scrollable-container {
  height: 100%;
}
.status {
  color: var(--c-muted);
  min-height: 1.25rem;
  margin: 0.25rem 0 0.5rem;
}
.status.error {
  color: #b91c1c;
}
.hidden {
  display: none !important;
}
.hint {
  color: var(--c-muted);
}
.card-tile {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  aspect-ratio: 1 / 1;
  height: auto;
  overflow: hidden;
}
.card-thumb-wrap {
  position: relative;
}
.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  display: block;
}
.card-thumb-dropdowns {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  gap: 0.35rem;
  max-width: calc(100% - 16px);
  flex-wrap: wrap;
}
.card-thumb-dropdown {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
}
.card-thumb-dropdown .dx-dropdownbutton {
  border-radius: 9999px;
  overflow: hidden;
}
.card-thumb-dropdown .dx-dropdownbutton-action,
.card-thumb-dropdown .dx-dropdownbutton-toggle {
  border: none;
  box-shadow: none;
  min-height: 22px;
}
.card-thumb-dropdown .dx-dropdownbutton-action {
  border-radius: 9999px 0 0 9999px;
}
.card-thumb-dropdown .dx-dropdownbutton-toggle {
  border-radius: 0 9999px 9999px 0;
  padding-inline: 8px;
}
.card-thumb-dropdown .dx-button-content {
  padding: 3px 8px;
}
.card-thumb-dropdown .dx-button-text {
  font-size: 0.745rem;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-thumb-dropdown .dx-icon {
  color: #fff;
  font-size: 14px;
  line-height: 12px;
}
.education-dropdown-host .dx-button {
  background: var(--pill-color, rgba(139, 92, 246, 0.92));
  color: #fff;
}
.science-dropdown-host .dx-button {
  background: var(--pill-color, rgba(14, 165, 233, 0.92));
  color: #fff;
}
.card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 0.35rem;
}
.delete-button,
.edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-border);
  background: #fff;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
}
.edit-button i {
  color: #2563eb;
  font-weight: 300;
}
.delete-button .trash {
  font-weight: 300;
  color: red;
  transition: opacity 0.2s ease-in-out;
}
.delete-button:hover .trash {
  display: none;
}
.delete-button:hover .trash-hover {
  display: inline-block;
  font-weight: 900;
  color: red;
}
.trash-hover {
  display: none;
}
.card-tile.selected {
  border-color: var(--c-link);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-height: 0;
}
.card-title {
  font-size: 1.125rem;
  margin: 0;
}
.card-desc {
  color: var(--c-muted);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  line-height: 1.25;
  max-height: calc(3 * 1.25em);
}
.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.25rem;
}
.card-creator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.card-creator-avatar {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--c-border);
}
.card-creator-name {
  font-size: 0.905rem;
  color: var(--c-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-dates {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.card-date {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.845rem;
  color: var(--c-muted);
  white-space: nowrap;
}
.card-date i {
  font-size: 12px;
}
.card-meta-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin-top: auto;
}
.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--c-text);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.975rem;
}
.favorite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-border);
  background: #fff;
  border-radius: 999px;
  padding: 0.3rem;
  width: 34px;
  height: 34px;
  cursor: pointer;
  color: var(--c-text);
}
.favorite-button .favorite-icon {
  color: #9ca3af;
  font-size: 14px;
}
.favorite-button.is-favorite .favorite-icon {
  color: #f59e0b;
}
.pick-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-border);
  background: #fff;
  border-radius: 999px;
  padding: 0.3rem;
  width: 34px;
  height: 34px;
  cursor: pointer;
  color: var(--c-text);
}
.pick-button .pick-icon {
  color: #9ca3af;
  font-size: 14px;
}
.pick-button.is-picked .pick-icon {
  color: #dc2626;
}
.visibility-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-border);
  background: #fff;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  position: absolute;
  right: 12px;
  bottom: 12px;
}
.visibility-button .visibility-icon {
  color: #6b7280;
  font-size: 14px;
}
.card-thumb-dropdown .dx-icon,
.card-tile .trash,
.card-tile .trash-hover,
.card-badge i {
  font-size: 14px;
}
.visibility-button.is-public .visibility-icon {
  color: #16a34a;
}
.user-menu .dx-button-content {
  display: inline-flex;
  align-items: center;
}
.user-menu-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--c-border);
}
.tree-item-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 24px;
}
.tree-item-icon {
  width: 14px;
  text-align: center;
  font-size: 18px;
}
#drawer .dx-state-selected .tree-item-icon {
  --fa-style: 900;
}
.tree-item-text {
  color: var(--c-text);
}
.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#nav-notifications,
#nav-notifications .dx-button-content,
#nav-notifications .dx-item-content {
  overflow: visible !important;
}
.notification-bell .bell-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #dc2626;
  color: #fff;
  font-size: 0.725rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  border-radius: 999px;
  text-align: center;
  padding: 0 4px;
  box-sizing: border-box;
  pointer-events: none;
}
.dx-overlay-wrapper {
  font-size: 15px;
}
.dx-datagrid .dx-row>td {
  font-size: 15px;
}
.dx-datagrid .dx-header-row>th {
  font-size: 15px;
}

.mdl-nav-icon {
  font-size: 16px;
}
.mdl-menu-icon {
  font-size: 15px;
  width: 17px;
  text-align: center;
}
.mdl-menu-item-content {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
}
.mdl-user-menu-dropdown {
  font-size: 15px;
}
.mdl-grid-icon {
  font-size: 15px;
}
.mdl-user-avatar-icon {
  font-size: 24px;
  color: #9ca3af;
}
.mdl-loading-spinner {
  font-size: 1.5rem;
  color: #6b7280;
}
.mdl-notification-icon {
  font-size: 16px;
}
.mdl-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.remove-feature-btn {
  font-size: 15px;
}
.template-picker-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0.25rem 0.5rem 0.5rem;
}
.template-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  max-height: 55vh;
  overflow-y: auto;
  padding: 0.25rem;
}
.template-picker-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.template-picker-card {
  background: #fff;
  border: 2px solid var(--c-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.template-picker-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}
.template-picker-card--selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.template-picker-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}
.template-picker-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.template-picker-card-thumb--blank {
  background: #f9fafb;
}
.template-picker-card-thumb--blank i,
.template-picker-card-thumb i {
  font-size: 2rem;
  color: #9ca3af;
}
.template-picker-card-body {
  padding: 0.4rem 0.5rem 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.template-picker-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.template-picker-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.template-picker-card-tag {
  font-size: 0.65rem;
  background: #ede9fe;
  color: #6d28d9;
  border-radius: 9999px;
  padding: 1px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.shape-image-dropzone {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 12px;
  border: 1px dashed var(--c-border);
  border-radius: 12px;
  background: var(--c-card);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.shape-image-dropzone.drag-over {
  border-color: #4039d7;
  background: #eef0ff;
}
.shape-image-dropzone__hint {
  font-size: 0.9rem;
  color: #6b7280;
  text-align: center;
}
.shape-image-dropzone__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  cursor: grab;
}
.shape-image-dropzone__preview:not([src]),
.shape-image-dropzone__preview[src=""] {
  display: none;
}
.shape-image-dropzone__uploader {
  display: none;
}
.shape-image-dropzone__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.shape-image-dropzone__remove .trash {
  font-weight: 300;
  color: red;
}
.shape-image-dropzone__remove:hover .trash {
  display: none;
}
.shape-image-dropzone__remove:hover .trash-hover {
  display: inline-block;
  font-weight: 900;
  color: red;
}
.card-desc-tooltip {
  text-align: left;
}
.card-desc-tooltip strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}
.card-desc-tooltip p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--c-muted);
  line-height: 1.4;
  white-space: pre-wrap;
}
.html-editor-toolbar {
  margin-top: 4px;
  border-top: 1px solid var(--c-border);
  padding-top: 4px;
}
.media-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.media-thumb-placeholder.video-thumb {
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
}
.media-thumb-placeholder.data-thumb {
  background: linear-gradient(135deg, #ecfdf5, #a7f3d0);
}
.media-thumb-icon {
  font-size: 2rem;
  color: #9ca3af;
}
.education-label-pill,
.science-label-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.745rem;
  font-weight: 600;
  color: #fff;
  background: var(--pill-color, #8b5cf6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.asset-link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--c-link);
  text-decoration: none;
  padding: 2px 0;
}
.asset-link-button:hover {
  text-decoration: underline;
}
.upload-file-uploader-host {
  width: 100%;
}

.mdl-nav-action-icon-hover {
  display: none;
}

#nav-upload-video:hover .mdl-nav-action-icon,
#nav-upload-data:hover .mdl-nav-action-icon,
#nav-new-model:hover .mdl-nav-action-icon,
#nav-notifications:hover .mdl-nav-action-icon {
  display: none;
}

#nav-upload-video:hover .mdl-nav-action-icon-hover,
#nav-upload-data:hover .mdl-nav-action-icon-hover,
#nav-new-model:hover .mdl-nav-action-icon-hover,
#nav-notifications:hover .mdl-nav-action-icon-hover {
  display: inline-block;
}
