/* Sistema visual alineado con portal / ejemplo: slate + teal */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #475569;
  --muted: #64748b;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-soft: #ccfbf1;
  --accent-muted: #f0fdfa;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --ok-border: #a7f3d0;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.5rem;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* —— Header staff / público —— */
header.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: var(--shadow);
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.app-header__brand:hover {
  text-decoration: none;
  color: var(--accent-hover);
}

.app-header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
}

.app-header__tagline {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0.02em;
}

nav.hstack a,
nav.hstack .nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-right: 0.25rem;
}
nav.hstack a:hover {
  background: var(--surface-muted);
  color: var(--text);
  text-decoration: none;
}

nav.hstack a.nav-link--primary {
  background: var(--accent);
  color: #fff;
}
nav.hstack a.nav-link--primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* —— Main —— */
main.main-area {
  padding: 1.25rem 1rem 2rem;
  max-width: 1040px;
  margin: 0 auto;
}

.row select,
.row input[type="time"] {
  max-width: none;
  width: 100%;
}

main.main-area--landing {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* —— Cards & layout —— */
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

h1,
h2,
h3 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  max-width: 420px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  font-size: 0.95rem;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
  background: var(--surface);
}

textarea {
  min-height: 90px;
  max-width: 100%;
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}
button:hover,
.btn:hover {
  border-color: #cbd5e1;
  color: var(--text);
  background: var(--surface-muted);
}

button.primary,
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.35);
}
button.primary:hover,
.btn.primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn.danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: #991b1b;
}
.btn.danger:hover {
  background: #fee2e2;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}
.flash.success {
  border-color: var(--ok-border);
  background: var(--ok-bg);
  color: #065f46;
}
.flash.danger {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: #991b1b;
}
.flash.warning {
  border-color: #fde68a;
  background: var(--warn-bg);
  color: #92400e;
}
.flash.info {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-secondary);
}

.hstack {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.error {
  color: #b91c1c;
  font-size: 0.875rem;
}

code {
  background: var(--surface-muted);
  padding: 0.15rem 0.4rem;
  border-radius: 0.35rem;
  font-size: 0.85em;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 1.25rem 0;
}

/* —— Landing —— */
.landing {
  overflow: hidden;
}

.landing__hero {
  background: linear-gradient(120deg, #0d9488 0%, #14b8a6 55%, #2dd4bf 100%);
  color: #fff;
  padding: 3rem 1.25rem 3.5rem;
  position: relative;
}

.landing__hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.landing__hero h1 {
  color: #fff;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.landing__hero p {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 36rem;
}

.landing__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.landing__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}
.landing__btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.landing__btn--light {
  background: #fff;
  color: var(--accent);
  box-shadow: var(--shadow-md);
}
.landing__btn--light:hover {
  background: #f0fdfa;
  color: var(--accent-hover);
}

.landing__btn--ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.landing__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.landing__btn--outline {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.landing__btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
}

.landing__section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.landing__section h2 {
  text-align: center;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.landing__section > p.sub {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 2rem;
  max-width: 32rem;
}

.landing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.landing__feature {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.landing__feature:hover {
  border-color: #99f6e4;
  box-shadow: var(--shadow-md);
}

.landing__feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-lg);
  background: var(--accent-muted);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.landing__feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.landing__feature p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.landing__strip {
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  text-align: center;
}

.landing__strip-inner {
  max-width: 640px;
  margin: 0 auto;
}

.landing__strip h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.landing__strip p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

@media (max-width: 600px) {
  header.app-header {
    align-items: flex-start;
  }
  nav.hstack {
    width: 100%;
  }
}
