
/* ==================== altcss/image-card.css ==================== */
/* components/image-card.css */
image-card {
  display: inline-block;
  width: 100%;
  margin-bottom: 16px;
  break-inside: avoid;
  position: relative;
  z-index: 1;
}

image-card.expanded {
  position: fixed;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: auto;
  max-width: calc(90vw - 20px); /* Subtract timeline width */
  max-height: 90vh;
  z-index: 1000 !important;
  margin: 0;
  animation: expandIn 0.3s ease-out;
}

@keyframes expandIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Backdrop for expanded state */
image-card.expanded::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: -1;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  image-card {
    margin-bottom: 36px;
  }
}

image-card .card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

image-card .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
}

image-card .card:visited,
image-card .card:active {
  color: inherit;
  text-decoration: none;
}

image-card.expanded .card {
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  height: auto; /* Changed from 100% */
  max-height: 90vh;
  width: auto; /* Allow card to fit content */
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
}

image-card .image-container {
  position: relative;
  width: 100%;
  background: var(--image-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

image-card.expanded .image-container {
  width: auto; /* Changed from 100% */
  flex: 0 0 auto; /* Don't grow, just fit content */
  aspect-ratio: auto !important;
  background: transparent;
  overflow: visible;
  max-height: calc(90vh - 80px);
  max-width: 90vw;
}

image-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

image-card.expanded img {
  max-width: 90vw;
  max-height: calc(90vh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

image-card img.loading {
  opacity: 0;
}

image-card img.loaded {
  opacity: 1;
}

image-card .info {
  padding: 12px 16px;
  flex: 0 0 auto;
  transition: padding 0.3s;
  background: var(--card-bg);
}

image-card.expanded .info {
  padding: 16px 20px;
  flex-shrink: 0;
  background: var(--card-bg);
  border-radius: 8px;
  margin-top: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 100%; /* Match the image width */
  box-sizing: border-box;
}

image-card .title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: font-size 0.3s;
}

image-card.expanded .title {
  font-size: 16px;
  white-space: normal;
}

image-card .subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: font-size 0.3s;
}

image-card.expanded .subtitle {
  font-size: 14px;
  white-space: normal;
  line-height: 1.5;
  max-height: none;
}

image-card .expand-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

image-card .card:hover .expand-indicator {
  opacity: 1;
}

image-card.expanded .expand-indicator {
  opacity: 1;
}

image-card.expanded .expand-indicator::before {
  content: '−';
}

image-card .expand-indicator::before {
  content: '+';
}

image-card .detail-button {
  display: none;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}

image-card.expanded .detail-button {
  display: block;
}

image-card .detail-button:hover {
  background: var(--accent-hover);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.5);
}

image-card .classification-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: calc(100% - 56px); /* Leave space for expand indicator */
}

image-card .badge {
  background: rgba(52, 152, 219, 0.2);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(4px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

image-card .badge:hover {
  background: rgba(52, 152, 219, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

image-card .badge:active {
  transform: translateY(0);
}

image-card.expanded .classification-badges {
  display: none; /* Hide badges when expanded */
}

/* Drag and drop styles */
image-card.drag-over .card {
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
  transform: translateY(-4px) scale(1.02);
}

image-card.link-created .card {
  animation: linkCreated 1s ease-out;
}

@keyframes linkCreated {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(46, 204, 113, 0.4);
    border-color: #2ecc71;
  }
  100% {
    box-shadow: var(--shadow-md);
  }
}

/* ==================== altcss/video-card.css ==================== */
/* components/video-card.css */
video-card {
  display: inline-block;
  width: 100%;
  margin-bottom: 16px;
  break-inside: avoid;
  position: relative;
  z-index: 1;
}

video-card.expanded {
  position: fixed;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: auto;
  max-width: calc(90vw - 20px);
  max-height: 90vh;
  z-index: 1000 !important;
  margin: 0;
  animation: expandIn 0.3s ease-out;
}

video-card .video-overlay .play-button {
  display: none !important;
}

@keyframes expandIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Backdrop for expanded state */
video-card.expanded::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: -1;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  video-card {
    margin-bottom: 36px;
  }
}

video-card .card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  width: 100%;
}

video-card .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
}

video-card.expanded .card {
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  height: auto;
  max-height: 90vh;
  width: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
}

video-card .video-container {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

video-card.expanded .video-container {
  width: auto;
  flex: 0 0 auto;
  aspect-ratio: auto !important;
  background: transparent;
  overflow: visible;
  max-height: calc(90vh - 80px);
  max-width: 90vw;
}

video-card video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

video-card.expanded video {
  max-width: 90vw;
  max-height: calc(90vh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

video-card .video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

video-card .play-button {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  backdrop-filter: blur(4px);
  transition: background 0.2s, transform 0.2s;
  padding-left: 4px; /* Adjust for play symbol optical centering */
}

video-card .card:hover .play-button {
  background: rgba(52, 152, 219, 0.2);
  transform: scale(1.1);
}

video-card .duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

video-card .info {
  padding: 12px 16px;
  flex: 0 0 auto;
  transition: padding 0.3s;
  background: var(--card-bg);
}

video-card.expanded .info {
  padding: 16px 20px;
  flex-shrink: 0;
  background: var(--card-bg);
  border-radius: 8px;
  margin-top: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 100%;
  box-sizing: border-box;
}

video-card .type-badge {
  display: inline-block;
  background: rgba(155, 89, 182, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
}

video-card .title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: font-size 0.3s;
}

video-card.expanded .title {
  font-size: 16px;
  white-space: normal;
}

video-card .subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: font-size 0.3s;
}

video-card.expanded .subtitle {
  font-size: 14px;
  white-space: normal;
  line-height: 1.5;
  max-height: none;
}

/* Drag and drop styles */
video-card.drag-over .card {
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
  transform: translateY(-4px) scale(1.02);
}

video-card.link-created .card {
  animation: linkCreated 1s ease-out;
}

@keyframes linkCreated {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(46, 204, 113, 0.4);
    border-color: #2ecc71;
  }
  100% {
    box-shadow: var(--shadow-md);
  }
}

video-card.dragging {
  opacity: 0.7;
  pointer-events: none;
}


/* ==================== altcss/pdf-card.css ==================== */
/* components/pdf-card.css */
pdf-card {
  display: inline-block;
  width: 100%;
  margin-bottom: 16px;
  break-inside: avoid;
  position: relative;
  z-index: 1;
}

pdf-card.expanded {
  position: fixed;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: auto;
  max-width: calc(90vw - 20px);
  max-height: 90vh;
  z-index: 1000 !important;
  margin: 0;
  animation: expandIn 0.3s ease-out;
}

@keyframes expandIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Backdrop for expanded state */
pdf-card.expanded::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: -1;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  pdf-card {
    margin-bottom: 36px;
  }
}

pdf-card .card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  width: 100%;
}

pdf-card .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
}

pdf-card.expanded .card {
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  height: auto;
  max-height: 90vh;
  width: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
}

pdf-card .pdf-container {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  aspect-ratio: 210 / 297; /* A4 aspect ratio */
}

pdf-card .pdf-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

pdf-card .pdf-icon {
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

pdf-card .pdf-icon svg {
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

pdf-card .page-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

pdf-card .info {
  padding: 12px 16px;
  flex: 0 0 auto;
  transition: padding 0.3s;
  background: var(--card-bg);
}

pdf-card.expanded .info {
  padding: 16px 20px;
  flex-shrink: 0;
  background: var(--card-bg);
  border-radius: 8px;
  margin-top: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 100%;
  box-sizing: border-box;
}

pdf-card .type-badge {
  display: inline-block;
  background: rgba(230, 126, 34, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
}

pdf-card .title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: font-size 0.3s;
}

pdf-card.expanded .title {
  font-size: 16px;
  white-space: normal;
}

pdf-card .subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: font-size 0.3s;
}

pdf-card.expanded .subtitle {
  font-size: 14px;
  white-space: normal;
  line-height: 1.5;
  max-height: none;
}

/* Drag and drop styles */
pdf-card.drag-over .card {
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
  transform: translateY(-4px) scale(1.02);
}

pdf-card.link-created .card {
  animation: linkCreated 1s ease-out;
}

@keyframes linkCreated {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(46, 204, 113, 0.4);
    border-color: #2ecc71;
  }
  100% {
    box-shadow: var(--shadow-md);
  }
}

pdf-card.dragging {
  opacity: 0.7;
  pointer-events: none;
}


/* ==================== altcss/html-card.css ==================== */
/* components/html-card.css */
html-card {
  display: inline-block;
  width: 100%;
  margin-bottom: 16px;
  break-inside: avoid;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  html-card {
    margin-bottom: 36px;
  }
}

html-card .card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  width: 100%;
}

html-card .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
}

html-card .html-container {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  aspect-ratio: 16 / 9;
}

html-card .html-icon {
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

html-card .html-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

html-card .html-icon svg {
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

html-card .launch-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s, transform 0.1s;
  line-height: 1;
}

html-card .launch-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.05);
}

html-card .launch-btn:active {
  transform: scale(0.97);
}

html-card .launch-btn svg {
  flex-shrink: 0;
}

html-card .info {
  padding: 12px 16px;
  flex: 0 0 auto;
  background: var(--card-bg);
}

html-card .title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html-card .subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Drag and drop styles */
html-card.drag-over .card {
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
  transform: translateY(-4px) scale(1.02);
}

html-card.link-created .card {
  animation: htmlLinkCreated 1s ease-out;
}

@keyframes htmlLinkCreated {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(46, 204, 113, 0.4);
    border-color: #2ecc71;
  }
  100% {
    box-shadow: var(--shadow-md);
  }
}

html-card.dragging {
  opacity: 0.7;
  pointer-events: none;
}


/* ==================== altcss/image-grid.css ==================== */
/* Image Grid Styles */
image-grid {
  display: block;
}

/* Filter Bar Styles */
image-grid .filter-bar {
  display: flex;
  align-items: center;
  padding: 4px 0;
  /* margin-bottom: 4px; */
  /* border-bottom: 1px solid var(--border-color, #e0e0e0); */
}

image-grid .filter-group {
  display: flex;
  gap: 24px;
  align-items: center;
}

image-grid .filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary, #333);
  user-select: none;
}

