:root {
  --brand:   #009cde;
  --brand-dk:#0077b6;
  --corp:    #0d2137;
  --border:  #e5e7eb;
  --muted:   #6b7280;
  --radius:  12px;
}

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

body {
  font-family: system-ui, Arial, sans-serif;
  font-size: 15px;
  background: #f0f4f8;
  color: #111;
  min-height: 100vh;
}

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--corp);
}
.login-box {
  background: #fff;
  border-radius: 20px;
  padding: 36px 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 12px 48px rgba(0,0,0,.25);
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo img { height: 44px; }
.login-logo .app-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.login-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--corp);
  margin-bottom: 20px;
  text-align: center;
}

/* ── Form elements ───────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.lbl {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 6px;
}
input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,156,222,.15);
}
input[readonly] { background: #f8fafc; color: var(--muted); cursor: default; }
textarea { resize: none; min-height: 100px; line-height: 1.5; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

.req { color: #dc2626; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background .15s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--brand-dk); }
.btn-outline {
  display: block;
  width: 100%;
  padding: 13px;
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--brand);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .15s;
}
.btn-outline:hover { background: #f0f9ff; }

/* ── Alert / Flash ───────────────────────────────────────────────────────── */
.alert {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.alert-error   { background: #fef3cd; border: 1px solid #fcd34d; color: #78350f; }
.alert-success { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; }

/* ── App shell ───────────────────────────────────────────────────────────── */
.topbar {
  background: var(--corp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
}
.topbar-user { font-size: 12px; color: #93c5fd; }
.btn-logout {
  font-size: 12px;
  color: #93c5fd;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0 6px 12px;
  font-weight: 600;
}

.content { padding: 16px; max-width: 680px; margin: 0 auto; }

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--corp);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 20px 0 12px;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

/* ── Equipo rows ─────────────────────────────────────────────────────────── */
.eq-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fafbfd;
  position: relative;
}
.eq-row-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
}
.eq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.eq-span { grid-column: span 2; }
.btn-remove-eq {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #dc2626;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}
.btn-add-eq {
  width: 100%;
  padding: 12px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  background: none;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}
.btn-add-eq:hover { background: #f0f9ff; border-color: var(--brand); }

/* ── Success screen ──────────────────────────────────────────────────────── */
.success-wrap {
  min-height: calc(100vh - 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
}
.success-icon { font-size: 64px; margin-bottom: 16px; }
.success-title { font-size: 22px; font-weight: 800; color: var(--corp); margin-bottom: 8px; }
.success-sub { font-size: 14px; color: var(--muted); margin-bottom: 32px; line-height: 1.5; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
  .eq-grid { grid-template-columns: 1fr; }
  .eq-span { grid-column: span 1; }
}
