:root {
  --bg: #0f172a;
  --card-bg: #1e293b;
  --card-border: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #38bdf8;
  --primary-hover: #0284c7;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

header {
  border-bottom: 1px solid var(--card-border);
  background-color: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

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

.input-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

input[type="text"] {
  flex: 1;
  background: #0f172a;
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus {
  border-color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #0f172a;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-warning {
  background: var(--warning);
  color: #0f172a;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

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

.btn-secondary:hover:not(:disabled) {
  background: #475569;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-pending { background: #334155; color: #cbd5e1; }
.badge-uploading { background: #1e3a8a; color: #93c5fd; }
.badge-uploaded { background: #065f46; color: #6ee7b7; }
.badge-processing { background: #78350f; color: #fde68a; }
.badge-ready { background: #15803d; color: #86efac; }
.badge-error { background: #991b1b; color: #fca5a5; }

.command-box {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
  overflow-x: auto;
}

.command-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  color: #38bdf8;
  white-space: nowrap;
}

.progress-container {
  margin: 1.5rem 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.progress-bar {
  background: #334155;
  height: 12px;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, #38bdf8, #22c55e);
  height: 100%;
  width: 0%;
  transition: width 0.4s ease;
}

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

.stat-item {
  background: #0f172a;
  border: 1px solid var(--card-border);
  padding: 1rem;
  border-radius: var(--radius);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--card-border);
}

th {
  background: #0f172a;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

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

.storage-bar-container {
  margin: 1rem 0;
}

.storage-bar {
  background: #334155;
  height: 16px;
  border-radius: 9999px;
  overflow: hidden;
}

.storage-fill {
  height: 100%;
  transition: width 0.4s ease;
}

.alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--danger);
  color: #fca5a5;
}

footer {
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