image-grid .filter-label:hover {
  color: var(--text-secondary, #666);
}

image-grid .filter-checkbox {
  cursor: pointer;
  width: 16px;
  height: 16px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid var(--border-color, #d0d0d0);
  border-radius: 5px;
  background-color: transparent;
  position: relative;
}

image-grid .filter-checkbox:hover {
  border-color: var(--text-secondary, #888);
}

image-grid .filter-checkbox:checked {
  background-color: transparent;
  border-color: var(--text-primary, #333);
}

image-grid .filter-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--text-primary, #333);
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
  color: var(--text-primary, #333);
}

image-grid .filter-label span {
  font-size: 12px;
}

image-grid .grid {
  column-count: 6; /* Increased from 4 to 6 for more columns */
  column-gap: 16px; /* Reduced gap for tighter layout */
  padding: 20px 0;
}

@media (max-width: 1600px) {
  image-grid .grid {
    column-count: 5;
  }
}

@media (max-width: 1200px) {
  image-grid .grid {
    column-count: 4;
  }
}

@media (max-width: 900px) {
  image-grid .grid {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  image-grid .grid {
    column-count: 2;
    column-gap: 36px;
  }
}

@media (max-width: 480px) {
  image-grid .grid {
    column-count: 1;
  }
}

image-grid .scroll-sentinel {
  height: 10px;
  visibility: hidden;
}

image-grid .empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}

image-grid .grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  padding: 10px 0;
}

image-grid .masonry-layout {
  column-count: 7;
  column-gap: 16px;
  padding: 20px 0;
}

/* Grid row container - each row is independent */
image-grid .grid-row {
  display: block;
  margin-bottom: 20px;
}

image-grid .grid-row.masonry-layout {
  column-count: 7;
  column-gap: 16px;
  padding: 0;
}

image-grid .grid-row.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  padding: 0;
}

@media (max-width: 1600px) {
  image-grid .masonry-layout {
    column-count: 5;
  }
  image-grid .grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }
  image-grid .grid-row.masonry-layout {
    column-count: 5;
  }
  image-grid .grid-row.grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }
}

@media (max-width: 1200px) {
  image-grid .masonry-layout {
    column-count: 4;
  }
  image-grid .grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  image-grid .grid-row.masonry-layout {
    column-count: 4;
  }
  image-grid .grid-row.grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 900px) {
  image-grid .masonry-layout {
    column-count: 3;
  }
  image-grid .grid-row.masonry-layout {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  image-grid .masonry-layout {
    column-count: 2;
    column-gap: 36px;
  }
  image-grid .grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 36px;
  }
  image-grid .grid-row.masonry-layout {
    column-count: 2;
    column-gap: 36px;
  }
  image-grid .grid-row.grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 36px;
  }
}

@media (max-width: 480px) {
  image-grid .masonry-layout {
    column-count: 1;
  }
  image-grid .grid-layout {
    grid-template-columns: 1fr;
  }
  image-grid .grid-row.masonry-layout {
    column-count: 1;
  }
  image-grid .grid-row.grid-layout {
    grid-template-columns: 1fr;
  }
}

/* ==================== altcss/project-card.css ==================== */
/* Project Card Styles */
project-card {
  display: inline-block;
  width: 100%;
  margin-bottom: 16px;
  break-inside: avoid;
  position: relative;
  z-index: 5;
}

@media (max-width: 768px) {
  project-card {
    margin-bottom: 12px;
  }
}

project-card .card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

project-card .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--accent-color);
}

project-card .card:visited,
project-card .card:active {
  color: inherit;
  text-decoration: none;
}

project-card .images-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  aspect-ratio: 1; /* Keep the overall grid square */
  background: var(--image-bg);
  width: 100%;
}

project-card .banner-image {
  width: 100%;
  aspect-ratio: 1; /* Keep square aspect ratio like images-grid */
  overflow: hidden;
  background: var(--image-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

project-card .banner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Crop to fill the square */
  display: block;
}

project-card .image-slot {
  width: 100%;
  height: 100%;
  min-height: 0; /* Allow grid to control height */
  overflow: hidden;
  background: var(--image-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1; /* Each slot is square */
}

project-card .image-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Crop to fill the square */
  display: block;
}

project-card .image-slot.empty {
  background: linear-gradient(135deg, var(--image-bg) 25%, var(--border-color) 25%, var(--border-color) 50%, var(--image-bg) 50%, var(--image-bg) 75%, var(--border-color) 75%, var(--border-color));
  background-size: 20px 20px;
}

project-card .empty-icon {
  font-size: 32px;
  opacity: 0.5;
}

project-card .info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

project-card .organization-name {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-align: right;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

project-card .project-badge {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  width: fit-content;
}

project-card .name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

project-card .description {
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.project-stats {
  font-size: 13px;
  color: var(--text-tertiary);
}

project-card .stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: auto;
}

project-card .stats-icon {
  font-size: 14px;
}

/* Drag and drop styles */
project-card.drag-over .card {
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
  transform: translateY(-4px) scale(1.02);
}

project-card.link-created .card {
  animation: linkCreated 1s ease-out;
}

@keyframes linkCreated {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(46, 204, 113, 0.4);
    border-color: #2ecc71;
  }
  100% {
    box-shadow: var(--shadow-md);
  }
}

/* ==================== altcss/classification-filter.css ==================== */
/* Classification Filter Styles */
classification-filter {
  display: block;
  margin-bottom: 20px;
}

classification-filter .filter-panel {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

classification-filter .filter-panel.collapsed {
  padding: 8px 16px;
}

classification-filter .filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

classification-filter .filter-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

classification-filter .collapse-toggle {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
  flex-shrink: 0;
}

classification-filter .collapse-toggle:hover {
  color: var(--accent-color);
}

classification-filter .filter-header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

classification-filter .active-filter-label {
  background: var(--accent-color);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

classification-filter .clear-filter {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

classification-filter .clear-filter:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

classification-filter .filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

classification-filter .filter-tag {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
}

classification-filter .filter-tag:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

classification-filter .filter-tag.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

classification-filter .show-more {
  background: transparent;
  border: 1px dashed var(--border-color);
  color: var(--text-tertiary);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

classification-filter .show-more:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* Filter search input */
classification-filter .filter-search-wrapper {
  position: relative;
  display: inline-block;
  width: 12%;
  min-width: 100px;
  margin-right: 8px;
  margin-bottom: 8px;
  padding-right: 4px;
}

classification-filter .filter-search-input {
  width: 100%;
  padding: 6px 0px 6px 10px;
  font-size: 11px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.2s;
  outline: none;
}

classification-filter .filter-clear-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

classification-filter .filter-clear-btn:hover {
  color: var(--accent-color);
}

classification-filter .filter-search-input::placeholder {
  color: var(--text-tertiary);
  opacity: 0.6;
}

classification-filter .filter-search-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* ==================== altcss/upload-overlay.css ==================== */
/* Upload Overlay Styles */
upload-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
}

upload-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

upload-overlay .overlay-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

upload-overlay .overlay-content {
  text-align: center;
  color: var(--text-primary);
  padding: 60px 80px;
  border-radius: 12px;
  border: 2px dashed var(--border-color);
  background: var(--bg-primary);
  max-width: 600px;
  transition: all 0.2s ease;
}

upload-overlay.visible .overlay-content {
  border-color: var(--accent-color);
}

upload-overlay .icon {
  font-size: 48px;
  margin-bottom: 24px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

upload-overlay.visible .icon {
  opacity: 1;
}

/* Remove bouncing animation */
upload-overlay.uploading .icon {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

upload-overlay .message {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-primary);
}

upload-overlay .hint {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Success state - subtle green accent */
upload-overlay.success .overlay-content {
  border-color: #27ae60;
}

upload-overlay.success .message {
  color: #27ae60;
}

/* Error state - subtle red accent */
upload-overlay.error .overlay-content {
  border-color: #e74c3c;
}

upload-overlay.error .message {
  color: #e74c3c;
}

/* Uploading state */
upload-overlay.uploading .overlay-content {
  border-color: var(--accent-color);
}

upload-overlay.uploading .message {
  color: var(--accent-color);
}

/* ==================== altcss/search-results.css ==================== */
/* altcss/search-results.css */
search-results {
  display: none;
  margin-bottom: 20px;
}

.search-results-container {
  background: var(--bg-secondary);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-color);
}

.search-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.search-stats span {
  white-space: nowrap;
}

.clear-search {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 24px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.clear-search:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: rotate(90deg);
}

.search-section {
  padding: 20px;
}

.search-section:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 12px 0;
  letter-spacing: 0.5px;
}

.search-classifications {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.classification-pill {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.classification-pill:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.no-results {
  padding: 60px 20px;
  text-align: center;
}

.no-results p {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 16px;
}

.no-results .hint {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .search-header {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .search-header h2 {
    font-size: 16px;
    flex: 1 1 100%;
    margin-bottom: 8px;
  }

  .search-stats {
    flex: 1;
    gap: 12px;
    font-size: 12px;
  }

  .search-section {
    padding: 16px;
  }
}

/* ==================== altcss/workspace.css ==================== */
/* workspace.css - All workspace-related styles */

/* Workspaces Container */
.workspaces-container {
  position: sticky;
  top: 80px;
  z-index: 10;
  background: var(--bg-primary);
  padding: 0 0 10px 0;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  transform-origin: top left;
}

/* Scale down workspaces when scrolled */
.workspaces-container.scaled {
  transform: scale(0.3);
  pointer-events: auto;
  padding: 0;
  margin-bottom: 5px;
  z-index: 50; /* Lower than expanded image cards */
  cursor: pointer; /* Show it's clickable */
}

.workspaces-container.scaled:hover {
  transform: scale(0.32);
  opacity: 0.9;
}

/* Workspace Component */
.workspace {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.3s ease;
  max-height: 400px; /* Fixed maximum height */
  display: flex;
  flex-direction: column;
}

.workspace.collapsed {
  max-height: 60px; /* Just show the header when collapsed */
}

.workspace.collapsed .workspace-content {
  display: none;
}

.workspace-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  flex-shrink: 0; /* Don't shrink the header */
}

.workspace.collapsed .workspace-header {
  border-bottom: none;
}

.workspace-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.workspace-toggle:hover {
  background: var(--bg-primary);
}

.workspace-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workspace-count {
  font-size: 13px;
  color: var(--text-tertiary);
}

.workspace-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.workspace-close:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.workspace-content {
  padding: 16px;
  overflow-y: auto; /* Enable internal scrolling */
  overflow-x: hidden;
  flex: 1; /* Take up remaining space */
  min-height: 0; /* Important for flex scrolling */
}

/* Custom scrollbar styling */
.workspace-content::-webkit-scrollbar {
  width: 8px;
}

.workspace-content::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: 4px;
}

.workspace-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.workspace-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

.workspace-dropzone {
  min-height: 100px;
  border: 2px dashed var(--border-color);
  border-radius: 6px;
  padding: 16px;
  background: var(--bg-primary);
  transition: all 0.2s;
}

.workspace-dropzone.empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.workspace-dropzone.dragover {
  border-color: var(--accent-color);
  background: rgba(52, 152, 219, 0.05);
}

.dropzone-hint {
  color: var(--text-tertiary);
  font-size: 14px;
  margin: 0;
  text-align: center;
}

/* Workspace Items Grid */
.workspace-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.workspace-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.workspace-item:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-sm);
}

.workspace-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--image-bg);
}

.workspace-item-icon {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: var(--bg-primary);
  border-radius: 4px;
}

.workspace-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.workspace-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-item-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

.workspace-item-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 20px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.workspace-item:hover .workspace-item-remove {
  display: flex;
}

.workspace-item-remove:hover {
  background: #e74c3c;
  color: white;
  border-color: #e74c3c;
  transform: scale(1.1);
}

/* Workspace Item Wrappers (for cards) */
.workspace-item-wrapper {
  position: relative;
  break-inside: avoid;
}

.workspace-item-wrapper image-card,
.workspace-item-wrapper project-card {
  width: 100%;
  display: block;
}

.workspace-item-wrapper .workspace-item-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 20px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.workspace-item-wrapper:hover .workspace-item-remove {
  display: flex;
}

.workspace-item-wrapper .workspace-item-remove:hover {
  background: #e74c3c;
  color: white;
  border-color: #e74c3c;
  transform: scale(1.1);
}

.workspace-item-classification {
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .workspace-items {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }

  .workspace-item img,
  .workspace-item-icon {
    height: 100px;
  }
}

/* Split workspace layout */
.workspace-content-split {
  display: flex;
  gap: 16px;
  height: 100%;
}

/* Focus Area - Left Section */
.workspace-focus-area {
  flex: 0 0 280px; /* Fixed width */
  border-right: 2px solid var(--border-color);
  padding-right: 16px;
  display: flex;
  flex-direction: column;
}

.workspace-focus-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.workspace-focus-dropzone {
  flex: 1;
  min-height: 200px;
  border: 2px dashed var(--border-color);
  border-radius: 6px;
  padding: 16px;
  background: var(--bg-primary);
  transition: all 0.2s;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.workspace-focus-dropzone.empty {
  border-style: dashed;
}

.workspace-focus-dropzone.dragover {
  border-color: var(--accent-color);
  background: rgba(52, 152, 219, 0.05);
}

.workspace-focus-dropzone.has-item {
  border-style: solid;
  border-color: var(--accent-color);
  background: rgba(52, 152, 219, 0.02);
}

.workspace-focus-item {
  width: 100%;
}

.workspace-focus-hint {
  color: var(--text-tertiary);
  font-size: 13px;
  text-align: center;
  max-width: 200px;
}

/* Main Workspace Area - Right Section */
.workspace-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Important for flex overflow */
}

.workspace-main-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.workspace-main-dropzone {
  flex: 1;
  min-height: 200px;
  border: 2px dashed var(--border-color);
  border-radius: 6px;
  padding: 16px;
  background: var(--bg-primary);
  transition: all 0.2s;
  overflow-y: auto;
}

.workspace-main-dropzone.empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.workspace-main-dropzone.dragover {
  border-color: var(--accent-color);
  background: rgba(52, 152, 219, 0.05);
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workspace-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #555;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 12px;
  font-weight: 500;
  gap: 6px;
}

.workspace-action-btn:hover {
  background: #e0e0e0;
  color: #222;
}

.workspace-action-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
  opacity: 0.5;
}

