/* ══════════════════════════════════════════
   Permutas AGE — Estilos
   Tema: Navy Dark + Coral (coherente con PlataformaFuncionarios)
   ══════════════════════════════════════════ */

:root {
  --v:  #0d1117;
  --v2: #161b27;
  --v3: #1e2a42;
  --v4: #243354;
  --accent:  #e8365d;
  --accent-h:#c8254a;
  --accent3: #00d4aa;
  --text:    #1a1a2e;
  --bg:      #f7f8fc;
  --bg2:     #eef0f8;
  --white:   #ffffff;
  --border:  #dde2f0;
  --border-dark: rgba(255,255,255,0.08);
  --shadow:  0 2px 20px rgba(13,17,23,0.08);
  --shadow-lg: 0 8px 40px rgba(13,17,23,0.18);
  --r: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
input, select, button, textarea { font-family: inherit; }

/* ══════════════════════
   LOGIN PAGE
   ══════════════════════ */
.page-login {
  min-height: 100vh;
  display: flex;
}
.login-wrap {
  display: flex;
  width: 100%;
  min-height: 100vh;
}
.login-left {
  width: 45%;
  background: linear-gradient(145deg, #0d1117 0%, #141c2f 40%, #1a2540 70%, #1e2d52 100%);
  color: white;
  padding: 60px 56px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute; top: -200px; right: -100px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,54,93,0.1) 0%, transparent 65%);
  pointer-events: none;
}
.login-left::after {
  content: '';
  position: absolute; bottom: -150px; left: -80px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,170,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.login-left-inner { position: relative; z-index: 1; max-width: 420px; }
.login-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem; color: white; display: inline-block;
  margin-bottom: 52px; letter-spacing: -0.02em;
}
.login-logo span { color: var(--accent); }
.login-left h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 400; line-height: 1.15;
  letter-spacing: -0.03em; margin-bottom: 20px;
}
.login-left h1 em { color: var(--accent); font-style: italic; }
.login-left > div > p {
  font-size: 0.95rem; color: rgba(255,255,255,0.65);
  line-height: 1.7; margin-bottom: 44px;
}
.login-steps { display: flex; flex-direction: column; gap: 20px; }
.login-step {
  display: flex; align-items: flex-start; gap: 16px;
}
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: white;
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.login-step strong { display: block; font-size: 0.9rem; color: white; margin-bottom: 2px; }
.login-step small  { font-size: 0.8rem; color: rgba(255,255,255,0.5); }

