/* Base */
:root {
  --bg: #0b0c10;
  --panel: #111827;
  --panel-border: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

/* Gradient fade below header to prevent content clash */
.app-header::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  background: linear-gradient(to bottom, rgba(20, 20, 24, 0.8) 0%, rgba(20, 20, 24, 0.4) 50%, transparent 100%);
  pointer-events: none;
  z-index: 99;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.logo-container:hover {
  opacity: 0.8;
}

.logo-icon {
  height: 44px;
  width: auto;
  object-fit: contain;
  color: var(--accent);
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px;
}

.user-name {
  color: var(--muted);
  font-size: 14px;
}

/* Settings dropdown */
.settings-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  overflow: hidden;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.dropdown-item:hover {
  background: rgba(59, 130, 246, 0.1);
}

.btn-sm {
  height: 36px;
  font-size: 14px;
  padding: 0 14px;
}

main {
  width: 100%;
  padding: 16px;
  margin-top: 60px; /* Account for fixed header */
}

/* Cards */
.card {
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 24px;
}

/* Hero search page */
.hero {
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  font-size: 36px;
  letter-spacing: 0.2px;
  margin: 0 0 8px 0;
}

.external-search-title {
  font-size: 36px;
  letter-spacing: 0.2px;
  margin: 0 0 24px 0;
  line-height: 1.2;
  text-align: left;
}

/* Search row */
.search-row {
  display: grid;
  grid-template-columns: 5fr 1fr auto;
  gap: 12px;
  align-items: center;
}

/* When upload button is hidden, adjust grid layout */
#btn-upload.hidden {
  display: none;
}

.search-row:has(#btn-upload.hidden) {
  grid-template-columns: 5fr 1fr;
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: #0f172a;
  color: var(--text);
  font-size: 16px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

/* Buttons */
.btn {
  height: 48px;
  padding: 0 26px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: #0f172a;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

.btn-primary {
  background: var(--accent);
  border: none;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.upload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.upload-form .row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.upload-form input[type="text"],
.upload-form input:not([type]),
.upload-form input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: #0f172a;
  color: var(--text);
  min-width: 220px;
}

.results {
  list-style: none;
  margin: 8px 0 0 0;
  padding: 0;
  border-top: 1px solid var(--panel-border);
}
.results li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--panel-border);
}
.results .meta {
  font-size: 12px;
  color: var(--muted);
}
.results a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 600;
}
.results a:hover { text-decoration: underline; }

.hidden { display: none; }

/* New layout styles */
.center-wrap {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.center-wrap .card {
  width: 100%;
  max-width: 500px;
}

.search-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#results-view.hidden,
#search-view.hidden { display: none; }

#results-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 60px;
}

/* Container for toolbar and results with fixed max-width */
.results-container {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Load More Button Container */
.load-more-container {
  display: flex;
  justify-content: center;
  padding: 32px 12px;
}

.load-more-container.hidden {
  display: none;
}

#load-more-btn {
  min-width: 200px;
}

/* Results container - fixed 3-column layout */
.results-list {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  box-sizing: border-box;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
  .results-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .results-list {
    grid-template-columns: 1fr;
  }
}

/* Card */
.result-card {
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: clamp(10px, 3vw, 14px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  row-gap: 8px;
  transition: transform 120ms ease, border-color 120ms ease;
  min-width: 0; /* Prevent flex/grid items from overflowing */
  box-sizing: border-box;
  position: relative; /* For absolute positioning of delete button */
}

.result-card:hover {
  transform: translateY(-2px);
  border-color: #4a4a4a;
}

/* Header line: Manufacturer — Model */
.result-title {
  font-weight: 600;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;       /* clamp to two lines */
  line-clamp: 2;               /* standard property */
  -webkit-box-orient: vertical;
  word-break: break-word;
  min-width: 0;
}

/* Subtle meta row (filetype badge, size if you later add it) */
.result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #bdbdbd;
}

/* Filetype badge */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #2e2e2e;
  background: #1a1a1a;
  letter-spacing: 0.02em;
}