.workspace-action-btn:disabled:hover {
  background: transparent;
}

.workspace-action-btn.clear-btn {
  color: #d32f2f;
}

.workspace-action-btn.clear-btn:hover:not(:disabled) {
  background: #ffebee;
  color: #c62828;
}

.workspace-action-btn.link-btn {
  color: #27ae60;
}

.workspace-action-btn.link-btn:hover:not(:disabled) {
  background: #e8f5e9;
  color: #1b5e20;
}

.workspace-action-btn.reanalyse-btn {
  color: #f39c12;
}

.workspace-action-btn.reanalyse-btn:hover:not(:disabled) {
  background: #fff3cd;
  color: #e67e22;
}

.workspace-action-btn.download-btn {
  color: #3498db;
}

.workspace-action-btn.download-btn:hover:not(:disabled) {
  background: #e3f2fd;
  color: #1976d2;
}

/* ==================== altcss/activity-timeline.css ==================== */
/* altcss/activity-timeline.css */
activity-timeline {
  display: block;
  position: fixed;
  right: 0;
  top: 0;
  width: 20px;
  height: 100vh;
  z-index: 80;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
}

.timeline-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.timeline-track {
  position: relative;
  flex: 1;
  width: 100%;
  background: linear-gradient(
    to bottom,
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%
  );
}

.timeline-block {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.timeline-block:hover {
  transform: scaleX(1.5);
  z-index: 10;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
}

.timeline-labels {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 0;
}

.timeline-label-top,
.timeline-label-bottom {
  font-size: 9px;
  color: var(--text-tertiary);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s;
}

activity-timeline:hover .timeline-label-top,
activity-timeline:hover .timeline-label-bottom {
  opacity: 1;
}

.timeline-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 10px;
  color: var(--text-tertiary);
}

/* Tooltip enhancement */
.timeline-block[title] {
  position: relative;
}

/* Responsive */
@media (max-width: 768px) {
  activity-timeline {
    width: 15px;
  }
  
  .timeline-label-top,
  .timeline-label-bottom {
    font-size: 8px;
  }
}

/* ==================== altcss/note-card.css ==================== */
/* altcss/note-card.css */
note-card {
  display: inline-block;
  width: 100%;
  margin-bottom: 16px;
  break-inside: avoid;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  note-card {
    margin-bottom: 12px;
  }
}

note-card .card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--border-color);
  text-decoration: none;
  color: inherit;
}

note-card .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--accent-color);
}

note-card .card:visited,
note-card .card:active {
  color: inherit;
  text-decoration: none;
}

note-card .note-preview-container {
  width: 100%;
  min-height: 180px;
  max-height: 180px;
  overflow: hidden;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

note-card .note-content-preview {
  margin: 0;
  padding: 12px;
  font-family: 'Courier New', Consolas, Monaco, monospace;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-secondary);
  white-space: pre;
  overflow: hidden;
  height: 100%;
}

note-card .note-content-preview code {
  font-family: inherit;
  background: none;
}

note-card .note-info {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

note-card .note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

note-card .note-badge {
  display: inline-block;
  background: #f39c12;
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

note-card .note-language-icon {
  font-size: 18px;
  opacity: 0.8;
}

note-card .note-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

note-card .note-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-tertiary);
}

note-card .note-language {
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

note-card .note-date {
  opacity: 0.7;
}

/* Drag and drop styles */
note-card.drag-over .card {
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
  transform: translateY(-4px) scale(1.02);
}

note-card.link-created .card {
  animation: linkCreated 1s ease-out;
}

@keyframes linkCreated {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(46, 204, 113, 0.4);
    border-color: #2ecc71;
  }
  100% {
    box-shadow: var(--shadow-md);
  }
}

/* ==================== altcss/note.css ==================== */
/* altcss/note-editor.css - Consolidated styles for note editor and note page */

/* Base containers */
note-editor,
note-page,
html-file-page {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
}

note-editor {
  right: 20px;
  background: var(--bg-primary);
}

note-page {
  height: 100vh; /* Fallback for older browsers */
  height: 100dvh; /* Dynamic viewport height for mobile */
}

.note-page-container,
.note-editor-container {
  display: flex;
  flex-direction: column;
  height: 100vh; /* Fallback for older browsers */
  height: 100dvh; /* Dynamic viewport height for mobile */
  background: var(--bg-primary);
}

.note-page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: var(--text-secondary);
  font-size: 16px;
}

/* Header */
.note-editor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-color);
  flex-shrink: 0;
}

.note-title-input {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
}

.note-title-input:focus {
  border-color: var(--accent-color);
}

.note-language-select {
  padding: 8px 12px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.note-language-select:focus {
  border-color: var(--accent-color);
}

/* Buttons */
.note-save-btn,
.note-close-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.note-save-btn {
  background: var(--accent-color);
  color: white;
}

.note-save-btn:hover {
  background: var(--accent-hover);
}

.note-close-btn {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.note-close-btn:hover {
  background: var(--border-color);
}

.note-close-btn-floating {
  position: fixed;
  top: 12px;
  right: 18px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.note-close-btn-floating:hover {
  background: var(--border-color);
  transform: scale(1.1);
}

/* Split screen layout */
.note-editor-body {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 2px;
  background: var(--border-color);
}

/* Left side - Monaco editor */
.note-editor-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  min-width: 0;
}

/* Markdown toolbar */
.markdown-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.md-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  min-width: 28px;
  min-height: 28px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
}

.md-btn:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.md-btn.active {
  background: var(--accent-color);
  color: white;
}

.md-btn.active:hover {
  background: var(--accent-hover);
}

.md-btn svg {
  flex-shrink: 0;
}

.md-separator {
  width: 1px;
  height: 20px;
  background: var(--border-color);
  margin: 0 4px;
}

/* Hide toolbar on very narrow screens */
@media (max-width: 600px) {
  .markdown-toolbar {
    display: none;
  }
}

.monaco-container {
  flex: 1;
  min-height: 0;
  border: none;
}

/* Right side - Story preview */
.note-editor-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  min-width: 0;
}

/* Hide right side on narrow screens */
@media (max-width: 800px) {
  .note-editor-right {
    display: none;
  }
}

/* Preview toolbar (sits above the preview content) */
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.preview-toolbar-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Kebab (three-dot vertical) menu */
.preview-more-menu {
  position: relative;
}

.preview-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.preview-more-btn:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.preview-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 500;
  overflow: hidden;
}

.preview-dropdown.open {
  display: block;
}

.preview-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  white-space: nowrap;
}

.preview-dropdown-item:hover {
  background: var(--bg-secondary);
}

.preview-dropdown-item svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}

/* Story preview area */
.story-preview-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-secondary);
  min-height: 0;
}

.story-preview-content {
  max-width: 800px;
  margin: 0 auto;
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

.story-preview-content.is-visible {
  opacity: 1;
}

/* Markdown styling */
.story-preview-content h1,
.story-preview-content h2,
.story-preview-content h3 {
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 12px;
}

.story-preview-content h1 {
  font-size: 28px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

.story-preview-content h2 {
  font-size: 24px;
}

.story-preview-content h3 {
  font-size: 20px;
}

.story-preview-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.story-preview-content code {
  background: var(--bg-primary);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.code-block-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.story-preview-content pre {
  background: var(--bg-primary);
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  margin: 0;
}

.story-preview-content pre code {
  background: none;
  padding: 0;
}

.copy-code-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text-secondary);
}

.code-block-wrapper:hover .copy-code-button {
  opacity: 1;
}

.copy-code-button:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.copy-code-button:active {
  transform: scale(0.95);
}

.copy-code-button svg {
  width: 16px;
  height: 16px;
  transition: all 0.2s ease;
}

.story-preview-content ul,
.story-preview-content ol {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  padding-left: 24px;
  display: block;
}

.story-preview-content li {
  display: list-item;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.story-preview-content ul {
  list-style-type: disc;
}

.story-preview-content ol {
  list-style-type: decimal;
}

.story-preview-content ul ul {
  list-style-type: circle;
  margin-top: 8px;
}

.story-preview-content ul ul ul {
  list-style-type: square;
}

/* Task lists */
.story-preview-content .task-list-item {
  list-style-type: none;
  margin-left: -24px;
  padding-left: 24px;
}

.story-preview-content .task-list-item input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

.story-preview-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 16px;
  margin-left: 0;
  color: var(--text-tertiary);
  font-style: italic;
}

.story-preview-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

.story-preview-content th,
.story-preview-content td {
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--border-color);
}

