* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
}

/* ---------- Login ---------- */

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: #1e293b;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.login-card h1 {
  margin: 0 0 4px;
  font-size: 22px;
  color: #f8fafc;
}

.login-card p.subtitle {
  margin: 0 0 24px;
  color: #94a3b8;
  font-size: 14px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #cbd5e1;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f8fafc;
  font-size: 14px;
}

.field input:focus {
  outline: none;
  border-color: #38bdf8;
}

.btn {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: #38bdf8;
  color: #0f172a;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.btn:hover {
  background: #0ea5e9;
}

.error-message {
  background: #7f1d1d;
  color: #fecaca;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ---------- Home ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.topbar h1 {
  font-size: 18px;
  margin: 0;
  color: #f8fafc;
}

.topbar form {
  margin: 0;
}

.btn-secondary {
  background: transparent;
  color: #f87171;
  border: 1px solid #7f1d1d;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.btn-secondary:hover {
  background: #7f1d1d;
  color: #fecaca;
}

.content {
  padding: 24px;
  max-width: 900px;
  margin: 0 auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #1e293b;
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid #334155;
}

th {
  color: #94a3b8;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-yes {
  background: #14532d;
  color: #86efac;
}

.badge-no {
  background: #334155;
  color: #94a3b8;
}

.btn-small {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: #38bdf8;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-small:hover {
  background: #0ea5e9;
}

.empty-state {
  padding: 40px;
  text-align: center;
  color: #94a3b8;
}

/* ---------- Administración de videos ---------- */

.back-link {
  color: #94a3b8;
  text-decoration: none;
  margin-right: 8px;
  font-size: 16px;
}

.back-link:hover {
  color: #f8fafc;
}

.card {
  background: #1e293b;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.card h2 {
  margin: 0 0 16px;
  font-size: 15px;
  color: #f8fafc;
}

.video-form .field {
  margin-bottom: 14px;
}

.video-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f8fafc;
  font-size: 14px;
}

.video-form .btn {
  width: auto;
  padding: 10px 20px;
}

.video-count-link {
  color: #38bdf8;
  font-weight: 600;
  text-decoration: none;
}

.video-count-link:hover {
  text-decoration: underline;
}

.url-cell {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
  font-size: 13px;
}

.actions-cell {
  display: flex;
  gap: 8px;
  align-items: center;
}

.actions-cell form {
  margin: 0;
}

.btn-danger {
  background: #7f1d1d;
  color: #fecaca;
}

.btn-danger:hover {
  background: #991b1b;
}