.login-right {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  background: var(--bg);
}
.login-card {
  width: 100%; max-width: 440px;
  background: var(--white);
  border-radius: 16px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 40px;
}
.login-card-head { margin-bottom: 28px; }
.login-card-head h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.8rem; color: var(--text);
  letter-spacing: -0.02em; margin-bottom: 6px;
}
.login-card-head p { font-size: 0.88rem; color: #6b7a99; }

.alert {
  padding: 12px 16px; border-radius: 8px;
  font-size: 0.85rem; margin-bottom: 20px;
  border: 1.5px solid;
}
.alert-error { background: #fff5f5; color: #c0392b; border-color: #fecaca; }

.login-form { display: flex; flex-direction: column; gap: 18px; margin-bottom: 28px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.field input {
  padding: 11px 14px; border-radius: 8px;
  border: 1.5px solid var(--border);
  font-size: 0.9rem; color: var(--text);
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,54,93,0.1);
  background: white;
}
.btn-login {
  padding: 13px; border-radius: 8px;
  background: var(--accent); color: white;
  border: none; cursor: pointer;
  font-size: 0.95rem; font-weight: 700;
  transition: all .2s; margin-top: 4px;
}
.btn-login:hover { background: var(--accent-h); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(232,54,93,0.4); }

.login-register {
  border-top: 1.5px solid var(--border); padding-top: 24px;
  display: flex; flex-direction: column; gap: 10px;
  text-align: center;
}
.login-register > p { font-size: 0.85rem; color: #6b7a99; }
.btn-register {
  display: block; padding: 12px;
  border-radius: 8px; border: 2px solid var(--v3);
  color: var(--v3); font-size: 0.88rem; font-weight: 700;
  transition: all .2s;
}
.btn-register:hover { background: var(--v3); color: white; }
.login-register small { font-size: 0.76rem; color: #9aa3b8; line-height: 1.5; }

/* ══════════════════════
   DASHBOARD NAV
   ══════════════════════ */
.dash-nav {
  background: var(--v2);
  position: sticky; top: 0; z-index: 500;
  box-shadow: 0 1px 0 var(--border-dark), 0 4px 24px rgba(0,0,0,0.3);
}
.dash-nav-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.dash-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem; color: white; letter-spacing: -0.02em;
}
.dash-logo span { color: var(--accent); }
.dash-nav-right { display: flex; align-items: center; gap: 12px; }
.dash-user { font-size: 0.82rem; color: rgba(255,255,255,0.6); }
.btn-nav-sec {
  padding: 7px 14px; border-radius: 6px;
  font-size: 0.8rem; font-weight: 700;
  color: rgba(255,255,255,0.75);
  border: 1.5px solid rgba(255,255,255,0.2);
  transition: all .2s;
}
.btn-nav-sec:hover { color: white; border-color: rgba(255,255,255,0.5); }
.btn-nav-logout {
  padding: 7px 14px; border-radius: 6px;
  font-size: 0.8rem; font-weight: 700;
  color: rgba(255,255,255,0.5);
  transition: color .2s;
}
.btn-nav-logout:hover { color: var(--accent); }

/* ══════════════════════
   DASHBOARD HEADER
   ══════════════════════ */
.dash-header {
  background: linear-gradient(135deg, var(--v) 0%, var(--v3) 100%);
  color: white; padding: 40px 28px;
}
.dash-header-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.dash-eyebrow {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.dash-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem; font-weight: 400;
  letter-spacing: -0.02em; margin-bottom: 6px;
}
.dash-header p { font-size: 0.88rem; color: rgba(255,255,255,0.6); }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 8px;
  background: var(--accent); color: white;
  font-size: 0.88rem; font-weight: 700;
  transition: all .2s; white-space: nowrap; flex-shrink: 0;
}
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(232,54,93,0.4); }

/* ══════════════════════
   FILTROS
   ══════════════════════ */
.filters-bar {
  background: var(--white);
  border-bottom: 1.5px solid var(--border);
  padding: 16px 28px;
  position: sticky; top: 58px; z-index: 400;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.filters-inner { max-width: 1280px; margin: 0 auto; }
.filters-form {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label { font-size: 0.72rem; font-weight: 700; color: #6b7a99; text-transform: uppercase; letter-spacing: 0.06em; }
.filter-group select,
.filter-group input[type="text"] {
  padding: 8px 12px; border-radius: 7px;
  border: 1.5px solid var(--border);
  font-size: 0.85rem; color: var(--text);
  background: var(--bg); outline: none;
  transition: border-color .2s;
  min-width: 160px;
}
.filter-group select:focus,
.filter-group input:focus { border-color: var(--accent); background: white; }
.filter-group--check { justify-content: flex-end; padding-bottom: 2px; }
.filter-group--check label {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.85rem; color: var(--text);
  text-transform: none; letter-spacing: 0; cursor: pointer;
}
.filter-group--check input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); }
.btn-filter {
  padding: 9px 20px; border-radius: 7px;
  background: var(--v2); color: white;
  border: none; cursor: pointer;
  font-size: 0.85rem; font-weight: 700;
  transition: background .2s;
}
.btn-filter:hover { background: var(--accent); }
.btn-filter-clear {
  padding: 9px 14px; border-radius: 7px;
  font-size: 0.82rem; color: #6b7a99;
  border: 1.5px solid var(--border);
  transition: all .2s;
}
.btn-filter-clear:hover { color: var(--accent); border-color: var(--accent); }

/* ══════════════════════
   CONTENT / GRID PLAZAS
   ══════════════════════ */
.dash-content { padding: 36px 28px 60px; }
.dash-content-inner { max-width: 1280px; margin: 0 auto; }
.dash-content-inner--narrow { max-width: 860px; }

.plazas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.plaza-card {
  background: var(--white);
  border-radius: var(--r);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.plaza-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--v3), var(--v4));
}
.plaza-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.plaza-card--own { border-color: rgba(0,212,170,0.4); }
.plaza-card--own::before { background: linear-gradient(90deg, #00d4aa, #00b894); }

.plaza-own-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--accent3); color: var(--v);
  font-size: 0.65rem; font-weight: 700;
  padding: 2px 10px; border-radius: 20px;
  letter-spacing: 0.06em; text-transform: uppercase;
}