.story-preview-content th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
}

.story-preview-content td {
  color: var(--text-secondary);
}

.story-preview-content tr:hover {
  background: var(--bg-secondary);
}

.story-preview-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 16px 0;
  border: 1px solid var(--border-color);
}

.story-preview-content hr {
  border: none;
  border-top: 2px solid var(--border-color);
  margin: 24px 0;
}

.story-preview-content a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s;
}

.story-preview-content a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.story-preview-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.story-preview-content em {
  font-style: italic;
}

.story-preview-content del {
  text-decoration: line-through;
  opacity: 0.7;
}

/* Embedded items in story */
.story-embedded-item {
  /* margin: 24px 0;
  padding: 16px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: border-color 0.2s; */
}

.story-embedded-item:hover {
  border-color: var(--accent-color);
}

.story-embedded-item image-card,
.story-embedded-item project-card,
.story-embedded-item note-card {
  max-width: 400px;
  margin: 0 auto;
}

/* Drop zone indicator in preview */
.story-preview-content.drag-over {
  outline: 2px dashed var(--accent-color);
  outline-offset: 8px;
}

/* Related items grid at bottom */
.related-items-section {
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-top: 2px solid var(--border-color);
  padding: 8px;
  max-height: 300px;
  display: flex;
  flex-direction: column;
  transition: max-height 0.3s ease;
}

.related-items-section.collapsed {
  max-height: 24px;
  overflow: hidden;
}

.related-items-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.related-items-header > span {
  cursor: pointer;
}

.related-items-header > span:hover {
  color: var(--accent-color);
}

.related-items-header-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-items-add-btn {
  padding: 4px 6px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.related-items-add-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--accent-color);
}

.related-items-add-btn svg {
  display: block;
}

.related-items-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.related-items-section.collapsed .related-items-toggle {
  transform: rotate(180deg);
}

.related-items-grid-container {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  transition: opacity 0.3s ease;
}

.related-items-section.collapsed .related-items-grid-container {
  opacity: 0;
  pointer-events: none;
}

.related-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.related-items-grid image-card,
.related-items-grid project-card,
.related-items-grid note-card {
  cursor: grab;
}

.related-items-grid image-card:active,
.related-items-grid project-card:active,
.related-items-grid note-card:active {
  cursor: grabbing;
}

/* Footer */
.note-editor-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

/* Footer title input variant (note-page specific) */
.note-editor-footer .note-title-input {
  margin:-4px;
  flex: 0 1 auto;
  min-width: 150px;
  max-width: 300px;
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 12px;
  font-weight: normal;
}

.note-history-btn {
  padding: 6px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.note-history-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--accent-color);
}

.note-history-btn svg {
  display: block;
}

.save-status {
  flex: 1;
  font-size: 12px;
  color: var(--text-tertiary);
}

.preview-status {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* HTML file page styles */
.html-file-name-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
  padding: 0 4px;
}

.html-launch-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s;
  flex-shrink: 0;
}

.html-launch-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.html-launch-btn svg {
  display: block;
  flex-shrink: 0;
}

.html-preview-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

/* Action button styling */
.note-actions-btn {
  padding: 6px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: 4px;
}

.note-actions-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--accent-color);
}

.note-actions-btn svg {
  display: block;
}

/* Delete button styling */
.note-delete-btn {
  padding: 6px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: auto;
}

.note-delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: #ef4444;
}

.note-delete-btn svg {
  display: block;
}

/* Action card inline styling */
.action-card-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  margin: 16px 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  flex-wrap: wrap;
}

.action-run-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.action-run-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.action-run-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.action-config-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-config-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-color);
}

.action-name {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.action-error,
.action-success {
  width: 100%;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-top: 8px;
}

.action-error {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.action-success {
  background: rgba(46, 204, 113, 0.1);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

/* Action card (for related items grid) */
.action-card {
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.action-badge {
  background: var(--accent-color);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.action-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.action-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 13px;
}

.action-stat {
  display: flex;
  gap: 4px;
}

.stat-label {
  color: var(--text-tertiary);
}

.action-stat-value {
  color: var(--text-primary);
  font-weight: 500;
}

.action-prompt-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Action config modal */
.action-config-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
}

action-config-modal[style*="display: block"] .action-config-modal {
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-config-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
}

.action-config-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 10002;
  display: flex;
  flex-direction: column;
}

.action-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.action-config-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.action-config-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.action-config-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.action-config-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.action-config-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.action-config-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-config-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.action-name-input,
.action-prompt-input {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.action-name-input:focus,
.action-prompt-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.action-prompt-input {
  resize: vertical;
  min-height: 120px;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.action-prompt-help {
  font-size: 13px;
  color: var(--text-tertiary);
  font-style: italic;
}

.action-config-stats {
  margin-top: 8px;
}

.action-config-stats h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.action-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.action-stat-item {
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.action-stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.action-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.action-config-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

.action-config-footer-right {
  display: flex;
  gap: 12px;
}

.action-config-delete,
.action-config-cancel,
.action-config-save {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.action-config-delete {
  background: none;
  border: 1px solid #e74c3c;
  color: #e74c3c;
}

.action-config-delete:hover {
  background: #e74c3c;
  color: white;
}

.action-config-cancel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.action-config-cancel:hover {
  background: var(--bg-tertiary);
}

.action-config-save {
  background: var(--accent-color);
  border: none;
  color: white;
}

.action-config-save:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.action-config-error,
.action-config-success {
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  margin-top: 12px;
}

.action-config-error {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.action-config-success {
  background: rgba(46, 204, 113, 0.1);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

/* Action create modal - reuse most styles */
.action-create-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
}

.action-create-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 10002;
  display: flex;
  flex-direction: column;
}

.action-create-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.action-create-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.action-create-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.action-create-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.action-create-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.action-create-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.action-create-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-create-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.action-create-name-input,
.action-create-prompt-input {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.action-create-name-input:focus,
.action-create-prompt-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.action-create-prompt-input {
  resize: vertical;
  min-height: 120px;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.action-create-prompt-help {
  font-size: 13px;
  color: var(--text-tertiary);
  font-style: italic;
}

.action-create-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

.action-create-cancel,
.action-create-save {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.action-create-cancel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.action-create-cancel:hover {
  background: var(--bg-tertiary);
}

.action-create-save {
  background: var(--accent-color);
  border: none;
  color: white;
}

.action-create-save:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.action-create-error,
.action-create-success {
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  margin-top: 12px;
}

.action-create-error {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.action-create-success {
  background: rgba(46, 204, 113, 0.1);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
  .note-editor-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .note-editor-header .note-title-input {
    flex: 1 1 100%;
  }

  .action-config-modal,
  .action-create-modal {
    width: 95%;
    max-height: 90vh;
  }

  .action-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== altcss/note-history-modal.css ==================== */
/* altcss/note-history-modal.css */

note-history-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
}

.note-history-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: backdropFadeIn 0.3s ease-out;
}

@keyframes backdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.note-history-container {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  max-width: 1400px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: containerSlideIn 0.3s ease-out;
}

@keyframes containerSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.note-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: 12px 12px 0 0;
}

.note-history-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.note-history-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.note-history-close:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

/* Body - Split layout */
.note-history-body {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 1px;
  background: var(--border-color);
}

/* Left section - History list (1/3) */
.history-list-section {
  flex: 0 0 33.333%;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  min-width: 0;
}

.history-list-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.history-list-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  min-height: 300px;
}

.history-list-item {
  padding: 12px 16px;
  margin-bottom: 4px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.history-list-item:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-color);
}

.history-list-item.selected {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.history-list-item.selected .history-item-date,
.history-list-item.selected .history-item-time {
  color: white;
}

.history-item-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.history-item-time {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Right section - Preview (2/3) */
.history-preview-section {
  flex: 0 0 66.666%;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  min-width: 0;
  overflow: hidden;
}

.history-preview-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  min-height: 400px;
}

.history-preview-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}

.history-preview-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.history-preview-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.history-preview-language {
  padding: 4px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

.history-preview-body {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.history-preview-body pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  background: transparent;
}

.history-preview-body code {
  font-family: 'Courier New', Consolas, Monaco, monospace;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Loading/empty states */
.history-loading,
.history-empty,
.history-error,
.history-preview-loading,
.history-preview-empty,
.history-preview-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-tertiary);
  font-size: 14px;
  text-align: center;
}

.history-error,
.history-preview-error {
  color: #ef4444;
}

/* Footer */
.note-history-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: 0 0 12px 12px;
}

.history-action-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.history-restore-btn {
  background: var(--accent-color);
  color: white;
}

.history-restore-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.history-delete-btn {
  background: transparent;
  color: #ef4444;
  border: 1px solid #ef4444;
}

.history-delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  transform: translateY(-1px);
}

.history-action-btn:active {
  transform: translateY(0);
}

/* Scrollbar styling */
.history-list::-webkit-scrollbar,
.history-preview-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.history-list::-webkit-scrollbar-track,
.history-preview-content::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

.history-list::-webkit-scrollbar-thumb,
.history-preview-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover,
.history-preview-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Responsive design */
@media (max-width: 1024px) {
  .note-history-container {
    max-width: 95vw;
    height: 90vh;
  }
}

@media (max-width: 768px) {
  .note-history-backdrop {
    padding: 10px;
  }

  .note-history-container {
    height: 95vh;
  }

  .note-history-body {
    flex-direction: column;
  }

  .history-list-section {
    flex: 0 0 200px;
    max-height: 200px;
  }

  .history-list {
    min-height: 150px;
  }

  .history-preview-section {
    flex: 1;
  }

  .history-preview-content {
    padding: 16px;
    min-height: 200px;
  }

  .history-preview-title {
    font-size: 20px;
  }

  .note-history-footer {
    flex-wrap: nowrap;
  }

  .history-action-btn {
    flex: 0 1 auto;
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .note-history-header {
    padding: 16px;
  }

  .note-history-title {
    font-size: 18px;
  }

  .note-history-container {
    height: 98vh;
  }

  .history-list-section {
    flex: 0 0 150px;
    max-height: 150px;
  }

  .history-list {
    min-height: 100px;
  }

  .history-preview-content {
    padding: 12px;
    min-height: 150px;
  }

  .history-preview-title {
    font-size: 18px;
  }

  .history-preview-body code {
    font-size: 13px;
  }

  .note-history-footer {
    padding: 12px 16px;
    gap: 8px;
  }

  .history-action-btn {
    min-width: 80px;
    padding: 8px 12px;
    font-size: 13px;
  }
}


/* ==================== altcss/auth-modal.css ==================== */
/* altcss/auth-modal.css */
auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
}

.auth-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0a0a0a;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
}

/* Animated background grid */
.auth-modal-backdrop::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridScroll 20s linear infinite;
  pointer-events: none;
}

@keyframes gridScroll {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

/* Floating orbs */
.auth-modal-backdrop::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(138, 43, 226, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255, 0, 128, 0.12) 0%, transparent 50%);
  animation: orbFloat 30s ease-in-out infinite;
  pointer-events: none;
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(5%, 8%) rotate(120deg);
  }
  66% {
    transform: translate(-3%, -5%) rotate(240deg);
  }
}

