@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #f7f7f8;
  --card: #ffffff;
  --accent: #d7263d;
  --accent-2: #f45d48;
  --text: #0e0e11;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --ink: #0b0b0d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(215, 38, 61, 0.12), transparent 25%),
    radial-gradient(circle at 80% 0%, rgba(244, 93, 72, 0.08), transparent 30%),
    radial-gradient(circle at 70% 80%, rgba(0, 0, 0, 0.05), transparent 40%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: var(--ink);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: #ffffff;
}

.brand h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.4px;
  color: #ffffff;
}

.pill {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e5e7eb;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.container {
  width: min(1200px, 92vw);
  margin: 40px auto 80px;
}

.grid {
  display: grid;
  gap: 20px;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.4;
}

.hero {
  margin-bottom: 26px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(215, 38, 61, 0.1), rgba(255, 255, 255, 0.9), rgba(0, 0, 0, 0.03));
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
}

.hero h2 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(215, 38, 61, 0.1);
  color: #7f1d1d;
  border-radius: 12px;
  border: 1px solid rgba(215, 38, 61, 0.3);
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

button,
.btn {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn.secondary {
  background: var(--ink);
  color: #ffffff;
  border: 1px solid #111118;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

form {
  display: grid;
  gap: 12px;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #e5e7eb;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f9fafb;
  color: var(--text);
  font-size: 0.95rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 1px solid var(--accent);
}

.tab-bar {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.tab {
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
}

.tab.active {
  background: var(--accent);
  color: #fff;
}

.hidden {
  display: none !important;
}

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

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

.status {
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status.validado {
  background: rgba(29, 185, 84, 0.12);
  color: #166534;
  border: 1px solid rgba(29, 185, 84, 0.25);
}

.status.rechazado {
  background: rgba(244, 67, 54, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(244, 67, 54, 0.25);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip {
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
}

.footer {
  margin: 40px auto;
  text-align: center;
  color: var(--muted);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: min(560px, 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

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

.modal-body {
  padding: 18px 20px 22px;
}

.close-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 120;
}

.toast {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 220px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.2s ease;
  font-weight: 600;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: rgba(29, 185, 84, 0.3);
}

.toast.error {
  border-color: rgba(244, 67, 54, 0.3);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .brand h1 {
    font-size: 1rem;
  }
}