.plaza-card-head {
  display: flex; align-items: center; justify-content: space-between;
}
.plaza-cuerpo {
  font-size: 0.78rem; font-weight: 700;
  color: var(--v3); text-transform: uppercase;
  letter-spacing: 0.06em;
}
.plaza-fecha { font-size: 0.72rem; color: #9aa3b8; }

.plaza-ruta {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg2); border-radius: 8px; padding: 12px;
}
.plaza-ruta-from, .plaza-ruta-to { flex: 1; }
.plaza-ruta-arrow { font-size: 1.1rem; color: var(--accent); flex-shrink: 0; }
.ruta-label { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #9aa3b8; display: block; margin-bottom: 3px; }
.ruta-value { font-size: 0.84rem; font-weight: 600; color: var(--text); }

.plaza-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ptag {
  font-size: 0.64rem; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
  letter-spacing: 0.04em;
  background: var(--bg2); color: #4a5568;
  border: 1px solid var(--border);
}
.ptag--tele { background: #e6faf6; color: #00856f; border-color: #a7f3d0; }

.plaza-ministerio {
  font-size: 0.82rem; color: #6b7a99; line-height: 1.4;
}
.plaza-ministerio small { opacity: 0.75; }

.btn-ver-plaza {
  margin-top: auto; padding: 10px;
  border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--v2);
  font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: all .2s; text-align: center;
}
.btn-ver-plaza:hover { background: var(--v2); color: white; border-color: var(--v2); }

/* ══════════════════════
   EMPTY STATE
   ══════════════════════ */
.empty-state {
  text-align: center; padding: 80px 24px;
}
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-family: 'DM Serif Display', serif; font-size: 1.5rem; margin-bottom: 8px; }
.empty-state p { color: #6b7a99; font-size: 0.9rem; margin-bottom: 24px; }

/* ══════════════════════
   MODAL
   ══════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 1000;
  backdrop-filter: blur(3px);
}
.modal-plaza {
  display: none; position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  width: min(680px, 95vw);
  max-height: 88vh;
  background: white; border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  flex-direction: column; overflow: hidden;
}
.modal-head {
  background: linear-gradient(135deg, var(--v), var(--v3));
  color: white; padding: 22px 28px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.modal-head h2 { font-family: 'DM Serif Display', serif; font-size: 1.2rem; font-weight: 400; }
.modal-close {
  background: none; border: none; color: rgba(255,255,255,0.6);
  font-size: 1.1rem; cursor: pointer; padding: 4px 8px;
  transition: color .2s;
}
.modal-close:hover { color: white; }
.modal-body { overflow-y: auto; padding: 28px; flex: 1; }

.modal-ruta {
  display: flex; align-items: stretch; gap: 12px;
  margin-bottom: 28px;
}
.modal-ruta-box {
  flex: 1; padding: 16px; border-radius: 10px;
}
.modal-ruta-box--from { background: #eef0f8; border: 1.5px solid var(--border); }
.modal-ruta-box--to   { background: #e6faf6; border: 1.5px solid #a7f3d0; }
.modal-ruta-arrow { display: flex; align-items: center; font-size: 1.4rem; color: var(--accent); padding: 0 4px; }
.modal-ruta-label { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #9aa3b8; margin-bottom: 4px; }
.modal-ruta-ciudad { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.modal-ruta-min { font-size: 0.82rem; color: #6b7a99; }
.modal-ruta-uni { font-size: 0.78rem; color: #9aa3b8; margin-top: 2px; }

.modal-section { margin-bottom: 24px; }
.modal-section h3 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #6b7a99; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1.5px solid var(--border); }
.modal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.modal-field {
  background: var(--bg2); border-radius: 7px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.modal-field span { font-size: 0.7rem; color: #9aa3b8; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.modal-field strong { font-size: 0.86rem; color: var(--text); }
.modal-text { font-size: 0.88rem; color: #4a5568; line-height: 1.65; background: var(--bg2); border-radius: 8px; padding: 14px; }
.modal-text--nota { border-left: 3px solid var(--accent); background: #fff5f7; }

.modal-contact { }
.modal-contact-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.btn-contact {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px;
  font-size: 0.85rem; font-weight: 700;
  transition: all .2s;
}
.btn-contact--mail { background: var(--v2); color: white; }
.btn-contact--mail:hover { background: var(--accent); }
.btn-contact--tel { background: #e6faf6; color: #00856f; border: 1.5px solid #a7f3d0; }
.btn-contact--tel:hover { background: var(--accent3); color: white; border-color: var(--accent3); }
.modal-contact small { font-size: 0.76rem; color: #9aa3b8; line-height: 1.5; display: block; }

/* ══════════════════════
   FICHA MI-PLAZA
   ══════════════════════ */
.ficha-card {
  background: var(--white); border-radius: 16px;
  border: 2px solid var(--border); box-shadow: var(--shadow);
  overflow: hidden;
}
.ficha-ruta {
  display: flex; align-items: stretch; gap: 0;
  background: linear-gradient(135deg, var(--v) 0%, var(--v3) 100%);
  padding: 32px 36px; gap: 16px;
}
.ficha-ruta-box { flex: 1; padding: 20px; border-radius: 10px; }
.ficha-ruta-box--from { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); }
.ficha-ruta-box--to   { background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.25); }
.ficha-ruta-arrow { display: flex; align-items: center; font-size: 1.6rem; color: var(--accent); padding: 0 8px; }
.ficha-ruta-label { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.45); margin-bottom: 6px; }
.ficha-ruta-ciudad { font-size: 1.1rem; font-weight: 700; color: white; margin-bottom: 4px; }
.ficha-ruta-min { font-size: 0.84rem; color: rgba(255,255,255,0.6); }
.ficha-ruta-uni { font-size: 0.78rem; color: rgba(255,255,255,0.4); margin-top: 2px; }