.auth-modal-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

/* Split layout */
.auth-modal-content {
  display: flex;
  width: 100%;
  position: relative;
  animation: containerFadeIn 0.6s ease-out;
}

@keyframes containerFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Left side - Visual/Branding */
.auth-visual-side {
  flex: 1;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}

/* Animated accent line */
.auth-visual-side::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 255, 255, 0.5) 20%,
    rgba(138, 43, 226, 0.5) 50%,
    rgba(255, 0, 128, 0.5) 80%,
    transparent 100%
  );
  animation: accentPulse 3s ease-in-out infinite;
}

@keyframes accentPulse {
  0%, 100% {
    opacity: 0.5;
    transform: scaleY(1);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.05);
  }
}

.auth-brand {
  z-index: 1;
}

.auth-logo-large {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.auth-logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.auth-logo-icon::before {
  content: '';
  position: absolute;
  inset: 2px;
  background: #0f3460;
  border-radius: 10px;
}

.auth-logo-icon svg {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
}

.auth-logo-text {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.auth-tagline {
  font-size: 42px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 24px;
  text-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

.auth-description {
  font-size: 18px;
  color: #a0aec0;
  line-height: 1.6;
  max-width: 500px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 1;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #cbd5e0;
  font-size: 15px;
}

.auth-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Decorative elements */
.auth-decoration {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.15), transparent 70%);
  pointer-events: none;
  animation: decorFloat 20s ease-in-out infinite;
}

.auth-decoration:nth-child(1) {
  width: 300px;
  height: 300px;
  top: -100px;
  right: -100px;
}

.auth-decoration:nth-child(2) {
  width: 200px;
  height: 200px;
  bottom: -50px;
  left: 10%;
  background: radial-gradient(circle, rgba(138, 43, 226, 0.15), transparent 70%);
  animation-delay: -5s;
}

@keyframes decorFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(20px, -20px) scale(1.1);
  }
}

/* Right side - Form */
.auth-form-side {
  flex: 0 0 480px;
  background: #0d0d0d;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-form-side::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 255, 255, 0.5) 50%,
    transparent 100%
  );
}

.auth-form-container {
  max-width: 400px;
  width: 100%;
}

/* Header */
.auth-header {
  margin-bottom: 40px;
}

.auth-title {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 15px;
  color: #718096;
  margin: 0;
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  position: relative;
}

.auth-tabs::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
}

.auth-tab {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: #4a5568;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-tab::before {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.auth-tab.active {
  color: #00ffff;
}

.auth-tab.active::before {
  transform: scaleX(1);
}

.auth-tab:hover:not(.active) {
  color: #a0aec0;
}

/* Error Message */
.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  border-left: 3px solid #ef4444;
  animation: errorShake 0.4s ease-out;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* Success Message */
.auth-success {
  background: rgba(72, 187, 120, 0.1);
  border: 1px solid rgba(72, 187, 120, 0.3);
  color: #9ae6b4;
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  border-left: 3px solid #48bb78;
  animation: successSlideIn 0.4s ease-out;
}

@keyframes successSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Forgot Password Link */
.auth-forgot-password {
  text-align: right;
  margin: -8px 0 20px 0;
}

.auth-forgot-link {
  color: #00ffff;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.auth-forgot-link:hover {
  color: #8a2be2;
  text-decoration: underline;
}

/* Forms */
.auth-form {
  animation: formSlideIn 0.5s ease-out;
}

@keyframes formSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 0;
}

.auth-form-row .auth-form-group {
  flex: 1;
}

.auth-form-group {
  margin-bottom: 24px;
}

.auth-form-group label {
  display: block;
  margin-bottom: 8px;
  color: #a0aec0;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 15px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.auth-form-group input:focus {
  outline: none;
  border-color: #00ffff;
  background: rgba(0, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.auth-form-group input::placeholder {
  color: #4a5568;
}

.auth-form-group input:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.15);
}

.auth-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #4a5568;
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.auth-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.auth-submit-btn:hover:not(:disabled)::before {
  left: 100%;
}

.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 255, 0.3);
}

.auth-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Footer */
.auth-footer {
  margin-top: 32px;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-footer-text {
  font-size: 12px;
  color: #4a5568;
  margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .auth-visual-side {
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
  }
}

@media (max-width: 768px) {
  .auth-modal-backdrop {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .auth-modal-container {
    flex-direction: column;
    min-height: auto;
  }

  .auth-visual-side {
    display: none;
  }

  .auth-form-side {
    flex: 1 1 auto;
    padding: 32px 24px;
    min-height: auto;
  }

  .auth-form-container {
    max-width: 100%;
  }

  .auth-header {
    margin-bottom: 32px;
  }

  .auth-title {
    font-size: 28px;
  }

  .auth-tabs {
    margin-bottom: 28px;
  }

  .auth-form-row {
    flex-direction: column;
    gap: 0;
  }

  .auth-form-group {
    margin-bottom: 20px;
  }

  .auth-form-group input {
    padding: 16px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .auth-submit-btn {
    padding: 18px 24px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .auth-form-side {
    padding: 24px 16px 32px 16px;
  }

  .auth-header {
    margin-bottom: 24px;
  }

  .auth-title {
    font-size: 24px;
  }

  .auth-subtitle {
    font-size: 14px;
  }

  .auth-tabs {
    gap: 8px;
    margin-bottom: 24px;
  }

  .auth-tab {
    padding: 10px 16px;
    font-size: 13px;
  }

  .auth-form-group {
    margin-bottom: 18px;
  }

  .auth-form-group label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .auth-form-group input {
    padding: 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .auth-submit-btn {
    padding: 16px 20px;
    font-size: 15px;
  }

  .auth-footer {
    margin-top: 24px;
    padding-top: 20px;
  }
}

/* ==================== altcss/verify-email-page.css ==================== */
/* altcss/verify-email-page.css */
verify-email-page {
  display: block;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

.verify-email-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Animated background */
.verify-email-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridScroll 20s linear infinite;
  pointer-events: none;
}

@keyframes gridScroll {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

.verify-email-card {
  background: #0d0d0d;
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 16px;
  padding: 60px 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 255, 255, 0.1);
  animation: cardFadeIn 0.6s ease-out;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.verify-email-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  border-radius: 16px 16px 0 0;
}

.verify-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Spinner */
.verify-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid rgba(0, 255, 255, 0.1);
  border-top-color: #00ffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Icons */
.verify-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: iconPop 0.5s ease-out;
}

@keyframes iconPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-icon {
  background: rgba(72, 187, 120, 0.1);
  border: 2px solid rgba(72, 187, 120, 0.3);
  color: #48bb78;
}

.error-icon {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Text */
.verify-title {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.5px;
}

.verify-text {
  font-size: 15px;
  color: #a0aec0;
  line-height: 1.6;
  margin: 0;
  max-width: 400px;
}

/* Button */
.verify-btn {
  padding: 14px 32px;
  background: linear-gradient(135deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.verify-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 255, 0.3);
}

.verify-btn:active {
  transform: translateY(0);
}

.verify-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

/* Responsive */
@media (max-width: 640px) {
  .verify-email-card {
    padding: 40px 24px;
  }

  .verify-title {
    font-size: 24px;
  }

  .verify-text {
    font-size: 14px;
  }

  .verify-btn {
    padding: 12px 24px;
    font-size: 13px;
  }

  .verify-icon {
    width: 64px;
    height: 64px;
  }

  .verify-icon svg {
    width: 48px;
    height: 48px;
  }
}


/* ==================== altcss/forgot-password-page.css ==================== */
/* altcss/forgot-password-page.css */
forgot-password-page {
  display: block;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

.forgot-password-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Animated background */
.forgot-password-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridScroll 20s linear infinite;
  pointer-events: none;
}

@keyframes gridScroll {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

.forgot-password-card {
  background: #0d0d0d;
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 460px;
  width: 100%;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 255, 255, 0.1);
  animation: cardFadeIn 0.6s ease-out;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.forgot-password-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  border-radius: 16px 16px 0 0;
}

/* Header */
.forgot-password-header {
  text-align: center;
  margin-bottom: 32px;
}

.forgot-password-title {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.forgot-password-subtitle {
  font-size: 14px;
  color: #a0aec0;
  line-height: 1.6;
  margin: 0;
}

/* Messages */
.forgot-password-message {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  animation: messageSlideIn 0.4s ease-out;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.forgot-password-message.success {
  background: rgba(72, 187, 120, 0.1);
  border: 1px solid rgba(72, 187, 120, 0.3);
  color: #9ae6b4;
  border-left: 3px solid #48bb78;
}

.forgot-password-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-left: 3px solid #ef4444;
}

/* Form */
.forgot-password-form {
  animation: formSlideIn 0.5s ease-out;
}

@keyframes formSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.forgot-password-form-group {
  margin-bottom: 24px;
}

.forgot-password-form-group label {
  display: block;
  margin-bottom: 8px;
  color: #a0aec0;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.forgot-password-form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 15px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.forgot-password-form-group input:focus {
  outline: none;
  border-color: #00ffff;
  background: rgba(0, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.forgot-password-form-group input::placeholder {
  color: #4a5568;
}

.forgot-password-form-group input:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.15);
}

.forgot-password-form-group input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Button */
.forgot-password-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.forgot-password-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.forgot-password-btn:hover:not(:disabled)::before {
  left: 100%;
}

.forgot-password-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 255, 0.3);
}

.forgot-password-btn:active:not(:disabled) {
  transform: translateY(0);
}

.forgot-password-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Button spinner */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Footer */
.forgot-password-footer {
  margin-top: 24px;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.forgot-password-back-link {
  color: #00ffff;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.forgot-password-back-link:hover {
  color: #8a2be2;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
  .forgot-password-card {
    padding: 32px 24px;
  }

  .forgot-password-title {
    font-size: 24px;
  }

  .forgot-password-subtitle {
    font-size: 13px;
  }

  .forgot-password-form-group input {
    padding: 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .forgot-password-btn {
    padding: 16px 20px;
    font-size: 14px;
  }
}


/* ==================== altcss/reset-password-page.css ==================== */
/* altcss/reset-password-page.css */
reset-password-page {
  display: block;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

.reset-password-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Animated background */
.reset-password-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridScroll 20s linear infinite;
  pointer-events: none;
}

@keyframes gridScroll {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

.reset-password-card {
  background: #0d0d0d;
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 460px;
  width: 100%;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 255, 255, 0.1);
  animation: cardFadeIn 0.6s ease-out;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reset-password-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  border-radius: 16px 16px 0 0;
}

/* Header */
.reset-password-header {
  text-align: center;
  margin-bottom: 32px;
}

.reset-password-title {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.reset-password-subtitle {
  font-size: 14px;
  color: #a0aec0;
  line-height: 1.6;
  margin: 0;
}

.reset-password-text {
  font-size: 15px;
  color: #a0aec0;
  line-height: 1.6;
  margin: 24px 0;
  text-align: center;
}

/* Messages */
.reset-password-message {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  animation: messageSlideIn 0.4s ease-out;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reset-password-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-left: 3px solid #ef4444;
}

/* Form */
.reset-password-form {
  animation: formSlideIn 0.5s ease-out;
}

@keyframes formSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reset-password-form-group {
  margin-bottom: 24px;
}

.reset-password-form-group label {
  display: block;
  margin-bottom: 8px;
  color: #a0aec0;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reset-password-form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 15px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.reset-password-form-group input:focus {
  outline: none;
  border-color: #00ffff;
  background: rgba(0, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.reset-password-form-group input::placeholder {
  color: #4a5568;
}

.reset-password-form-group input:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.15);
}

.reset-password-form-group input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.reset-password-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #4a5568;
}

/* Button */
.reset-password-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.reset-password-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.reset-password-btn:hover:not(:disabled)::before {
  left: 100%;
}

.reset-password-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 255, 0.3);
}

.reset-password-btn:active:not(:disabled) {
  transform: translateY(0);
}

.reset-password-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Button spinner */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success state */
#successState {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.reset-success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(72, 187, 120, 0.1);
  border: 2px solid rgba(72, 187, 120, 0.3);
  color: #48bb78;
  animation: iconPop 0.5s ease-out;
}

@keyframes iconPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Footer */
.reset-password-footer {
  margin-top: 24px;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.reset-password-back-link {
  color: #00ffff;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.reset-password-back-link:hover {
  color: #8a2be2;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
  .reset-password-card {
    padding: 32px 24px;
  }

  .reset-password-title {
    font-size: 24px;
  }

  .reset-password-subtitle {
    font-size: 13px;
  }

  .reset-password-form-group input {
    padding: 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .reset-password-btn {
    padding: 16px 20px;
    font-size: 14px;
  }

  .reset-success-icon {
    width: 64px;
    height: 64px;
  }

  .reset-success-icon svg {
    width: 48px;
    height: 48px;
  }
}


/* ==================== altcss/user-dropdown.css ==================== */
/* altcss/user-dropdown.css */
user-dropdown {
  display: block;
}

.user-dropdown-container {
  position: relative;
}

.user-dropdown-trigger {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--bg-secondary);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-dropdown-trigger:hover {
  border-color: var(--accent-color);
  transform: scale(1.05);
}

.user-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-initials {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
}

.user-dropdown-menu {
  position: absolute;
  top: 50px;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.user-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  padding: 16px;
}

.user-dropdown-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-dropdown-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-dropdown-email {
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 0;
}

.user-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: left;
}

.user-dropdown-item:first-of-type {
  border-radius: 0;
}

.user-dropdown-item:hover {
  background: var(--bg-primary);
}

.user-dropdown-item svg {
  flex-shrink: 0;
}

.user-dropdown-logout {
  color: #ef4444;
}

.user-dropdown-logout:hover {
  background: rgba(239, 68, 68, 0.1);
}

.user-dropdown-loading {
  padding: 12px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ==================== altcss/account-page.css ==================== */
/* altcss/account-page.css */
account-page {
  display: block;
}

.account-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.account-header {
  margin-bottom: 40px;
}

.account-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.account-back-btn:hover {
  background: var(--bg-primary);
  border-color: var(--accent-color);
}

.account-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.account-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.account-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px;
}

.account-section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 24px 0;
}

/* Profile Image Section */
.account-profile-image-section {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

.account-profile-image-container {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
}

.account-profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-profile-initials {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  user-select: none;
}

.account-profile-image-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Forms */
.account-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.account-form-row {
  display: flex;
  gap: 16px;
}

.account-form-row .account-form-group {
  flex: 1;
}

.account-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.account-form-group input {
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.2s ease;
}

.account-form-group input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.account-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.account-form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 8px;
}
/* Buttons */
.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary {
  background: var(--accent-color);
  color: white;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}
.btn-secondary:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}
/* Messages */
.account-error,
.account-success {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}
.account-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}
.account-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}
.account-loading {
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
}
/* API Keys Section */
.account-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.account-section-header .account-section-title {
  margin: 0;
}

