/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0b;
  --bg-elevated: #141416;
  --bg-card: #1a1a1e;
  --bg-card-hover: #222228;
  --border: #2a2a30;
  --border-light: #333340;
  --text: #e8e8ed;
  --text-secondary: #8e8e9a;
  --text-muted: #5a5a66;
  --accent: #6c9bff;
  --accent-dim: rgba(108,155,255,0.12);
  --accent-glow: rgba(108,155,255,0.25);
  --green: #4ade80;
  --orange: #fb923c;
  --pink: #f472b6;
  --red: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 1200px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* ===== Hero ===== */
.hero {
  padding: 80px 24px 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(108,155,255,0.04) 0%, transparent 100%);
}

.hero-inner { max-width: var(--max-w); margin: 0 auto; }

.logo-icon { font-size: 1.1em; }

.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ===== Search ===== */
.search-box {
  position: relative;
  max-width: 520px;
  margin: 0 auto 20px;
}

.search-box input {
  width: 100%;
  padding: 14px 50px 14px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-box input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.search-box kbd {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: inherit;
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 600px;
  margin: 0 auto;
}

.filter-tag {
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.filter-tag:hover, .filter-tag.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Upload Bar ===== */
.upload-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px 0;
}

.upload-bar-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.upload-url-form {
  width: 100%;
  max-width: 520px;
}

.upload-url-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: center;
}

.upload-url-input-group {
  display: flex;
  gap: 8px;
}

.upload-url-input-group input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.upload-url-input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.upload-url-input-group input::placeholder {
  color: var(--text-muted);
}

.btn-generate {
  padding: 12px 24px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-generate:hover {
  opacity: 0.9;
}

.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.upload-drop-zone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s;
  width: 100%;
  max-width: 520px;
  justify-content: center;
}

.upload-drop-zone:hover,
.upload-drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-drop-zone.drag-over {
  transform: scale(1.02);
  box-shadow: 0 0 20px var(--accent-glow);
}

.upload-drop-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.upload-drop-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.upload-drop-text strong {
  font-size: 0.95rem;
  color: var(--text);
}

.upload-drop-text span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.upload-browse-link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.upload-browse-link:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ===== Skills Section ===== */
.skills-section {
  max-width: var(--max-w);
  margin: 48px auto;
  padding: 0 24px;
}

/* ===== Skill Grid ===== */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  padding: 0;
  margin: 0;
}

/* ===== Skill Card ===== */
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--pink));
  opacity: 0;
  transition: opacity 0.25s;
}

.skill-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.skill-card:hover::before { opacity: 1; }