.ficha-section { padding: 28px 36px; border-bottom: 1.5px solid var(--border); }
.ficha-section:last-child { border-bottom: none; }
.ficha-section h3 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #6b7a99; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1.5px solid var(--border); }
.ficha-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ficha-field { background: var(--bg2); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.ficha-field span { font-size: 0.68rem; color: #9aa3b8; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.ficha-field strong { font-size: 0.88rem; color: var(--text); }
.ficha-text { font-size: 0.88rem; color: #4a5568; line-height: 1.65; background: var(--bg2); border-radius: 8px; padding: 14px; }
.ficha-text--nota { border-left: 3px solid var(--accent3); background: #f0fdf9; }
.ficha-contact-row { display: flex; gap: 24px; flex-wrap: wrap; font-size: 0.88rem; color: #4a5568; }

/* ══════════════════════
   RESPONSIVE
   ══════════════════════ */
@media (max-width: 900px) {
  .login-left { display: none; }
  .login-right { width: 100%; }
}
@media (max-width: 768px) {
  .dash-header { padding: 28px 16px; }
  .dash-header h1 { font-size: 1.5rem; }
  .dash-content { padding: 24px 16px 48px; }
  .filters-bar { padding: 14px 16px; }
  .filters-form { gap: 10px; }
  .filter-group select,
  .filter-group input[type="text"] { min-width: 130px; }
  .plazas-grid { grid-template-columns: 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
  .ficha-grid { grid-template-columns: repeat(2, 1fr); }
  .ficha-ruta { flex-direction: column; }
  .ficha-ruta-arrow { transform: rotate(90deg); align-self: center; }
  .modal-ruta { flex-direction: column; }
  .modal-ruta-arrow { transform: rotate(90deg); align-self: center; }
  .dash-nav-inner { padding: 0 16px; }
  .dash-user { display: none; }
}
@media (max-width: 480px) {
  .ficha-grid { grid-template-columns: 1fr; }
  .ficha-section { padding: 20px 20px; }
  .login-card { padding: 28px 20px; }
}
