:root {
  color-scheme: normal;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5fbfd;
  color: #1f2937;
  --brand-carbon: #2b2b2b;
  --brand-teal: #22b6cf;
  --brand-violet: #6b4dce;
  --brand-blue: #1f4ed8;
  --brand-green: #22b673;
  --brand-gold: #d09d2c;
  --neutral-dark: #16202a;
  --neutral-medium: #475569;
  --neutral-light: #f1f5f9;
  --brand-soft: #eef9fb;
  --brand-muted: #c7d2e0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding: 28px 28px 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--brand-carbon) 0%, var(--brand-carbon) 30%, var(--brand-teal) 100%);
  color: white;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 420px;
}

.hero-logo {
  max-width: 260px;
  width: 100%;
  height: auto;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  padding: 12px;
  box-shadow: 0 20px 40px rgba(12, 22, 60, 0.18);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 2.8vw, 3rem);
}

.hero p {
  margin: 0;
  max-width: 720px;
  line-height: 1.7;
}

.status {
  min-width: 200px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255,255,255,.18);
  font-weight: 600;
  text-align: center;
}

main {
  display: grid;
  gap: 24px;
}

.alerts {
  width: 100%;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255,255,255,0.2);
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.24);
}

.session-note {
  margin: 0;
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
}

.session-status {
  margin: 0;
  color: rgba(255,255,255,0.95);
  font-size: 0.95rem;
  font-weight: 600;
}

#session-panel form {
  display: grid;
  gap: 16px;
}

.disabled-panel {
  opacity: 0.65;
  pointer-events: none;
}

.row-ultimo {
  background: rgba(208, 157, 44, 0.08);
}

.row-sin-stock {
  background: rgba(255, 77, 79, 0.1);
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
  align-items: end;
}

.filter-label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: #1f2937;
}

.clear-button {
  padding: 12px 16px;
  border: 1px solid rgba(34, 182, 207, 0.24);
  background: white;
  color: var(--brand-deep);
  font-weight: 700;
  border-radius: 14px;
  width: fit-content;
}

.clear-button:hover {
  background: var(--brand-soft);
}

.panel {
  padding: 24px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

#forms-panel {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.form-card {
  display: grid;
  gap: 18px;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: #1f2937;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d2d6dc;
  background: #f8fafc;
  font: inherit;
}

textarea {
  resize: vertical;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  background: var(--brand-teal);
  color: white;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--brand-blue);
}

.message {
  min-height: 74px;
  padding: 18px;
  border-radius: 18px;
  background: var(--brand-soft);
  color: var(--neutral-dark);
  line-height: 1.7;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

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

th {
  background: var(--brand-soft);
  color: #111827;
  font-weight: 700;
}

tbody tr:hover {
  background: #f8fafc;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.badge.disponible {
  color: var(--brand-teal);
  background: rgba(34, 182, 207, 0.14);
}

.badge.ultimo {
  color: var(--brand-gold);
  background: rgba(208, 157, 44, 0.14);
}

.badge.sin-stock {
  color: var(--neutral-dark);
  background: rgba(43, 43, 43, 0.08);
}

@media (max-width: 720px) {
  .hero {
    padding: 20px;
  }
}