/* Action row (download button) */
.result-actions {
  display: flex;
  justify-content: flex-start;
}

.result-actions .btn {
  display: inline-block;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  padding: clamp(6px, 2vw, 8px) clamp(8px, 2.5vw, 12px);
  border-radius: 6px;
  border: 1px solid #2f4366;
  background: #0f1a2c;
  color: #9ec3ff;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
  white-space: nowrap;
  min-width: 0;
}

.result-actions .btn:hover {
  background: #14233a;
  border-color: #3a5686;
}


.pager { display: flex; align-items: center; gap: 10px; }

/* Ensure back button is visible and styled */
#btn-back {
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--panel-border);
}

#btn-back:hover {
  background: var(--panel-border);
}

.no-results {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  font-style: italic;
}

/* File list within a card */
.file-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;           /* prevent overly tall cards */
  overflow: auto;              /* scroll within the card if many files */
}

.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px dashed #2a2a2a;
}

.file-list li:first-child {
  border-top: none;
}

/* Truncated by default */
.file-name {
  font-size: 0.9rem;
  color: #cfcfcf;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.file-name.expanded {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.file-list li.expanded {
  align-items: flex-start;
}

/* Optional: subtle underline on hover to hint interactivity */
.file-name:hover {
  text-decoration: underline;
}

/* Small download chip showing file type */
.chip {
  display: inline-block;
  font-size: 0.78rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #2f4366;
  background: #14233a;
  color: #a8c8ff;
  text-decoration: none;
  white-space: nowrap;
}

.chip:hover {
  background: #1c3359;
  border-color: #436b9f;
}

/* External search result pills */
.file-pill.external-pill {
  display: inline-block;
  font-size: 0.8rem;
  padding: 2px 12px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: #1e3a5f;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: background 120ms ease, transform 80ms ease;
}

.file-pill.external-pill:hover {
  background: var(--accent);
  transform: scale(1.03);
}


/* Responsive */
@media (max-width: 680px) {
  .search-row {
    grid-template-columns: 1fr;
  }
  .btn, .search-input { height: 44px; }
  
  .pager {
    justify-content: center;
  }
  
  .search-form {
    flex-direction: column;
  }
  
  .results-list {
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    padding: 8px;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .results-list {
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    padding: 6px;
    gap: 6px;
  }
  
  .header-left {
    gap: 8px;
  }
  
  #btn-back-header {
    padding: 0 10px;
    font-size: 13px;
  }
}

@media (max-width: 400px) {
  .results-list {
    grid-template-columns: 1fr; /* Single column on very small screens */
    gap: 8px;
  }
}

/* Autocomplete Styles */
.autocomplete-container {
  position: relative;
  min-width: 220px;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  margin: 0;
  padding: 0;
  list-style: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.autocomplete-dropdown.hidden {
  display: none;
}

.autocomplete-dropdown li {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--panel-border);
  color: var(--text);
}

.autocomplete-dropdown li:last-child {
  border-bottom: none;
}

.autocomplete-dropdown li:hover,
.autocomplete-dropdown li.selected {
  background: var(--accent);
  color: white;
}

.autocomplete-dropdown li.selected {
  background: var(--accent-hover);
}

/* External Search Styles */
.external-search-container {
  max-width: 600px;
  margin: 40px auto;
  padding: 20px;
  display: block; /* Override grid layout */
  grid-column: 1 / -1; /* Span all columns if in grid */
}

.no-results-message {
  text-align: center;
  margin-bottom: 32px;
  padding: 24px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
}

.no-results-message h2 {
  margin: 0 0 8px 0;
  color: var(--text);
  font-size: 24px;
}

.no-results-message p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.external-search-form {
  border-radius: 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.external-search-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: center;
}

.external-search-row input[type="text"] {
  height: 48px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: #0f172a;
  color: var(--text);
  font-size: 16px;
  min-width: 0;
}

