:root {
  --az: #000066;
  --az2: #00003D;
  --az-h: #1A1A80;
  --az-l: #4545A8;
  --az-s: #E6E6F5;
  --vd: #9ACD33;
  --vd-h: #85BA2B;
  --vd-t: #4F7415;
  --tx: #141623;
  --tx2: #535868;
  --tx3: #717687;
  --bd: #DCDFE5;
  --bg: #F5F6F8;
  --ok: #2F7D4F;
  --ok-s: #DDEFE3;
  --wa: #8A6406;
  --wa-s: #FBF0CF;
  --mono: "IBM Plex Mono", Menlo, monospace;
  --fuente: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.5 var(--fuente);
  color: var(--tx);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--az-l); text-decoration: none; }
a:hover { color: var(--az); }
button, input, select { font: inherit; }
.hide { display: none !important; }
.ov { font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }

/* ============ BOTONES ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 2px; border: 0;
  font-weight: 700; cursor: pointer; text-decoration: none;
  transition: background .15s;
}
.btn-vd { background: var(--vd); color: var(--az); }
.btn-vd:hover { background: var(--vd-h); color: var(--az); }
.btn-ln { background: transparent; border: 1px solid var(--bd); color: var(--az); height: 36px; padding: 0 14px; font-size: 14px; }
.btn-ln:hover { border-color: var(--az); }

/* ============ LOGIN SPLIT ============ */
.lg { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); }
.lg-l {
  position: relative; overflow: hidden;
  background: var(--az) url("https://oceean.cl/wp-content/uploads/2026/10/oceean-marca-fondo.png") no-repeat -12% 115%/78% auto;
  color: #fff; padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  border-right: 4px solid var(--vd);
}
.lg-l > img { height: 34px; width: auto; align-self: flex-start; }
.lg-l h1 {
  margin: 0; font-size: clamp(40px, 4.6vw, 68px);
  line-height: .96; font-stretch: 72%; font-weight: 800; letter-spacing: -.01em;
  max-width: 11ch; text-wrap: balance;
}
.lg-l > div > p { margin: 18px 0 0; color: #CDCDEC; max-width: 42ch; font-size: 17px; }
.lg-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; color: #A9A9DD; }
.lg-meta b { color: #fff; font: 500 13px var(--mono); display: block; }

.lg-r { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: #fff; }
.lg-f { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 20px; }
.lg-f h2 { margin: 6px 0 0; font-size: 34px; line-height: 1; font-stretch: 78%; font-weight: 800; color: var(--az); }
.lg-f .sub { margin: -8px 0 4px; color: var(--tx2); }

.fl { display: flex; flex-direction: column; gap: 6px; }
.fl label { font-weight: 600; font-size: 14px; color: var(--tx); }
.in {
  height: 46px; border: 1px solid var(--bd); border-radius: 2px;
  padding: 0 14px; background: #fff; color: var(--tx); outline: 0; width: 100%;
  font: 400 15px var(--fuente);
}
.in:focus { border-color: var(--az); box-shadow: 0 0 0 3px var(--az-s); }
textarea.in { height: auto; padding: 10px 14px; resize: vertical; }

.pw { position: relative; }
.pw button {
  position: absolute; right: 6px; top: 6px; height: 34px; padding: 0 10px;
  border: 0; background: none; color: var(--az-l); font-weight: 600; font-size: 13px; cursor: pointer;
}

.row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; gap: 12px; }
.row label { white-space: nowrap; display: flex; gap: 8px; align-items: center; color: var(--tx2); }

.err { background: #F6DCD9; color: #8E2620; padding: 10px 12px; border-radius: 2px; font-size: 14px; }
.flash-success { background: #DDEFE3; color: var(--ok); padding: 10px 12px; border-radius: 2px; font-size: 14px; }
.flash-error { background: #F6DCD9; color: #8E2620; padding: 10px 12px; border-radius: 2px; font-size: 14px; }

.help { border-top: 1px solid var(--bd); padding-top: 18px; font-size: 14px; color: var(--tx2); display: flex; flex-direction: column; gap: 4px; }

@media (max-width:900px){
  .lg { grid-template-columns: 1fr; }
  .lg-l { min-height: 300px; padding: 32px; border-right: 0; border-bottom: 4px solid var(--vd); }
}

/* ============ HEADER / APP ============ */
.hd {
  background: var(--az); border-bottom: 3px solid var(--vd);
  color: #fff; position: sticky; top: 0; z-index: 5;
}
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; width: 100%; }
.hd .wrap { height: 68px; display: flex; align-items: center; gap: 28px; }
.hd > .wrap > img { height: 26px; width: auto; }
.hd .tag { color: #A9A9DD; padding-left: 20px; border-left: 1px solid rgba(255,255,255,.2); }
.nav { display: flex; gap: 4px; margin-left: 12px; height: 100%; }
.nav a {
  display: flex; align-items: center; padding: 0 14px; color: #CDCDEC;
  text-decoration: none; font-weight: 600; font-size: 14px;
  border-bottom: 3px solid transparent; margin-bottom: -3px;
}
.nav a:hover { color: #fff; }
.nav a.on { color: #fff; border-color: #fff; }

.usr { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; }
.av {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--az-h); display: flex; align-items: center; justify-content: center;
  font: 600 12px var(--mono);
}
.usr .nm { display: flex; flex-direction: column; line-height: 1.2; }
.usr .nm span { color: #A9A9DD; font-size: 12px; }

.out {
  background: none; border: 1px solid rgba(255,255,255,.3); color: #fff;
  height: 32px; padding: 0 12px; border-radius: 2px; cursor: pointer;
  font-size: 13px; font-weight: 600;
}
.out:hover { border-color: #fff; }

/* ============ MAIN / PAGE HEAD ============ */
main.wrap { flex: 1; padding-top: 36px; padding-bottom: 48px; }

.ph {
  display: flex; flex-wrap: wrap; gap: 20px;
  align-items: flex-end; justify-content: space-between;
  margin-bottom: 20px;
}
.ph h1 {
  font-size: 44px; line-height: 1; font-stretch: 72%; font-weight: 800;
  color: var(--az); margin: 6px 0 4px;
}
.ph p { margin: 0; color: var(--tx2); }
.ph .ov { color: var(--vd-t); }

/* ============ STATS ============ */
.stats { display: flex; border: 1px solid var(--bd); background: #fff; border-radius: 4px; }
.stats div { padding: 12px 20px; border-left: 1px solid var(--bd); }
.stats div:first-child { border: 0; }
.stats b { display: block; font: 600 24px/1.1 var(--mono); color: var(--az); }
.stats span { font-size: 12.5px; color: var(--tx2); }

/* ============ TOOLBAR ============ */
.tb {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 14px; background: #fff; border: 1px solid var(--bd); border-radius: 4px;
  margin-bottom: 8px;
}
.sr { position: relative; flex: 1 1 280px; }
.sr .in { padding-left: 40px; height: 40px; }
.sr svg { position: absolute; left: 13px; top: 11px; color: var(--tx3); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 32px; padding: 0 12px; border: 1px solid var(--bd);
  border-radius: 2px; background: #fff; color: var(--tx2);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.chip:hover { border-color: var(--az); color: var(--az); }
.chip.on { background: var(--az); border-color: var(--az); color: #fff; }
.sep { width: 1px; height: 24px; background: var(--bd); }
.sel {
  height: 40px; border: 1px solid var(--bd); border-radius: 2px;
  padding: 0 10px; background: #fff; color: var(--tx);
}

.res { display: flex; justify-content: space-between; padding: 14px 2px 12px; font-size: 14px; color: var(--tx2); }

/* ============ GRID / CARDS ============ */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.cd {
  background: #fff; border: 1px solid var(--bd); border-radius: 4px;
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: border-color .15s, transform .15s;
}
.cd:hover { border-color: var(--az); transform: translateY(-2px); }

.img {
  aspect-ratio: 4/3; position: relative;
  background: repeating-linear-gradient(135deg, #E6E6F5 0 10px, #EEEEF8 10px 20px);
  display: flex; align-items: center; justify-content: center;
  color: var(--tx3); font: 500 11.5px var(--mono);
  letter-spacing: .06em; text-transform: uppercase;
}
.img .cnt {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(0,0,61,.85); color: #fff;
  padding: 4px 8px; border-radius: 2px;
  font: 500 12px var(--mono); text-transform: none; letter-spacing: 0;
}

.st {
  white-space: nowrap; width: max-content; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px; border-radius: 2px;
  font-size: 12px; font-weight: 700;
}
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st.op { background: var(--ok-s); color: var(--ok); position: absolute; top: 10px; left: 10px; }
.st.fa { background: var(--wa-s); color: var(--wa); position: absolute; top: 10px; left: 10px; }
.st.ar { background: var(--az-s); color: var(--az); position: absolute; top: 10px; left: 10px; }
.st.en { background: #ECEEF1; color: var(--tx2); position: absolute; top: 10px; left: 10px; }

.cb { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.code { font: 600 12px var(--mono); color: var(--vd-t); letter-spacing: .04em; }
.cb h3 { margin: 0; font-size: 18px; line-height: 1.2; color: var(--az); }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 13.5px; margin-top: 4px; }
.dl dt { color: var(--tx3); }
.dl dd { margin: 0; color: var(--tx); }

.cf {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 16px; border-top: 1px solid var(--bd);
  font-size: 13px; color: var(--tx3);
}
.cf a { font-weight: 700; color: var(--az); text-decoration: none; display: flex; gap: 6px; align-items: center; }
.cf a:hover { color: var(--az-l); }

.empty {
  grid-column: 1/-1; background: #fff; border: 1px dashed var(--bd);
  border-radius: 4px; padding: 48px; text-align: center; color: var(--tx2);
}
.empty b { display: block; color: var(--az); font-size: 18px; margin-bottom: 4px; }

/* ============ FOOTER ============ */
.ft { border-top: 1px solid var(--bd); background: #fff; margin-top: auto; }
.ft .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 16px; padding-bottom: 16px; font-size: 13px; color: var(--tx3); }

/* ============ DRAWER ============ */
.scr { position: fixed; inset: 0; background: rgba(0,0,61,.45); z-index: 20; }
.dw {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(560px, 100%); background: #fff;
  z-index: 21; display: flex; flex-direction: column;
  box-shadow: -12px 0 32px rgba(0,0,61,.18);
}
.dw-h {
  padding: 22px 24px; border-bottom: 1px solid var(--bd);
  display: flex; justify-content: space-between; gap: 16px;
}
.dw-h h2 { margin: 6px 0 0; font-size: 28px; line-height: 1.05; font-stretch: 78%; font-weight: 800; color: var(--az); }
.x {
  width: 36px; height: 36px; border: 1px solid var(--bd);
  background: #fff; border-radius: 2px; cursor: pointer;
  font-size: 18px; color: var(--az); flex: none;
}
.dw-b { padding: 24px; overflow: auto; display: flex; flex-direction: column; gap: 22px; flex: 1; }
.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gal .img:first-child { grid-column: 1/-1; aspect-ratio: 16/9; }
.gal .img { aspect-ratio: 1; }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border: 1px solid var(--bd); border-radius: 4px; }
.spec div { padding: 12px 14px; border-bottom: 1px solid var(--bd); }
.spec div:nth-child(odd) { border-right: 1px solid var(--bd); }
.spec div:nth-last-child(-n+2) { border-bottom: 0; }
.spec span { display: block; font-size: 12.5px; color: var(--tx3); }
.spec b { font-weight: 600; }
.tl { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.tl li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; font-size: 14px; }
.tl time { font: 500 12.5px var(--mono); color: var(--tx3); padding-top: 1px; }
.dw-f { padding: 16px 24px; border-top: 1px solid var(--bd); display: flex; gap: 12px; }
.dw-f .btn { flex: 1; }
.h4 { margin: 0 0 10px; font-size: 13px; color: var(--tx2); }

/* ============ ADMIN TABLE ============ */
.admin-table {
  width: 100%; background: #fff; border: 1px solid var(--bd);
  border-radius: 4px; border-collapse: collapse; overflow: hidden;
}
.admin-table th, .admin-table td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--bd);
  font-size: 14px; vertical-align: middle;
}
.admin-table th {
  background: var(--bg); font: 600 11px/1 var(--mono);
  letter-spacing: 1px; text-transform: uppercase; color: var(--tx2);
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: rgba(0,0,102,.02); }
.cell-cover img { width: 64px; height: 48px; object-fit: cover; border-radius: 2px; border: 1px solid var(--bd); }
.mono { font: 500 12px var(--mono); }
.muted { color: var(--tx2); }
.cell-actions { display: flex; gap: 8px; align-items: center; }
.btn-mini {
  display: inline-flex; align-items: center;
  background: #fff; color: var(--az); font: 600 13px/1 var(--fuente);
  border: 1px solid var(--bd); border-radius: 2px;
  padding: 7px 12px; cursor: pointer; text-decoration: none;
}
.btn-mini:hover { background: var(--az-s); color: var(--az); }
.btn-mini-danger { color: #B8322A; border-color: #F6DCD9; }
.btn-mini-danger:hover { background: #F6DCD9; color: #B8322A; }

/* ============ FORM ============ */
.container--form { max-width: 880px; }
.record-form {
  background: #fff; border: 1px solid var(--bd);
  border-radius: 4px; padding: 28px;
  display: flex; flex-direction: column; gap: 18px;
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.record-form label { display: flex; flex-direction: column; gap: 6px; }
.record-form label > span {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--tx2);
}
.current-cover {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 12px; background: var(--bg);
  border: 1px solid var(--bd); border-radius: 2px;
  margin-bottom: 6px;
}
.current-cover img { width: 80px; height: 60px; object-fit: cover; border-radius: 2px; }
.check-line { flex-direction: row !important; align-items: center; gap: 8px !important; }
.check-line input { width: 16px; height: 16px; }
.form-actions { display: flex; gap: 12px; padding-top: 8px; border-top: 1px solid var(--bd); margin-top: 8px; }

/* ============ FLASHES WRAP ============ */
.flashes.wrap { padding-top: 16px; }
.flashes.wrap .flash { margin-bottom: 8px; }

/* ============ RESPONSIVE ============ */
@media (max-width:900px){
  .hd .tag, .usr .nm { display: none; }
  .wrap { padding: 0 18px; }
  .stats { width: 100%; }
  .stats div { flex: 1; }
  .ph { flex-direction: column; align-items: stretch; }
  .tb { flex-direction: column; align-items: stretch; }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width:640px){
  .nav { display: none; }
  .sep { display: none; }
  .admin-table { font-size: 13px; }
  .admin-table th, .admin-table td { padding: 8px 6px; }
}