/* Panel XNET: mismos colores del logo y mosaicos estilo Windows 10 Mobile. */
:root {
  --green: #4ee935; --green-light: #8af27a; --green-mid: #2db52a; --green-dark: #1c8a1f; --green-deep: #0f5a14;
  --black: #0a0a0a; --surface: #151815; --surface-2: #202620; --line: #2c342c;
  --text: #f2f5f1; --muted: #9da89c; --red: #e5484d; --amber: #f5b83d;
}
* { box-sizing: border-box; }
@font-face { font-family: "XnetIcons"; src: url(XnetIcons.ttf) format("truetype"); font-display: block; }
.ic { font-family: "Material Icons"; font-style: normal; font-weight: normal; font-size: 1.25em; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; display: inline-block; vertical-align: -0.2em; -webkit-font-feature-settings: "liga"; font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; }
.ic.xnet { font-family: "XnetIcons"; }
body { margin: 0; background: var(--black); color: var(--text); font: 15px/1.45 "Barlow", "Segoe UI", system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--green); }
h1 { font: italic 800 32px/1.1 "Barlow Condensed", sans-serif; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .3px; }
h1 small, legend small, h3 small { color: var(--muted); font-weight: 400; font-size: 13px; }
.muted, .hint { color: var(--muted); font-size: 13px; }

/* Menú lateral */
.shell { --side: 240px; padding-left: var(--side); }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 0; overflow-y: auto; z-index: 20; transition: transform .2s; }
.side .brand { padding: 0 16px 14px; }
.side nav { display: grid; flex: 1; align-content: start; }
.side nav a, .side .link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; color: var(--text); text-decoration: none; border-left: 3px solid transparent; text-align: left; }
.side nav a:hover, .side .link:hover { background: var(--surface-2); color: var(--green); }
.side nav a.on { background: var(--surface-2); border-left-color: var(--green); color: var(--green); font-weight: 600; }
.side .ic { width: 24px; font-size: 22px; text-align: center; }
.side form { margin: 8px 0 0; border-top: 1px solid var(--line); padding-top: 8px; }
.link { background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span { font: italic 800 28px/1 "Barlow Condensed", sans-serif; letter-spacing: 1.5px; }
.brand small { color: var(--muted); }
.top, .scrim { display: none; }
.blank { color: var(--muted); text-align: center; margin-top: 30vh; }

.page { width: 100%; max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; flex: 1; }
.bare { flex: 1; display: grid; place-items: center; padding: 16px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; }
.foot b { color: var(--green); }

.btn { display: inline-block; background: var(--green); color: var(--black); border: 0; padding: 10px 18px; font-family: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .1s; }
.btn:active { transform: scale(.96); }
.btn.ghost { background: var(--surface-2); color: var(--text); }
.btn.danger { background: var(--red); color: #fff; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.flash { background: var(--green-deep); padding: 10px 14px; margin-bottom: 16px; border-left: 4px solid var(--green); }
.flash.error, .error { color: #ffb4b4; }
.flash.error { background: #3a1416; border-color: var(--red); }
.error { margin: 2px 0 8px; font-size: 13px; }
.warn { color: var(--amber) !important; }

/* Login */
.login { width: 100%; max-width: 340px; background: var(--surface); padding: 28px; display: grid; gap: 14px; text-align: center; }
.login img { margin: 0 auto; }
.login h1 { letter-spacing: 1.5px; font-size: 40px; }
.login label { text-align: left; }

/* Listado */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.back { text-decoration: none; color: var(--text); margin-right: 4px; }
.search { display: flex; gap: 8px; margin-bottom: 16px; }
.search input { flex: 1; }
.empty { background: var(--surface); padding: 24px; text-align: center; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.card { background: var(--surface); color: var(--text); text-decoration: none; display: flex; flex-direction: column; }
.card:hover { outline: 2px solid var(--green); }
.card-img { position: relative; aspect-ratio: 1; background: var(--green-deep); display: grid; place-items: center; font-size: 36px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 0; left: 0; background: var(--green); color: var(--black); font-size: 11px; font-weight: 700; line-height: 1; font-style: normal; padding: 4px 6px; text-transform: uppercase; }
.badge.red { background: var(--red); color: #fff; top: auto; bottom: 0; }
.card-body { padding: 8px 10px 10px; display: grid; gap: 2px; }
.card-body b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-body small { color: var(--muted); font-size: 12px; }

/* Formularios */
.form { display: grid; gap: 14px; }
fieldset { border: 0; background: var(--surface); padding: 16px; margin: 0; display: grid; gap: 10px; }
legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; font: italic 700 21px/1.2 "Barlow Condensed", sans-serif; text-transform: uppercase; color: var(--green); }
label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
input, select, textarea { width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid transparent; padding: 9px 10px; font: inherit; border-radius: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); }
textarea { resize: vertical; }
.actions { position: sticky; bottom: 0; background: var(--black); padding: 10px 0; }
.actions .btn { width: 100%; font-size: 16px; padding: 12px; }
.level { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }

/* Fotos */
.photos h3 { margin: 4px 0 8px; font-size: 15px; font-weight: 500; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs figure { position: relative; margin: 0; width: 110px; height: 110px; background: var(--surface-2); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; background: rgba(0,0,0,.75); color: #fff; cursor: pointer; }
.x:hover { background: var(--red); }
.drop { width: 110px; height: 110px; border: 2px dashed var(--green-dark); display: grid; place-items: center; cursor: pointer; color: var(--green); font-size: 14px; }
.drop:hover { border-color: var(--green); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.preview img { width: 64px; height: 64px; object-fit: cover; outline: 2px solid var(--green); }
.preview img.over { outline-color: var(--red); opacity: .5; }

@media (max-width: 860px) {
  .shell { padding-left: 0; }
  .top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
  .burger { font-size: 24px; cursor: pointer; color: var(--text); line-height: 1; }
  .side { transform: translateX(-100%); }
  .menu-toggle:checked ~ .side { transform: none; }
  .menu-toggle:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 10; }
}
@media (max-width: 560px) { .level { grid-template-columns: 1fr; } h1 { font-size: 22px; } }