.account-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.account-empty-state svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

.account-empty-state p {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.account-empty-state small {
  font-size: 14px;
  color: var(--text-secondary);
}

.api-keys-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.api-key-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.api-key-item:hover {
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.api-key-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.api-key-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.api-key-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.api-key-meta-separator {
  color: var(--border-color);
}

.api-key-revoke {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-danger-outline {
  background: transparent;
  color: #ef4444;
  border: 2px solid #ef4444;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-danger-outline:hover {
  background: #ef4444;
  color: white;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px 24px 24px;
  border-top: 1px solid var(--border-color);
}

.api-key-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  margin: 16px 0;
}

.api-key-display code {
  flex: 1;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-all;
  user-select: all;
}

.api-key-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: 8px;
  color: #eab308;
  font-size: 13px;
}

.api-key-warning svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Responsive */
@media (max-width: 640px) {
  .account-container {
    padding: 20px 16px;
  }
  .account-section {
    padding: 24px 20px;
  }
  .account-title {
    font-size: 24px;
  }
  .account-form-row {
    flex-direction: column;
    gap: 20px;
  }
  .account-profile-image-section {
    flex-direction: column;
    text-align: center;
  }
  .account-profile-image-actions {
    align-items: center;
  }
  .account-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .api-key-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .modal-content {
    max-width: 100%;
  }
}


/* ==================== altcss/empty-state.css ==================== */
/* altcss/empty-state.css */
empty-state {
  display: block;
  width: 100%;
  min-height: calc(100vh - 120px);
  position: relative;
}

.empty-state-container {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Content */
.empty-state-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  padding: 60px 40px;
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Icon */
.empty-state-icon-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 32px;
}

.empty-state-icon {
  font-size: 80px;
  position: relative;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* Title and subtitle */
.empty-state-title {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, #3498db 0%, #9b59b6 50%, #e74c3c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 20px 0;
  letter-spacing: -0.5px;
}

[data-theme="dark"] .empty-state-title {
  background: linear-gradient(135deg, #00ffff 0%, #a78bfa 50%, #ff00ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.empty-state-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0 0 48px 0;
  line-height: 1.6;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Action buttons */
.empty-state-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 64px;
}

.empty-state-btn {
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  position: relative;
  overflow: hidden;
}

.empty-state-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.empty-state-btn:hover::before {
  width: 300px;
  height: 300px;
}

.empty-state-btn.primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
}

[data-theme="dark"] .empty-state-btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.empty-state-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(52, 152, 219, 0.4);
}

[data-theme="dark"] .empty-state-btn.primary:hover {
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.empty-state-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.empty-state-btn.secondary:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-3px);
}

.empty-state-btn .btn-icon {
  font-size: 20px;
  position: relative;
  z-index: 1;
}

.empty-state-btn span {
  position: relative;
  z-index: 1;
}

/* Feature cards */
.empty-state-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.feature-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 24px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2);
}

[data-theme="dark"] .feature-card:hover {
  box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 16px;
  display: inline-block;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .empty-state-content {
    padding: 40px 20px;
  }

  .empty-state-icon {
    font-size: 60px;
  }

  .empty-state-title {
    font-size: 32px;
  }

  .empty-state-subtitle {
    font-size: 16px;
  }

  .empty-state-actions {
    flex-direction: column;
    width: 100%;
  }

  .empty-state-btn {
    width: 100%;
    justify-content: center;
  }

  .empty-state-features {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 24px 20px;
  }
}

/* ==================== altcss/toast.css ==================== */
/* Toast Container */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  pointer-events: none;
}

/* Toast */
.toast {
  position: relative;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 16px;
  min-width: 300px;
  max-width: 420px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  overflow: hidden;
}

.toast-show {
  opacity: 1;
  transform: translateX(0);
}

.toast-hide {
  opacity: 0;
  transform: translateX(100%);
}

/* Toast Content */
.toast-content {
  position: relative;
  z-index: 1;
}

.toast-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 50%;
  flex-shrink: 0;
}

.toast-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: #1a1a1a;
}

.toast-description {
  margin-top: 4px;
  margin-left: 30px;
  font-size: 13px;
  line-height: 18px;
  color: #666;
}

.toast-close {
  background: none;
  border: none;
  color: #999;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s;
}

.toast-close:hover {
  color: #666;
}

/* Toast Variants */
.toast-success {
  border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
  background: #d1fae5;
  color: #059669;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
  background: #fee2e2;
  color: #dc2626;
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
  background: #fef3c7;
  color: #d97706;
}

.toast-info {
  border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
  background: #dbeafe;
  color: #2563eb;
}

/* Progress Bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  transform-origin: left;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .toast {
    background: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  }

  .toast-title {
    color: #f5f5f5;
  }

  .toast-description {
    color: #b3b3b3;
  }

  .toast-close {
    color: #999;
  }

  .toast-close:hover {
    color: #ccc;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    min-width: auto;
    max-width: none;
  }
}


/* ==================== altcss/confirmation-dialog.css ==================== */
/* altcss/confirmation-dialog.css */
confirmation-dialog {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
}

.confirmation-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.confirmation-backdrop.confirmation-show {
  opacity: 1;
}

.confirmation-dialog {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  width: calc(100% - 32px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirmation-dialog.confirmation-show {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.confirmation-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.confirmation-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.confirmation-icon-warning {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 2px solid rgba(251, 191, 36, 0.3);
}

.confirmation-icon-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 2px solid rgba(239, 68, 68, 0.3);
}

.confirmation-icon-info {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 2px solid rgba(59, 130, 246, 0.3);
}

.confirmation-icon-success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 2px solid rgba(34, 197, 94, 0.3);
}

.confirmation-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  flex: 1;
}

.confirmation-message {
  font-size: 15px;
  color: #a0aec0;
  line-height: 1.6;
  margin-bottom: 32px;
  white-space: pre-wrap;
}

.confirmation-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.confirmation-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 100px;
}

