/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --background: #fff;
  --accent: #e53e3e;
  --border: #e5e5e5;
  --code-bg: #f7f7f7;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background);
  margin: 0;
  padding: 0;
  font-size: 18px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

@media (max-width: 768px) {
  .container {
    max-width: 680px;
    padding: 1rem;
  }
}

nav {
  padding: 1rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.nav-brand {
  font-weight: 600;
  font-size: 1.1rem;
}

.nav-brand a {
  color: var(--text-primary);
  text-decoration: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  gap: 0.25rem;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-section {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
}

nav a:hover {
  color: var(--accent);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  margin: 2rem 0 1rem;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
  margin: 1rem 0;
  color: var(--text-primary);
}

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

a:hover {
  text-decoration: underline;
}

code {
  background-color: var(--code-bg);
  padding: 0.125rem 0.25rem;
  border-radius: 3px;
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 0.875em;
}

pre {
  background-color: var(--code-bg);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1rem 0;
}

pre code {
  background: none;
  padding: 0;
}

form {
  margin: 1.5rem 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

button,
input[type="submit"] {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 0.875rem 1.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
}

button:hover,
input[type="submit"]:hover {
  background-color: #d53030;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--text-primary);
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.875rem;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Home page styles */
.hero {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.accent {
  color: var(--accent);
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-features {
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.button {
  display: inline-block;
  background-color: var(--accent);
  color: white;
  padding: 0.875rem 1.75rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
  transition: background-color 0.2s;
}

.button:hover {
  background-color: #d53030;
  color: white;
  text-decoration: none;
}

.button.secondary {
  background-color: transparent;
  border: 2px solid var(--text-primary);
  color: var(--text-primary);
}

.button.secondary:hover {
  background-color: var(--text-primary);
  color: white;
}

.code-example {
  background-color: var(--code-bg);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.code-example pre {
  background: none;
  margin: 0;
  color: var(--text-primary);
}

.features-section,
.use-cases-section,
.steps-section {
  text-align: center;
  padding: 1rem 0;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card,
.use-case {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.feature-card h3,
.use-case h3 {
  margin-top: 0;
  color: var(--text-primary);
}

.use-cases-section {
  background-color: #f8f9fa;
  margin: 3rem 0;
  padding: 3rem 1rem;
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.steps {
  max-width: 600px;
  margin: 2rem auto;
  text-align: left;
}

.step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.step-number {
  background-color: var(--accent);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.step-content h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.step-content p {
  margin: 0;
  color: var(--text-secondary);
}

.cta-buttons {
  text-align: center;
  margin: 2rem 0;
}

.final-cta {
  background-color: var(--accent);
  color: white;
  text-align: center;
  padding: 3rem 1rem;
  margin: 3rem 0 -2rem 0;
}

.final-cta h2 {
  color: white;
  margin-bottom: 1rem;
}

.final-cta p {
  color: white;
  margin-bottom: 2rem;
}

.final-cta .button {
  background-color: white;
  color: var(--accent);
}

.final-cta .button:hover {
  background-color: #f0f0f0;
}

.final-cta .button.secondary {
  background-color: transparent;
  border: 2px solid white;
  color: white;
}

.final-cta .button.secondary:hover {
  background-color: white;
  color: var(--accent);
}

.features-note {
  color: rgba(255, 255, 255, 0.8);
  margin-top: 1.5rem;
  margin-bottom: 0;
}

/* Why page styles */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.comparison-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: left;
}

.comparison-item h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.migration-section {
  text-align: center;
  padding: 1rem 0;
  background-color: #f9f9f9;
}

.migration-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.migration-step {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: left;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.migration-step h3 {
  margin-top: 0;
  color: var(--accent);
}

.comparison-section {
  padding: 1rem 0;
  text-align: center;
}

.comparison-table {
  max-width: 800px;
  margin: 2rem auto;
  overflow-x: auto;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  background-color: var(--code-bg);
  font-weight: 600;
  color: var(--text-primary);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover {
  background-color: #f9f9f9;
}

@media (max-width: 768px) {
  /* Navigation mobile */
  nav {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 1rem;
    margin-top: 1rem;
    flex-direction: column;
    gap: 1rem;
    display: none;
    z-index: 1000;
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-section {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
  }
  
  .nav-section:not(:last-child) {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
  }
  
  nav a {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }
  
  nav a:hover {
    background-color: #f5f5f5;
  }
  
  /* Hero mobile */
  .hero {
    padding: 1rem 0;
    margin: 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  
  /* Grids mobile */
  .features-grid,
  .use-cases-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Migration flow mobile */
  .migration-flow {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Code example mobile */
  .code-example {
    margin-left: 0;
    margin-right: 0;
    border-radius: 8px;
    font-size: 0.9rem;
  }
  
  /* Table mobile */
  .comparison-table {
    margin-left: 0;
    margin-right: 0;
    overflow-x: auto;
  }
  
  .comparison-table table {
    min-width: 500px;
    border-radius: 8px;
  }
  
  .button {
    display: block;
    margin-bottom: 1rem;
    text-align: center;
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .container {
    padding: 0.5rem;
  }
  
  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .nav-left,
  .nav-right {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .feature-card,
  .comparison-item,
  .migration-step {
    padding: 1rem;
  }
  
  .code-example {
    padding: 1rem;
    font-size: 0.8rem;
  }
}

/* Documentation page styles */
.docs-header {
  text-align: center;
  margin-bottom: 3rem;
}

.docs-subtitle {
  color: var(--text-secondary);
  font-size: 1.25rem;
  margin-bottom: 0;
}

.docs-toc {
  margin-bottom: 4rem;
}

.docs-toc h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.toc-item {
  background: white;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-decoration: none;
  transition: all 0.2s ease;
  text-align: center;
}

.toc-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  transform: translateY(-2px);
}

.toc-item h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1.25rem;
}

.toc-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.toc-item:hover h3 {
  color: var(--accent);
}

.docs-content {
  max-width: 1000px;
  margin: 0 auto;
}

.docs-content h2 {
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

.docs-content section {
  margin-bottom: 4rem;
}

/* Remove Bootstrap classes that don't exist in our system */
.mb-5 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 1.5rem; }

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card h5, .card h6 {
  margin-top: 0;
  color: var(--text-primary);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  color: white;
  margin-right: 0.5rem;
}

.badge.bg-primary { background-color: #0d6efd; }
.badge.bg-info { background-color: #0dcaf0; }
.badge.bg-success { background-color: #198754; }
.badge.bg-warning { background-color: #ffc107; color: #000; }
.badge.bg-danger { background-color: #dc3545; }

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.table th,
.table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.table th {
  font-weight: 600;
  color: var(--text-primary);
  background-color: #f8f9fa;
}

.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 6px;
  border-left: 4px solid;
}

.alert.alert-info {
  background-color: #d1ecf1;
  border-left-color: #0dcaf0;
  color: #055160;
}

.alert.alert-warning {
  background-color: #fff3cd;
  border-left-color: #ffc107;
  color: #664d03;
}

.alert.alert-danger {
  background-color: #f8d7da;
  border-left-color: #dc3545;
  color: #721c24;
}

@media (max-width: 768px) {
  .toc-grid {
    grid-template-columns: 1fr;
  }
  
  .docs-content {
    padding: 0 1rem;
  }
  
  .toc-item {
    padding: 1.5rem;
  }
}

/* Page layout styles */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.page-title h1 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.page-description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.sites-actions {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.sites-stats {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.button.primary {
  background-color: var(--accent);
  color: white;
}

.button.primary:hover {
  background-color: #d53030;
}

.button.small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Sites grid layout */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.site-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-color: #ddd;
  transform: translateY(-2px);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 1rem;
}

.site-title {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.site-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-actions {
  flex-shrink: 0;
}

/* Site statistics */
.site-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* API Key section */
.api-key-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #e9ecef;
}

.api-key-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.api-key-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.api-key {
  flex: 1;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.75rem;
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.copy-btn {
  background: white;
  color: var(--text-primary);
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
}

.copy-btn:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

/* Enhanced empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  margin: 2rem 0;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-state h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive design */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
  
  .sites-actions {
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
  }
  
  .sites-stats {
    justify-content: space-around;
    gap: 1rem;
  }
  
  .stat-item {
    min-width: 0;
    flex: 1;
  }
  
  .stat-number {
    font-size: 1.25rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  .sites-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .site-card {
    padding: 1.5rem;
  }
  
  .site-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .site-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: stretch;
  }
  
  .site-actions .button {
    flex: 1;
    text-align: center;
    font-size: 0.875rem;
    padding: 0.5rem;
  }
  
  .site-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
  
  .stat-card {
    padding: 0.75rem 0.5rem;
  }
  
  .stat-card .stat-number {
    font-size: 1.1rem;
  }
  
  .stat-card .stat-label {
    font-size: 0.75rem;
  }
  
  .api-section {
    padding: 1rem;
  }
  
  .api-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }
  
  .api-actions {
    display: flex;
    gap: 0.5rem;
  }
  
  .api-actions button {
    flex: 1;
    font-size: 0.875rem;
  }
  
  .api-key-display {
    margin-bottom: 0.75rem;
  }
  
  .api-key {
    font-size: 0.75rem;
    padding: 0.75rem 0.5rem;
    word-break: break-all;
  }
  
  .recent-files {
    margin-top: 1rem;
  }
  
  .recent-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.875rem;
  }
  
  .recent-file:last-child {
    border-bottom: none;
  }
  
  .file-name {
    font-weight: 500;
    color: var(--text-primary);
  }
  
  .file-time {
    color: var(--text-secondary);
    font-size: 0.75rem;
  }
  
  .empty-state {
    padding: 3rem 1.5rem;
  }
  
  .empty-icon {
    font-size: 3rem;
  }
  
  .getting-started-preview {
    margin-top: 2rem;
    text-align: left;
  }
  
  .feature-list {
    font-size: 0.875rem;
  }
}

/* Site form styles */
.site-form-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-form-card,
.site-info-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.form-header {
  padding: 2rem 2rem 1.5rem 2rem;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
}

.form-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.form-header h2 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
}

.form-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.site-form {
  padding: 2rem;
}

.error-container {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.error-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.error-icon {
  font-size: 1.25rem;
}

.error-header h4 {
  margin: 0;
  color: #c53030;
  font-size: 0.95rem;
  font-weight: 600;
}

.error-list {
  margin: 0;
  padding-left: 1.5rem;
  color: #c53030;
}

.error-list li {
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.required {
  color: var(--accent);
  margin-left: 0.25rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

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

.form-help {
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f0f0f0;
}

.button.large {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
}

.button.secondary.large {
  color: var(--text-secondary);
}

/* Info card styles */
.info-header {
  padding: 2rem 2rem 1.5rem 2rem;
  border-bottom: 1px solid #f0f0f0;
}

.info-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
}

.info-steps {
  padding: 1.5rem 2rem;
}

.info-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-step:last-child {
  margin-bottom: 0;
}

.step-number {
  width: 2rem;
  height: 2rem;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.step-content h4 {
  margin: 0 0 0.25rem 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
}

.step-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

.info-features {
  padding: 1.5rem 2rem;
  background: #f8f9fa;
  border-top: 1px solid #f0f0f0;
}

.info-features h4 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.feature-icon {
  font-size: 1rem;
}

/* Responsive design for site form */
@media (max-width: 968px) {
  .site-form-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .site-form-container {
    gap: 1.5rem;
  }
  
  .form-header,
  .site-form,
  .info-header,
  .info-steps,
  .info-features {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .button.large {
    width: 100%;
    text-align: center;
  }
  
  .info-step {
    gap: 0.75rem;
  }
  
  .step-number {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .form-header {
    padding: 1.5rem 1rem 1rem 1rem;
  }
  
  .site-form,
  .info-steps,
  .info-features {
    padding: 1rem;
  }
  
  .info-header {
    padding: 1.5rem 1rem 1rem 1rem;
  }
  
  .form-icon {
    font-size: 2.5rem;
  }
  
  .form-header h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .page-header {
    gap: 1rem;
    padding-bottom: 1rem;
  }
  
  .files-actions {
    gap: 1rem;
  }
  
  .files-stats {
    gap: 0.5rem;
    padding: 0 0.5rem;
  }
  
  .stat-item {
    min-width: 80px;
  }
  
  .stat-number {
    font-size: 1.1rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
    line-height: 1.2;
  }
  
  .button.secondary.small {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    max-width: 150px;
  }
  
  .site-card {
    padding: 1rem;
  }
  
  .site-stats {
    gap: 0.5rem;
  }
  
  .stat-card {
    padding: 0.5rem 0.25rem;
  }
  
  .stat-card .stat-number {
    font-size: 1rem;
  }
  
  .stat-card .stat-label {
    font-size: 0.7rem;
  }
  
  .api-section {
    padding: 0.75rem;
  }
  
  .api-key-display {
    flex-direction: column;
    align-items: stretch;
  }
  
  .api-key {
    font-size: 0.7rem;
    padding: 0.5rem;
  }
  
  .copy-btn, .reveal-btn {
    align-self: center;
    min-width: 80px;
    font-size: 0.75rem;
    padding: 0.5rem;
  }
  
  .recent-file {
    font-size: 0.8rem;
  }
  
  .file-time {
    font-size: 0.7rem;
  }
}

/* Files index page styles */
.files-filter {
  display: flex;
  align-items: center;
}

.files-count {
  background: #f8f9fa;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.file-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  cursor: pointer;
}

.file-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-color: #ddd;
  transform: translateY(-2px);
}

/* File preview section */
.file-preview {
  position: relative;
  height: 140px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.file-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.file-icon {
  font-size: 3.5rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-icon.missing {
  opacity: 0.5;
}

.file-type-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* File content section */
.file-content {
  padding: 1.5rem;
}

.file-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.file-title-section {
  flex: 1;
  min-width: 0;
}

.file-name {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  word-break: break-word;
}

.file-quick-info {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.file-size {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.file-date {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.file-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
  align-items: center;
}

.action-btn.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.action-btn.primary:hover {
  background: #d53030;
  border-color: #d53030;
}

.action-btn.secondary {
  background: #f8f9fa;
  color: var(--text-secondary);
}

.action-btn.secondary:hover {
  background: #e9ecef;
  color: var(--text-primary);
}

.action-btn {
  background: white;
  color: var(--text-primary);
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.5rem;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}

.action-btn:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
  text-decoration: none;
}

/* File meta section */
.file-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.site-badge {
  background-color: var(--accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.folder-badge {
  background-color: #6c757d;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Compact meta section */
.file-meta-compact {
  margin-bottom: 1rem;
}

.meta-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-icon {
  font-size: 0.875rem;
}

.site-badge {
  background-color: var(--accent);
  color: white;
}

.folder-badge {
  background-color: #6c757d;
  color: white;
}

.root-badge {
  background-color: #28a745;
  color: white;
}

.user-badge {
  background-color: #17a2b8;
  color: white;
}

/* File details section */
.file-details {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.detail-value {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* File token section */
.file-token {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8f9fa;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.token-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.token-value {
  flex: 1;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.5rem;
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 0.75rem;
  color: var(--text-primary);
  word-break: break-all;
}

.copy-token-btn {
  background: white;
  color: var(--text-primary);
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  flex-shrink: 0;
}

.copy-token-btn:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

/* Responsive design for files */
@media (max-width: 768px) {
  .files-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .file-card {
    margin: 0;
  }
  
  .file-content {
    padding: 1rem;
  }
  
  .file-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }
  
  .file-title-section {
    margin-bottom: 0.5rem;
  }
  
  .file-quick-info {
    gap: 0.75rem;
    font-size: 0.8rem;
  }
  
  .file-actions {
    justify-content: center;
    gap: 0.5rem;
  }
  
  .action-btn {
    font-size: 1.25rem;
    padding: 0.75rem;
    min-width: 44px;
    min-height: 44px;
  }
  
  .meta-badges {
    gap: 0.25rem;
  }
  
  .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
  
  .file-type-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
  
  .file-meta {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .files-filter {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .file-preview {
    height: 120px;
  }
  
  .file-icon {
    font-size: 3rem;
  }
  
  .file-token {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .copy-token-btn {
    align-self: center;
    min-width: 80px;
  }
}

/* File show page styles */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  font-size: 0.9rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumb-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: #d53030;
  text-decoration: none;
}

.breadcrumb-sep {
  color: var(--text-muted);
  margin: 0 0.5rem;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

.file-show-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* File Header */
.file-show-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3rem;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.file-title-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.file-icon-large {
  font-size: 4rem;
  opacity: 0.8;
  flex-shrink: 0;
}

.file-title-info {
  flex: 1;
}

.file-title {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
}

.file-meta-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.root-badge {
  background-color: #6c757d;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.file-actions-header {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

/* Main Content Grid */
.file-show-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.preview-card,
.details-card,
.api-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.section-title {
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  padding: 1.5rem 1.5rem 0 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 1rem;
}

/* File Preview Section */
.preview-content {
  padding: 1.5rem;
}

.image-preview {
  text-align: center;
}

.preview-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-type-preview {
  text-align: center;
  padding: 2rem 1rem;
}

.file-icon-preview {
  font-size: 5rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.file-icon-preview.missing {
  opacity: 0.4;
}

.preview-description {
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0;
}

/* File Details Section */
.details-grid {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1rem;
}

.detail-date {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.content-type {
  background: #e9ecef;
  color: var(--text-primary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.file-size {
  font-weight: 700;
  color: var(--accent);
}

/* API Information Section */
.api-details {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.api-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.api-item:last-child {
  border-bottom: none;
}

.api-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.api-value {
  background: #f8f9fa;
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  word-break: break-all;
}

.token-display,
.url-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8f9fa;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.token-code,
.url-code {
  flex: 1;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.5rem;
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 0.75rem;
  color: var(--text-primary);
  word-break: break-all;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.copy-url-btn {
  background: white;
  color: var(--text-primary);
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  flex-shrink: 0;
}

.copy-url-btn:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

/* Responsive design for file show */
@media (max-width: 968px) {
  .file-show-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .api-info-section {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .file-show-header {
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
  }
  
  .file-title-section {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .file-icon-large {
    font-size: 3rem;
  }
  
  .file-title {
    font-size: 1.5rem;
  }
  
  .file-actions-header {
    justify-content: flex-end;
  }
  
  .file-show-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .breadcrumb-nav {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .file-show-header {
    padding: 1.5rem;
  }
  
  .file-title-section {
    text-align: center;
    align-items: center;
  }
  
  .file-meta-badges {
    justify-content: center;
  }
  
  .file-actions-header {
    justify-content: center;
  }
  
  .token-display,
  .url-display {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .copy-token-btn,
  .copy-url-btn {
    align-self: center;
    min-width: 100px;
  }
}

/* File table links */
.fw-medium a {
  transition: color 0.2s ease;
}

.fw-medium a:hover {
  color: var(--accent) !important;
  text-decoration: none;
}

/* Sites index improvements */
.sites-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.summary-stat {
  text-align: center;
}

.summary-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.summary-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.site-title-section {
  flex: 1;
}

.site-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.site-created,
.site-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-card {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.api-section {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.api-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.api-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.api-actions {
  display: flex;
  gap: 0.5rem;
}

.reveal-btn {
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reveal-btn:hover {
  background: #f0f0f0;
  border-color: var(--accent);
  color: var(--accent);
}

.api-key {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.85rem;
  background: white;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex: 1;
  word-break: break-all;
  display: block;
  width: 100%;
}

.endpoint-info {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.recent-files {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.recent-header {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recent-file {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: white;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.file-name {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.file-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.recent-more {
  text-align: center;
  padding: 0.5rem;
}

.view-all-link {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.view-all-link:hover {
  text-decoration: underline;
}

.button.tertiary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.button.tertiary:hover {
  background: #f0f0f0;
  color: var(--text-primary);
}

.getting-started-preview {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.getting-started-preview h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.feature-list li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* Files index improvements */
.files-actions {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.files-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  min-width: 120px;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.files-toolbar {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-section {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
}

.clear-search {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
}

.filter-section {
  display: flex;
  gap: 1rem;
}

.filter-select {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
}

.view-options {
  display: flex;
  gap: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.view-btn {
  background: white;
  border: none;
  padding: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.view-btn:hover {
  background: #f0f0f0;
}

.view-btn.active {
  background: var(--accent);
  color: white;
}

.files-container {
  position: relative;
}

/* Enhanced grid view */
.file-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: var(--accent);
}

.file-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.file-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.action-btn {
  background: #f8f9fa;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: white;
  border-color: var(--accent);
  color: var(--accent);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.meta-item {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

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

.meta-value {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.file-token-section {
  background: #f8f9fa;
  border-radius: 4px;
  padding: 0.75rem;
  margin-top: 1rem;
}

.token-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.token-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.token-value {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
  word-break: break-all;
}

/* List view styles - Enhanced desktop design */
.files-list {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.list-header {
  display: grid;
  grid-template-columns: 2.5fr 1.2fr 0.8fr 0.8fr 1fr 1.5fr;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}

.list-header div {
  display: flex;
  align-items: center;
}

.list-row {
  display: grid;
  grid-template-columns: 2.5fr 1.2fr 0.8fr 0.8fr 1fr 1.5fr;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: all 0.2s ease;
  align-items: center;
  position: relative;
}

.list-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  transition: background-color 0.2s ease;
}

.list-row:hover {
  background: #fbfcfd;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.list-row:hover::before {
  background: var(--accent);
}

.list-row:last-child {
  border-bottom: none;
}

/* Hide mobile meta grid on desktop */
.mobile-meta-grid {
  display: none;
}

/* Enhanced desktop file info styling */
.list-file-info {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.list-file-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 8px;
  flex-shrink: 0;
}

.list-thumbnail {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-type-icon {
  font-size: 1.75rem;
  opacity: 0.8;
}

.list-file-details {
  flex: 1;
  min-width: 0;
}

.list-file-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  line-height: 1.3;
  word-break: break-word;
}

.list-file-token {
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
}

/* Enhanced badge styling for desktop */
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-icon {
  font-size: 0.8rem;
}

.site-badge {
  background-color: var(--accent);
  color: white;
}

/* File metadata styling */
.list-col-type,
.list-col-size,
.list-col-date {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.list-col-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Enhanced action buttons for desktop */
.list-col-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
}

.list-action-btn {
  background: #f8f9fa;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.list-action-btn:hover {
  background: white;
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-token-btn {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.copy-token-btn:hover {
  background: #d53030;
  border-color: #d53030;
  color: white;
}

/* Large desktop responsive improvements */
@media (min-width: 1200px) {
  .files-list {
    border-radius: 16px;
  }
  
  .list-header {
    padding: 1.5rem 2rem;
    grid-template-columns: 3fr 1.3fr 0.9fr 0.9fr 1.1fr 1.7fr;
    gap: 1.5rem;
  }
  
  .list-row {
    padding: 1.5rem 2rem;
    grid-template-columns: 3fr 1.3fr 0.9fr 0.9fr 1.1fr 1.7fr;
    gap: 1.5rem;
  }
  
  .list-file-icon {
    width: 52px;
    height: 52px;
  }
  
  .list-thumbnail {
    width: 52px;
    height: 52px;
  }
  
  .file-type-icon {
    font-size: 2rem;
  }
  
  .list-file-name {
    font-size: 1rem;
  }
  
  .list-file-token {
    font-size: 0.8rem;
  }
  
  .list-col-type,
  .list-col-size {
    font-size: 0.95rem;
  }
  
  .list-action-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

/* Medium desktop responsive */
@media (min-width: 969px) and (max-width: 1199px) {
  .list-header,
  .list-row {
    grid-template-columns: 2.2fr 1.1fr 0.9fr 0.9fr 1fr 1.4fr;
    padding: 1rem 1.25rem;
  }
  
  .list-file-name {
    font-size: 0.9rem;
  }
  
  .list-action-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }
}

/* Mobile responsiveness for files */
@media (max-width: 768px) {
  /* Page header mobile improvements */
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
  }
  
  .files-actions {
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
  }
  
  .files-stats {
    justify-content: space-around;
    gap: 1rem;
    order: 1;
  }
  
  .stat-item {
    flex: 1;
    min-width: 0;
  }
  
  .stat-number {
    font-size: 1.25rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  .button.secondary.small {
    order: 2;
    align-self: center;
    width: auto;
    max-width: 200px;
  }
  
  .files-toolbar {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .search-section {
    min-width: auto;
  }
  
  .filter-section {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  /* Enhanced mobile file cards */
  .files-list {
    background: transparent;
    border: none;
  }
  
  .list-header {
    display: none;
  }
  
  .list-row {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: block;
    transition: all 0.2s ease;
  }
  
  .list-row:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    background: white;
  }
  
  .list-row:last-child {
    margin-bottom: 0;
  }
  
  /* File header section */
  .list-col-name {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .list-file-info {
    gap: 1rem;
  }
  
  .list-file-icon {
    width: 50px;
    height: 50px;
  }
  
  .list-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 6px;
  }
  
  .file-type-icon {
    font-size: 2rem;
  }
  
  .list-file-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
  }
  
  .list-file-token {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    display: inline-block;
  }
  
  /* File meta section */
  .mobile-meta-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  /* Hide desktop grid columns on mobile */
  .list-row > .list-col-site,
  .list-row > .list-col-type, 
  .list-row > .list-col-size,
  .list-row > .list-col-date {
    display: none;
  }
  
  /* Mobile-specific column styling */
  .mobile-col-site,
  .mobile-col-type,
  .mobile-col-size,
  .mobile-col-date {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    margin: 0;
  }
  
  .mobile-col-site::before {
    content: "Site";
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .mobile-col-type::before {
    content: "Type";
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .mobile-col-size::before {
    content: "Size";
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .mobile-col-date::before {
    content: "Uploaded";
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .badge {
    align-self: flex-start;
  }
  
  /* Actions section */
  .list-col-actions {
    margin-top: 0;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .list-action-btn {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.85rem;
    border-radius: 6px;
    font-weight: 500;
    min-width: 0;
  }
}

/* Admin interface styles */
.admin-nav {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.admin-nav-link {
  background: #f8f9fa;
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
}

.admin-nav-link:hover {
  background: white;
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.admin-nav-link.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.admin-nav-link.active:hover {
  background: #d53030;
  border-color: #d53030;
  color: white;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.admin-stats .stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-stats .stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.admin-stats .stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.admin-table-container {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.admin-table thead th {
  background: #f8f9fa;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  font-size: 0.9rem;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: #fbfcfd;
}

.admin-table .actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-table .actions .button {
  margin: 0;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  text-decoration: none;
}

.button.danger {
  background-color: #dc3545;
  color: white;
  border-color: #dc3545;
}

.button.danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem;
}

.pagination-link {
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.pagination-link:hover {
  background: #d53030;
  text-decoration: none;
  color: white;
}

.pagination-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.admin-details {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.detail-group {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.detail-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.detail-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.detail-group p {
  margin: 0;
  color: var(--text-primary);
  font-size: 1rem;
}

.admin-form {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

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

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.error-messages {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: #c53030;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.error-messages h4 {
  margin: 0 0 0.5rem 0;
  color: #c53030;
}

.error-messages ul {
  margin: 0;
  padding-left: 1.5rem;
}

.related-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.related-section h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.status {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status.processed {
  background: #d1ecf1;
  color: #0c5460;
}

.status.pending {
  background: #fff3cd;
  color: #856404;
}

.page-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

@media (max-width: 768px) {
  .admin-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .admin-nav-link {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  
  .admin-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .admin-table-container {
    font-size: 0.85rem;
  }
  
  .admin-table .actions {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .admin-table .actions .button {
    width: 100%;
    text-align: center;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .page-actions {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }
  
  .detail-group {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }
}