.card-stars {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: 12px;
  font-size: 0.78rem;
  color: #facc15;
  font-weight: 600;
  white-space: nowrap;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.card-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.card-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-tag {
  padding: 3px 10px;
  background: var(--bg-elevated);
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.card-author {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Detail View ===== */
.detail-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  backdrop-filter: blur(12px);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.back-btn:hover { background: var(--bg-card-hover); border-color: var(--border-light); }
.back-btn svg { width: 16px; height: 16px; }

.detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex: 1;
}

.detail-meta .install-cmd {
  padding: 4px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.8rem;
  color: var(--green);
  cursor: pointer;
  transition: background 0.2s;
}

.detail-meta .install-cmd:hover { background: var(--bg-card-hover); }

.detail-stars {
  padding: 3px 10px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: 12px;
  font-size: 0.8rem;
  color: #facc15;
  font-weight: 600;
}

/* ===== Delete Button ===== */
.btn-delete {
  padding: 6px 14px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  margin-left: auto;
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}

/* ===== Markdown Body ===== */
.markdown-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.markdown-body h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.markdown-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.markdown-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 28px 0 12px;
}

.markdown-body h4 { font-size: 1.05rem; font-weight: 600; margin: 20px 0 8px; }

.markdown-body p { margin: 0 0 16px; }

.markdown-body ul, .markdown-body ol { margin: 0 0 16px; padding-left: 28px; }
.markdown-body li { margin: 4px 0; }

.markdown-body blockquote {
  margin: 0 0 16px;
  padding: 12px 20px;
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

.markdown-body blockquote p:last-child { margin-bottom: 0; }

.markdown-body code {
  padding: 2px 6px;
  background: var(--bg-elevated);
  border-radius: 4px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.88em;
  color: var(--accent);
}

.markdown-body pre {
  margin: 0 0 20px;
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.markdown-body pre code {
  padding: 0;
  background: none;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.7;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
}

.markdown-body th, .markdown-body td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.markdown-body th {
  background: var(--bg-elevated);
  font-weight: 600;
  font-size: 0.9rem;
}

.markdown-body td { font-size: 0.9rem; color: var(--text-secondary); }

.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.markdown-body img { max-width: 100%; border-radius: var(--radius-sm); }

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* ===== Prompts Section ===== */
.prompts-section {
  max-width: var(--max-w);
  margin: 48px auto;
  padding: 0 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.btn-add-prompt {
  padding: 10px 20px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-add-prompt:hover {
  opacity: 0.9;
}

.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* ===== Prompt Card ===== */
.prompt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.25s ease;
  position: relative;
}

.prompt-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.prompt-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.btn-prompt-delete {
  padding: 4px 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-prompt-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}

.prompt-content {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prompt-image {
  width: 100%;
  max-height: 600px;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.prompt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.prompt-tag {
  padding: 4px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-copy-prompt {
  width: 100%;
  padding: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-prompt:hover {
  background: var(--border);
  color: var(--text);
}

.prompt-title.clickable {
  cursor: pointer;
  color: var(--accent);
}

.prompt-title.clickable:hover {
  text-decoration: underline;
}

/* ===== Prompt Detail Modal Styles ===== */
.modal-box-large {
  max-width: 95%;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
}

.prompt-detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px;
  max-height: calc(85vh - 80px);
  overflow-y: auto;
}

.prompt-detail-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prompt-detail-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-section label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-input,
.detail-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.detail-input:focus,
.detail-textarea:focus {
  border-color: var(--accent);
}

.detail-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.detail-input:read-only,
.detail-textarea:read-only {
  background: var(--bg-elevated);
  opacity: 0.8;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.btn-edit-prompt,
.btn-save-prompt,
.btn-copy-prompt-detail,
.btn-delete-prompt-detail {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-edit-prompt {
  background: var(--accent);
  color: #fff;
}

.btn-edit-prompt:hover {
  opacity: 0.9;
}

.btn-save-prompt {
  background: var(--green);
  color: #000;
}

.btn-save-prompt:hover {
  opacity: 0.9;
}

.btn-copy-prompt-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-copy-prompt-detail:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

.btn-delete-prompt-detail {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
}

.btn-delete-prompt-detail:hover {
  background: rgba(239, 68, 68, 0.2);
}

.image-container {
  width: 100%;
  min-height: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-image {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  padding: 40px;
}

.placeholder-icon {
  font-size: 2.5rem;
}

@media (max-width: 768px) {
  .modal-box-large {
    margin: 16px;
    max-height: 90vh;
  }
  
  .prompt-detail-content {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  
  .detail-actions {
    flex-direction: column;
  }
  
  .btn-edit-prompt,
  .btn-save-prompt,
  .btn-copy-prompt-detail,
  .btn-delete-prompt-detail {
    width: 100%;
  }
}

/* ===== Image Upload Styles ===== */
.image-upload-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.image-upload-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s;
  min-height: 160px;
}

.image-upload-drop-zone:hover,
.image-upload-drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.image-upload-drop-zone.drag-over {
  transform: scale(1.02);
  box-shadow: 0 0 20px var(--accent-glow);
}

.image-upload-drop-zone .upload-icon {
  font-size: 2.5rem;
}

.image-upload-drop-zone span:nth-child(2) {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.image-upload-drop-zone span:nth-child(3) {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.image-preview {
  margin-top: 8px;
}

.image-preview img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.form-row .image-upload-container input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-row .image-upload-container input:focus {
  border-color: var(--accent);
}

.form-row .image-upload-container input::placeholder {
  color: var(--text-muted);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state p { font-size: 1.1rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero { padding: 48px 16px 28px; }
  .hero h1 { font-size: 1.8rem; }
  .skills-section { padding: 0 16px; }
  .prompts-section { padding: 0 16px; }
  .skill-grid { grid-template-columns: 1fr; }
  .prompts-grid { grid-template-columns: 1fr; }
  .markdown-body { padding: 24px 16px 60px; }
  .detail-nav { padding: 10px 16px; }
  .modal-box { margin: 16px; max-height: 90vh; }
  .form-row-2 { grid-template-columns: 1fr; }
  .upload-drop-zone { padding: 14px 18px; }
  .upload-drop-icon { font-size: 1.3rem; }
  .upload-bar { padding: 16px 16px 0; }
}

/* ===== Upload Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 24px;
  overflow-y: auto;
}

.modal-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 600px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover { background: var(--bg-card); color: var(--text); }

.modal-box form { padding: 20px 24px 24px; }

.form-row {
  margin-bottom: 16px;
}

.form-row label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-row label .required { color: var(--orange); }

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  border-color: var(--accent);
}

.form-row textarea { resize: vertical; min-height: 60px; }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-2 > div { margin-bottom: 0; }

/* File selected indicator */
.file-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.file-selected-name {
  flex: 1;
  color: var(--text);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-change-file {
  padding: 6px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-change-file:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

/* Form preview card */
.form-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--accent-dim);
  border: 1px solid rgba(108,155,255,0.2);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.preview-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.preview-info {
  flex: 1;
  min-width: 0;
}

.preview-name {
  font-size: 1.05rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Upload status */
.upload-status {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
  text-align: center;
}

.upload-status.success {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--green);
}

.upload-status.error {
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.3);
  color: var(--orange);
}

/* Form actions */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn-cancel {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel:hover { background: var(--bg-card-hover); color: var(--text); }

.btn-submit {
  padding: 10px 24px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-submit:hover { opacity: 0.9; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Delete Button Styles ===== */
.btn-delete-confirm {
  padding: 10px 24px;
  background: var(--red);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-delete-confirm:hover {
  opacity: 0.9;
}

.btn-delete-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