.external-search-row button {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row input[type="text"] {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: #0f172a;
  color: var(--text);
  font-size: 16px;
}

.form-row.checkbox-row {
  flex-direction: row;
  align-items: center;
  gap: 0;
}

.checkbox-row .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin: 0;
  font-weight: normal;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

.checkbox-label {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.checkbox-group {
  display: flex;
  gap: 20px;
  padding: 8px 0;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.search-status {
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
}

.search-status.loading {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.search-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid #ef4444;
}

/* External Results Styles */
.external-results-container {
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.external-results-banner {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(239, 68, 68, 0.15));
  border: 2px solid rgba(234, 179, 8, 0.5);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.banner-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.banner-content h3 {
  margin: 0 0 8px 0;
  color: #fbbf24;
  font-size: 18px;
}

.banner-content p {
  margin: 4px 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.cache-notice {
  color: #10b981 !important;
  font-size: 13px !important;
}

.quota-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.search-meta {
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--muted);
}

.search-meta strong {
  color: var(--text);
  margin-right: 8px;
}

.external-results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.external-result-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s, border-color 0.2s;
}

.external-result-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

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

.result-title {
  margin: 0;
  font-size: 18px;
  color: var(--text);
  flex: 1;
  line-height: 1.4;
}

.file-type-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.file-type-badge.dwg {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid #22c55e;
}

.file-type-badge.dxf {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid #3b82f6;
}

.file-type-badge.pdf {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

.file-type-badge.unknown {
  background: rgba(156, 163, 175, 0.2);
  color: var(--muted);
  border: 1px solid var(--muted);
}

.result-snippet {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.result-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.result-domain {
  color: var(--muted);
  font-size: 13px;
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.external-icon {
  margin-left: 4px;
  font-size: 12px;
}

.no-external-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  grid-column: 1 / -1;
}

.external-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding-top: 24px;
  grid-column: 1 / -1;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .external-results-banner {
    flex-direction: column;
  }
  
  .result-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .result-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .external-actions {
    flex-direction: column;
  }
  
  .external-actions .btn {
    width: 100%;
  }
}

/* =========================================
   Login Modal
   ========================================= */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  width: 90%;
  max-width: 440px;
  padding: 0;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.login-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.form-group input {
  height: 48px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: #0f172a;
  color: var(--text);
  font-size: 15px;
  transition: border 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.error-message {
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 14px;
}

.error-message.hidden {
  display: none;
}

.btn-full {
  width: 100%;
  height: 48px;
  margin-top: 8px;
}

/* ============================================
   Admin Controls
   ============================================ */

/* Delete button in top-right corner of card */
.delete-card-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s ease;
  padding: 0;
  z-index: 10;
  opacity: 0.7;
}

.delete-card-btn:hover {
  opacity: 1;
}

/* Add file inline button */
.add-file-inline-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s ease;
  padding: 0;
  margin-top: 4px;
  opacity: 0.7;
}

.add-file-inline-btn:hover {
  opacity: 1;
}

/* Category line on admin cards */
.category {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
  margin-bottom: 8px;
}

/* Wrapper for file pill with delete button */
.file-pill-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

/* Delete button for individual files */
.delete-file-btn {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s ease;
  padding: 0;
  opacity: 0.7;
}

.delete-file-btn:hover {
  opacity: 1;
}

/* Indicates inline-editable fields in admin mode */
.editable {
  cursor: pointer;
  text-decoration: underline dotted rgba(255,255,255,0.25);
  text-underline-offset: 2px;
  transition: all 0.15s ease;
}

.editable:hover {
  text-decoration: underline solid rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.05);
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: 4px;
}

/* Responsive adjustments for admin controls */
@media (max-width: 640px) {
  .delete-file-btn {
    width: 18px;
    height: 18px;
    font-size: 14px;
  }
  
  .delete-card-btn {
    width: 22px;
    height: 22px;
    font-size: 18px;
  }
  
  .add-file-inline-btn {
    width: 26px;
    height: 26px;
    font-size: 18px;
  }
}