.confirmation-btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  color: #a0aec0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.confirmation-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.confirmation-btn-cancel:active {
  transform: scale(0.98);
}

.confirmation-btn-confirm {
  position: relative;
  overflow: hidden;
}

.confirmation-btn-confirm::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.confirmation-btn-confirm:hover::before {
  left: 100%;
}

.confirmation-btn-confirm:active {
  transform: scale(0.98);
}

.confirmation-btn-warning {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #000000;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.confirmation-btn-warning:hover {
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.4);
  transform: translateY(-1px);
}

.confirmation-btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.confirmation-btn-danger:hover {
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.confirmation-btn-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.confirmation-btn-info:hover {
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.confirmation-btn-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.confirmation-btn-success:hover {
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 640px) {
  .confirmation-dialog {
    padding: 24px;
    max-width: calc(100% - 24px);
  }

  .confirmation-header {
    margin-bottom: 16px;
  }

  .confirmation-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .confirmation-title {
    font-size: 18px;
  }

  .confirmation-message {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .confirmation-actions {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .confirmation-btn {
    width: 100%;
    padding: 14px 24px;
  }
}


/* ==================== altcss/sidebar.css ==================== */
/* Left Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 50;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow-lg);
}

.sidebar.open {
  transform: translateX(0);
}

/* Shift main content when sidebar is open */
body.sidebar-open .container {
  margin-left: 280px;
  transition: margin-left 0.3s ease;
}

body.sidebar-open .header {
  transition: padding-left 0.3s ease;
}

.sidebar-header {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1;
}

.sidebar-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
  float: right;
}

.sidebar-close:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.sidebar-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}

.sidebar-content {
  padding: 20px;
  overflow-x: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-section {
  margin-bottom: 24px;
  overflow-x: hidden;
}

.sidebar-section-title {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.sidebar-breadcrumb {
  background: var(--bg-secondary);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.sidebar-breadcrumb a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  display: block;
  padding: 4px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.sidebar-breadcrumb a:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.sidebar-breadcrumb-separator {
  color: var(--text-tertiary);
  margin: 0 4px;
}

.sidebar-breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
  display: block;
  padding: 4px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.sidebar-search {
  width: 100%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.sidebar-search::placeholder {
  color: var(--text-tertiary);
}

.sidebar-search:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.sidebar-count {
  background: var(--bg-secondary);
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-action-btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: background-color 0.2s, transform 0.1s;
  border: 1px solid var(--border-color);
}

.sidebar-action-btn small {
  display: block;
  color: #9e9e9e;
  padding-top:6px;
}

.sidebar-action-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.sidebar-action-btn:active {
  transform: scale(0.98);
}

.sidebar-action-btn.primary {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.sidebar-action-btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Hamburger Menu Button */
.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  margin-right: 12px;
  transition: opacity 0.2s;
}

.sidebar-toggle:hover {
  opacity: 0.7;
}

.sidebar-toggle:active {
  transform: scale(0.95);
}

.sidebar-toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: background-color 0.2s;
}

/* Project List Styles */
.sidebar-projects {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-project-item {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: background-color 0.2s, transform 0.1s;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  box-sizing: border-box;
}

.sidebar-project-item span:last-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-project-item:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.sidebar-project-item:active {
  transform: scale(0.98);
}

.sidebar-project-icon {
  font-size: 16px;
}

.sidebar-loading {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.sidebar-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .sidebar {
    width: 85%;
    max-width: 320px;
  }

  /* Don't shift content on mobile when sidebar is open */
  body.sidebar-open .container {
    margin-left: 0;
  }

  body.sidebar-open .header {
    padding-left: 0;
  }
}


/* ==================== altcss/project-settings.css ==================== */
/* Project Settings Styling */
.project-settings-container {
  width: 100%;
  min-height: 100vh;
  background: var(--bg-primary);
  padding: 24px;
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

.project-settings-header {
  max-width: 1400px;
  margin: 0 auto 32px;
  box-sizing: border-box;
}

.settings-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.settings-back-btn:hover {
  background: var(--bg-primary);
  border-color: var(--accent-color);
}

.settings-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.settings-layout {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
.settings-sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 24px;
  height: fit-content;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.settings-nav-item:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.settings-nav-item.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.settings-nav-item.indented {
  margin-left: 16px;
}

.settings-nav-item.danger {
  color: #ef4444;
}

.settings-nav-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}

.settings-sidebar-divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 0;
}

/* Content */
.settings-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px;
}

.settings-section-content {
  max-width: 800px;
}

.settings-section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 24px 0;
}

/* Form Elements */
.settings-group {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

.settings-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.settings-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.settings-input,
.settings-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.settings-input:focus,
.settings-textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.settings-textarea {
  resize: vertical;
  min-height: 100px;
}

.settings-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Tags */
.tags-input-container {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  background: var(--bg-primary);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent-color);
  color: white;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.tag-remove {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.tag-remove:hover {
  background: rgba(255, 255, 255, 0.2);
}

.tags-input {
  flex: 1;
  min-width: 120px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

/* Banner */
.banner-preview {
  width: 100%;
  height: 200px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
}

.banner-placeholder p {
  margin: 8px 0 0 0;
  font-size: 14px;
}

.banner-actions {
  display: flex;
  gap: 12px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
margin-bottom: 32px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-color);
  border-radius: 10px;
  color: white;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Activity Log */
.activity-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-log-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.activity-log-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-log-icon.upload {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.activity-log-icon.edit {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.activity-log-icon.delete {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.activity-log-content {
  flex: 1;
}

.activity-log-text {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.activity-log-time {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Categories */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-item {
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.category-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.category-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.category-count {
  font-size: 13px;
  color: var(--text-secondary);
}

.category-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.category-bar-fill {
  height: 100%;
  background: var(--accent-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Action Buttons */
.settings-actions {
  display: flex;
  gap: 12px;
  padding-top: 24px;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--border-color);
  border-color: var(--accent-color);
}

/* Empty States */
.empty-state-small {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.settings-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--text-secondary);
}

/* Organization Info Box */
.organization-info-box {
  padding: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.organization-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.organization-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  opacity: 0.85;
}

/* Security Section Styles */
.settings-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.user-access-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-access-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.user-access-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.user-access-info {
  flex: 1;
}

.user-access-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.user-access-email {
  font-size: 12px;
  color: var(--text-secondary);
}

.user-role-select {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
}

/* Permission Options */
.permission-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.permission-option {
  display: flex;
  cursor: pointer;
}

.permission-option input[type="radio"] {
  margin-right: 12px;
  margin-top: 4px;
  cursor: pointer;
}

.permission-option-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  flex: 1;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.permission-option input[type="radio"]:checked + .permission-option-content {
  border-color: var(--accent-color);
  background: rgba(52, 152, 219, 0.05);
}

.permission-option-content svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.permission-option-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.permission-option-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Permission Toggles */
.permission-toggles {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.permission-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.permission-toggle:hover {
  border-color: var(--accent-color);
}

.permission-toggle input[type="checkbox"] {
  cursor: pointer;
}

.permission-toggle span {
  font-size: 14px;
  color: var(--text-primary);
}

/* ==================== altcss/organization-settings.css ==================== */
/* Organization Settings Styling */
.organization-settings-container {
  width: 100%;
  min-height: 100vh;
  background: var(--bg-primary);
  padding: 24px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.organization-settings-header {
  max-width: 1400px;
  margin: 0 auto 32px;
  box-sizing: border-box;
}

/* Global Organization Selector */
.org-selector-global {
  max-width: 1400px;
  margin: 0 auto 24px;
  padding: 16px 20px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.org-selector-global label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.org-selector-global select {
  flex: 1;
  max-width: 400px;
}

/* Settings Section Header */
.settings-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

/* Organization Selector */
.org-selector {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.settings-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  color: var(--text-secondary);
}

.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.empty-state p {
  font-size: 14px;
  margin: 0;
}

/* Loading State */
.loading-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-secondary);
}

/* Info Message */
.info-message {
  padding: 16px;
  background: rgba(52, 152, 219, 0.1);
  border: 1px solid var(--accent-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

/* Create Organization Form */
.create-org-form {
  padding: 24px;
  background: var(--bg-primary);
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  margin-bottom: 24px;
}

.create-org-form h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Organizations List */
.organizations-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Organization Card */
.organization-card {
  padding: 20px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
}

.organization-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.organization-card.selected {
  border-color: var(--accent-color);
  background: rgba(52, 152, 219, 0.05);
}

.org-card-header {
  margin-bottom: 16px;
}

.org-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.org-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.org-card-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Organization Stats */
.org-card-stats {
  display: flex;
  gap: 24px;
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.org-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.org-stat svg {
  color: var(--accent-color);
  flex-shrink: 0;
}

/* Organization Card Actions */
.org-card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-color);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  transition: all 0.2s ease;
}

.btn-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* Role Badges */
.role-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-badge-admin {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.role-badge-edit {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.role-badge-view {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

/* Members Section */
.members-container {
  margin-top: 24px;
}

.members-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.members-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.members-count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.members-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Member Card */
.member-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.member-card:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-sm);
}

.member-info {
  display: flex;
  gap: 12px;
  flex: 1;
}

.member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.member-details {
  flex: 1;
}

.member-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.member-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.you-badge {
  padding: 2px 8px;
  background: var(--accent-color);
  color: white;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.member-email {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 4px 0;
}

.member-joined {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.member-actions {
  display: flex;
  gap: 8px;
}

.role-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-select:hover {
  border-color: var(--accent-color);
}

.role-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Projects Section */
.projects-container {
  margin-top: 24px;
}

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.projects-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.projects-count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.projects-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* Project Card */
.project-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.project-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.project-banner {
  width: 100%;
  height: 150px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-secondary);
}

.project-banner-placeholder {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.project-card-content {
  padding: 16px;
}

.project-card-header {
  margin-bottom: 12px;
}

.project-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.project-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ownership-badge {
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ownership-owned {
  background: rgba(52, 152, 219, 0.1);
  color: var(--accent-color);
}

.ownership-shared {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

.project-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 12px 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.project-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.project-stat svg {
  color: var(--accent-color);
  flex-shrink: 0;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.project-tag {
  padding: 4px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
}

.project-tag-more {
  padding: 4px 8px;
  background: var(--accent-color);
  color: white;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.project-card-actions {
  display: flex;
  gap: 12px;
  padding-top: 8px;
}

/* Organization ID Display */
.org-card-id {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background-color: var(--bg-secondary);
  border-radius: 6px;
  font-size: 13px;
  position: relative;
  user-select: text;
}

.org-id-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.org-id-value {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
  padding: 4px 8px;
  border-radius: 4px;
  user-select: all;
  cursor: text;
}

.org-id-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  margin-left: auto;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.org-id-copy-btn:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.org-id-copy-btn:active {
  transform: scale(0.95);
}

.org-id-copy-btn svg {
  display: block;
}

/* Settings Header Actions */
.settings-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: var(--bg-primary);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.settings-help-text {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Join Requests List */
.join-requests-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.join-request-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s;
}

.join-request-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.request-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.request-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-email {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.request-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.date-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.date-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.request-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.role-selector-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.role-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.role-select:hover {
  border-color: var(--primary-color);
}

.role-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-success {
  background-color: #10b981;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-success:hover {
  background-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-danger {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-state p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .projects-list {
    grid-template-columns: 1fr;
  }

  .org-card-stats {
    flex-direction: column;
    gap: 8px;
  }

  .request-card-header {
    flex-direction: column;
    gap: 12px;
  }

  .request-date {
    align-items: flex-start;
  }

  .request-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .action-buttons {
    width: 100%;
  }

  .action-buttons button {
    flex: 1;
  }

  .settings-header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-header-actions button {
    width: 100%;
  }
}


/* ==================== altcss/billing.css ==================== */
/* altcss/billing.css */

/* ── Loading ────────────────────────────────────────────────────────────── */
.billing-loading {
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ── Current plan banner ────────────────────────────────────────────────── */
.billing-current-plan {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 24px;
}

.billing-plan-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Plan badges */
.billing-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.billing-plan-badge--free {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
}
.billing-plan-badge--pro {
  background: rgba(52, 152, 219, 0.15);
  color: var(--accent-color);
}
.billing-plan-badge--team {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

/* Status labels */
.billing-plan-status {
  font-size: 13px;
  color: var(--text-secondary);
}
.billing-status--active   { color: #22c55e; }
.billing-status--trialing { color: #f59e0b; }
.billing-status--past_due { color: #ef4444; }
.billing-status--canceled { color: var(--text-secondary); text-decoration: line-through; }
.billing-status--unpaid   { color: #ef4444; }

/* ── Monthly / Annual toggle ────────────────────────────────────────────── */
.billing-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.billing-toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.billing-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.billing-toggle input { opacity: 0; width: 0; height: 0; }
.billing-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-color);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.billing-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.billing-toggle input:checked + .billing-toggle-slider {
  background: var(--accent-color);
}
.billing-toggle input:checked + .billing-toggle-slider::before {
  transform: translateX(20px);
}

.billing-save-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ── Plan cards grid ────────────────────────────────────────────────────── */
.billing-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.billing-plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  transition: border-color 0.2s ease;
}
.billing-plan-card--featured {
  border-color: var(--accent-color);
  box-shadow: 0 4px 20px rgba(52, 152, 219, 0.12);
}
.billing-plan-card--current {
  border-color: #22c55e;
}

.billing-plan-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 10px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.billing-plan-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.billing-plan-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.billing-price-period {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
}

.billing-plan-annual-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: -8px;
}

.billing-plan-features {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.billing-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.billing-plan-features li svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #22c55e;
}

.billing-plan-features--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

/* ── Cancel / danger rows ───────────────────────────────────────────────── */
.billing-cancel-notice {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.2);
  border-radius: 8px;
}

.billing-danger-row {
  display: flex;
  justify-content: flex-start;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: var(--accent-color);
  cursor: pointer;
  text-decoration: underline;
  font-weight: 600;
}
.btn-link:hover { opacity: 0.8; }

/* ── Upgrade prompt (org billing) ───────────────────────────────────────── */
.billing-upgrade-prompt {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: rgba(52, 152, 219, 0.06);
  border: 1px solid rgba(52, 152, 219, 0.2);
  border-radius: 10px;
  margin-bottom: 24px;
}
.billing-upgrade-prompt__icon {
  flex-shrink: 0;
  color: var(--accent-color);
  opacity: 0.8;
}
.billing-upgrade-prompt__body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}
.billing-upgrade-prompt__body p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ── Seat count selector ────────────────────────────────────────────────── */
.billing-seats-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.billing-seats-control {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}
.billing-seats-btn {
  width: 36px;
  height: 36px;
  background: var(--bg-primary);
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.billing-seats-btn:hover { background: var(--bg-secondary); }
.billing-seats-count {
  min-width: 40px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 0 4px;
  border-left: 2px solid var(--border-color);
  border-right: 2px solid var(--border-color);
  line-height: 36px;
}
.billing-seats-total {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Team features list (when already on Team plan) ─────────────────────── */
.billing-team-features {
  padding: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}
.billing-features-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px 0;
}

/* ── Settings section header (used in org billing) ───────────────────────── */
.settings-section-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.settings-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.settings-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.settings-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: block;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .billing-plans-grid {
    grid-template-columns: 1fr;
  }
  .billing-current-plan {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .billing-plan-features--grid {
    grid-template-columns: 1fr;
  }
}


/* ==================== altcss/styles.css ==================== */
/* Theme Variables */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --border-color: #d2d2d7;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.16);
  --card-bg: #f5f5f7;
  --card-hover-shadow: 0 4px 20px rgba(0,0,0,0.15);
  --image-bg: #e8e8ed;
  --accent-color: #3498db;
  --accent-hover: #2980b9;
}

[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-tertiary: #808080;
  --border-color: #404040;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.4);
  --card-bg: #2d2d2d;
  --card-hover-shadow: 0 4px 16px rgba(0,0,0,0.5);
  --image-bg: #1f1f1f;
  --accent-color: #3498db;
  --accent-hover: #5dade2;
}

* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.container {
  padding: 20px;
  margin: 0 20px 0 0; /* Add right margin for timeline */
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-right: 40px; /* Add this line - match the container's right margin */
  flex-wrap: wrap;
  gap: 15px;
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 40;
  padding: 10px 0;
  width:100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

h1 {
  margin: 0;
  color: var(--text-primary);
}

.search {
  flex: 1;
  min-width: 0;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search::placeholder {
  color: var(--text-tertiary);
}

.search:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search:hover:not(:focus) {
  border-color: var(--text-tertiary);
}

.stats {
  background: var(--bg-secondary);
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.breadcrumb {
  background: var(--bg-secondary);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  /* width: 100%; */
  border: 1px solid var(--border-color);
}

.breadcrumb a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.breadcrumb-separator {
  color: var(--text-tertiary);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

a.breadcrumb-current:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.blink {
  display: flex;
  align-items: center;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 50px;
  width: 60px;
  height: 32px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
  border-color: var(--accent-color);
}

.theme-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: var(--accent-color);
  border-radius: 50%;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

[data-theme="dark"] .theme-toggle-slider {
  transform: translateX(28px);
}

/* Detail View Layout */
.detail-view {
  display: none;
  grid-template-columns: 500px 1fr;
  gap: 24px;
  min-height: calc(100vh - 180px);
  margin-right: 20px; /* Space for timeline */
}

.detail-view.active {
  display: grid;
}

.detail-left {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  max-height: calc(100vh - 40px);
}

.detail-right {
  overflow-y: visible; /* Changed from auto */
  min-width: 0;
}

.detail-right h2 {
  color: var(--text-primary);
}

.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  opacity: 0.95;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--accent-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .breadcrumb {
    flex-wrap: wrap;
    padding: 10px 16px;
    justify-content: space-between;
  }

  /* Breadcrumb navigation on the left */
  #homeLink,
  #breadcrumbSep,
  #currentContext,
  .sidebar-toggle {
    order: 1;
  }

  .sidebar-toggle {
    margin-right: 8px;
  }

  /* Buttons on the right */
  .upload-button {
    order: 2;
    margin-left: auto;
    margin-right: 4px;
  }

  .create-menu {
    order: 3;
    margin-right: 4px;
  }

  user-dropdown {
    order: 4;
  }

  /* Search bar takes full width on next line */
  .search {
    order: 10;
    width: 100%;
    flex: 1 1 100%;
    margin-top: 8px;
  }

  /* Hide stats on mobile */
  #imageCount {
    display: none;
  }
}

/* Extra small screens - minimal UI */
@media (max-width: 480px) {
  .breadcrumb {
    gap: 8px;
    flex-wrap: nowrap;
  }

  /* Hide everything except essential elements */
  #homeLink,
  #breadcrumbSep,
  #currentContext,
  .upload-button,
  .create-menu {
    display: none !important;
  }

  /* Keep only sidebar toggle, search, and user dropdown */
  .sidebar-toggle {
    display: flex !important;
    order: 1;
    margin-right: 8px;
    flex-shrink: 0;
  }

  .search {
    order: 2;
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    margin-top: 0;
  }

  user-dropdown {
    order: 3;
    display: block !important;
    flex-shrink: 0;
    margin-left: 8px;
  }

  /* Ensure stats stay hidden */
  #imageCount {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .detail-view {
    grid-template-columns: 1fr;
    height: auto;
  }

  .detail-left {
    position: relative;
    max-height: none;
  }
}

/* Create Menu Styles */
.create-menu {
  position: relative;
  display: inline-block;
}

.create-button {
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.1s;
  box-shadow: var(--shadow-sm);
}

.create-button:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.create-button:active {
  transform: scale(0.95);
}

.create-dropdown {
  display: none;
  position: absolute;
  top: 38px;
  right: 0;
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  z-index: 1000;
  overflow: hidden;
}

[data-theme="dark"] .create-dropdown {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.create-dropdown.show {
  display: block;
}

.dropdown-item {
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: #ffffff;
  color: #1d1d1f;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

[data-theme="dark"] .dropdown-item {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Upload Button Styles */
.upload-button {
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.1s;
  box-shadow: var(--shadow-sm);
  margin-right: 8px;
}

.upload-button:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.upload-button:active {
  transform: scale(0.95);
}

.dropdown-item:first-child {
  border-radius: 6px 6px 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 6px 6px;
}

.dropdown-item:only-child {
  border-radius: 6px;
}

.dropdown-item:hover {
  background: #f5f5f7;
}

[data-theme="dark"] .dropdown-item:hover {
  background: var(--bg-primary);
}

[data-theme="dark"] .form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b0b0b0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 20px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.modal form {
  padding: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box; /* This is the key fix */
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236e6e73' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.btn-cancel,
.btn-primary {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  border: none;
}

.btn-cancel {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-cancel:hover {
  background: var(--border-color);
}

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-cancel:active,
.btn-primary:active {
  transform: scale(0.98);
}

.dragging {
  opacity: 0.5;
  transform: scale(0.95);
  transition: opacity 0.2s, transform 0.2s;
}

.drag-ready {
  animation: drag-ready-pulse 0.6s ease-in-out;
}

@keyframes drag-ready-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.explicitly-related-section {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.explicitly-related-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.related-classification-tag {
  background: var(--card-bg);
  border: 2px solid var(--accent-color);
  border-radius: 6px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-classification-tag:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.breadcrumb-settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 8px;
  padding: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.breadcrumb-settings-btn:hover {
  background: var(--bg-primary);
  border-color: var(--accent-color);
  color: var(--accent-color);
}
