:root{
  --bg1:#070A12; --bg2:#0B1220;
  --card: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.12);
  --text:#E7ECFF; --muted:#AAB2D5;
  --shadow: 0 10px 40px rgba(0,0,0,.35);
  --r:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:ui-sans-serif,system-ui,Segoe UI,Roboto,Arial;color:var(--text)}
.bg{
  background: radial-gradient(1200px 800px at 20% 10%, #1a2a6c33, transparent 60%),
              radial-gradient(1000px 600px at 80% 20%, #00c6ff22, transparent 60%),
              linear-gradient(180deg,var(--bg1),var(--bg2));
}
.glass{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.btn{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color:var(--text);
  border-radius: 14px;
  padding: 10px 14px;
  cursor:pointer;
}
.btn:hover{background: rgba(255,255,255,.10)}
.btn.primary{
  border-color: rgba(78, 153, 255,.45);
  background: linear-gradient(180deg, rgba(78,153,255,.35), rgba(78,153,255,.18));
}
.input{
  width:100%;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.18);
  color:var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  outline:none;
}
.input:focus{border-color: rgba(78,153,255,.6)}
.label{font-size:12px;color:var(--muted);margin:8px 0 6px;display:block}
.msg{margin-top:10px;font-size:13px;color:#ffd38a}
.divider{height:1px;background:var(--stroke);margin:12px 0}

/* Auth */
.auth-wrap{min-height:100%;display:grid;place-items:center;padding:20px}
.auth-card{width:min(420px,92vw);padding:22px}
.brand{display:flex;gap:12px;align-items:center;margin-bottom:14px}
.logo{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:rgba(78,153,255,.20);border:1px solid rgba(78,153,255,.35)}
.title{font-weight:750;letter-spacing:.2px}
.subtitle{color:var(--muted);font-size:13px}
.footnote{margin-top:14px;color:var(--muted);font-size:12px;line-height:1.35}

/* Layout */
.layout{display:grid;grid-template-columns:280px 1fr;gap:16px;padding:16px;height:100%}
.sidebar{padding:14px;display:flex;flex-direction:column;gap:14px}
.side-top{display:flex;justify-content:space-between;align-items:center;gap:10px}
.brand-mini{display:flex;gap:10px;align-items:center}
.side-section{display:flex;flex-direction:column;gap:8px}
.side-h{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.12em}
.side-item{
  text-align:left;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor:pointer;
}
.side-item:hover{background: rgba(255,255,255,.06)}
.side-item.active{border-color: rgba(78,153,255,.50); background: rgba(78,153,255,.12)}
.side-list{display:flex;flex-direction:column;gap:6px}

/* Main */
.main{display:flex;flex-direction:column;gap:14px}
.topbar{padding:12px;display:flex;gap:10px;align-items:center;justify-content:space-between}
.search{display:flex;gap:10px;align-items:center;flex:1}
.actions{display:flex;gap:10px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}

/* Card */
.card{overflow:hidden;position:relative}
.card-img{height:140px;background:#111;border-bottom:1px solid var(--stroke);display:block}
.card-img img{width:100%;height:100%;object-fit:cover;display:block;filter:saturate(1.05) contrast(1.05)}
.card-body{padding:12px;display:flex;flex-direction:column;gap:8px}
.card-title{display:flex;justify-content:space-between;gap:10px;align-items:center}
.badge{
  font-size:11px;padding:5px 8px;border-radius:999px;border:1px solid var(--stroke);color:var(--muted)
}
.badge.active{border-color:#2dd4bf55;color:#9ff3e6}
.badge.archived{border-color:#fbbf2455;color:#ffd38a}
.badge.dead{border-color:#fb718555;color:#ffb4be}
.badge.given{border-color:#60a5fa55;color:#b7d6ff}
.meta{color:var(--muted);font-size:12px;display:flex;gap:8px;flex-wrap:wrap}
.stats{display:flex;gap:8px;flex-wrap:wrap}
.stat{font-size:12px;border:1px solid var(--stroke);border-radius:12px;padding:6px 8px;background:rgba(0,0,0,.16)}
.card-actions{display:flex;gap:8px;margin-top:6px}

/* Modal */

.modal{
  position: fixed;
  inset: 0;
  display: none;                
  align-items: center;
  justify-content: center;
  padding: 24px;

  background: rgba(0,0,0,.55);   
  z-index: 9999;                
}

.modal.open{
  display: flex;         
}

.modal-card{
  width: min(1100px, 96vw);
  max-height: 90vh;
  overflow: auto;             
}


.modal-head{
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(10,12,18,.75); 
  backdrop-filter: blur(10px);
}

#dinoForm{
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding-right: 8px;
}

.modal-title{font-weight:750}
.form{display:flex;flex-direction:column}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.grid2 .full{grid-column:1/-1}
.grid2 .row{display:flex;gap:10px;align-items:center}

.pager{display:flex;justify-content:center;gap:10px;align-items:center;padding:10px 0;color:var(--muted)}
.pager-info{min-width:140px;text-align:center}

/* Logo */
.logo{ 
  width:42px;height:42px;border-radius:14px;
  display:grid;place-items:center;
  background:rgba(78,153,255,.20);
  border:1px solid rgba(78,153,255,.35);
  overflow:hidden;
}
.logo-img{
  width:100%;
  height:100%;
  object-fit:cover;
}


@media (max-width: 900px){
  .layout{grid-template-columns:1fr}
  .sidebar{order:2}
  .main{order:1}
  .search{flex-direction:column;align-items:stretch}
}

/* notas */
.notes-box{ display:flex; flex-direction:column; gap:10px; margin-top:8px; padding-right: 6px; overflow: auto;}
.note-row{ padding:10px; border:1px solid rgba(255,255,255,.08); border-radius:14px; background: rgba(10,12,20,.35); }
.note-meta{ display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:6px; }
.note-text{ white-space:pre-wrap; opacity:.95; }
.btn.danger{ border-color: rgba(255,90,90,.35); }

/* mutaciones */

.stat{
  display:flex;
  align-items:center;
  gap:8px;
}

.mut{
  opacity:.9;
  font-weight:700;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}

.mini{
  width:26px;
  height:26px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: inherit;
  cursor: pointer;
  line-height: 1;
  font-weight: 800;
}
.mini:hover{ background: rgba(255,255,255,.12); }
.btn.danger{
  border-color: rgba(255,80,80,.35);
}
.btn.danger:hover{
  border-color: rgba(255,80,80,.7);
}
.form.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form.grid2 .full{
  grid-column: 1 / -1;
}
.stat-inline{
  display:flex;
  gap:10px;
  align-items:center;
}

.stat-inline .input{
  flex: 1 1 auto;
  min-width: 0;
}

.mut{
  opacity:.9;
  font-weight:700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  white-space: nowrap;
}

button.mini{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: inherit;
  cursor: pointer;
}
button.mini:hover{
  background: rgba(255,255,255,.10);
}


