@import url(/fonts/fonts.css);

/* Colores de Bandido (wearebandido.com) */
:root {
  --bg: #1e001e;          /* berenjena */
  --panel: #2a0d2b;
  --panel-2: #321e3c;     /* morado Bandido */
  --line: #40284a;
  --text: #f2f2f2;
  --muted: #b3a3b6;
  --accent: #ff644b;      /* coral */
  --accent-text: #1e001e;
  --pink: #ffd7eb;
  --yellow: #ffe696;
  --lilac: #9191ec;
  --danger: #ff8a8a;
  --ok: #ffe696;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.4 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
a.tab, a.brand, a.icon-btn, a.btn { text-decoration: none; }
.hidden { display: none !important; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; background: rgba(30,0,30,.92); backdrop-filter: blur(12px); padding: calc(var(--safe-top) + 10px) 16px 10px; border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 10px; }
.brand { font-weight: 800; letter-spacing: -.02em; font-size: 19px; flex: 1; display: flex; align-items: center; gap: 8px; }
.brand img { height: 30px; width: 30px; display: block; }
.brand-link { font-weight: 800; color: var(--accent); letter-spacing: -.01em; }
.login-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 14px; font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.login-logo img { height: 72px; width: 72px; display: block; }
.icon-btn { background: var(--panel-2); border: 0; border-radius: 10px; min-width: 40px; height: 40px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; position: relative; }
.icon-btn .badge { position: absolute; top: -4px; right: -4px; background: var(--accent); color: var(--accent-text); border-radius: 9px; font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; display: flex; align-items: center; justify-content: center; }
.search { margin-top: 10px; display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; }
.search input:focus { outline: none; border-color: var(--accent); }
.tabs { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.tab { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 20px; padding: 6px 14px; cursor: pointer; white-space: nowrap; }
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 12px 16px 4px; color: var(--muted); font-size: 14px; }
.crumbs a { text-decoration: none; padding: 2px 4px; border-radius: 6px; }
.crumbs a:last-child { color: var(--text); font-weight: 600; }
.crumbs .sep { opacity: .5; }
.folder-actions { display: flex; gap: 8px; padding: 6px 16px 10px; }

/* Lists */
main { padding-bottom: calc(var(--safe-bottom) + 40px); max-width: 900px; margin: 0 auto; }
.list { list-style: none; margin: 0; padding: 0 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px; cursor: pointer; }
.item:hover, .item:active { background: var(--panel); }
.item .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.item .txt { flex: 1; min-width: 0; }
.item .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .more { background: none; border: 0; color: var(--muted); font-size: 20px; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; flex: none; }
.item .more:hover { background: var(--panel-2); color: var(--text); }
.empty, .loading { color: var(--muted); text-align: center; padding: 40px 16px; }

/* Buttons & forms */
.btn { background: var(--panel-2); border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
label.field { display: block; margin: 12px 0; }
label.field > span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
input[type=text], input[type=password], input[type=search], select, textarea { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.seg { display: flex; background: var(--panel-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg label { flex: 1; text-align: center; padding: 9px; border-radius: 9px; cursor: pointer; color: var(--muted); }
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--text); color: var(--bg); font-weight: 600; }
.error { color: var(--danger); font-size: 14px; }

/* Login */
.login { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login form { width: 100%; max-width: 360px; }
.login h1 { font-size: 28px; letter-spacing: -.03em; margin: 16px 0 4px; }
.login p { color: var(--muted); margin: 0 0 16px; }
.login .qr { background: #fff; border-radius: 12px; padding: 10px; width: 220px; height: 220px; margin: 0 auto 12px; }
.login .qr svg { width: 100%; height: 100%; display: block; }
.login .secret { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.login .secret code { display: block; background: var(--panel-2); color: var(--text); padding: 10px; border-radius: 8px; margin-top: 8px; font-size: 16px; letter-spacing: .08em; word-break: break-all; }

/* Sheet (modal) */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--panel); width: 100%; max-width: 640px; max-height: 92dvh; overflow: auto; border-radius: 20px 20px 0 0; padding: 16px 16px calc(var(--safe-bottom) + 20px); animation: up .2s ease-out; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 20px; } }
.sheet h2 { margin: 4px 0 4px; font-size: 18px; word-break: break-word; }
.sheet .meta { color: var(--muted); font-size: 14px; margin-bottom: 12px; word-break: break-word; }
.sheet .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.sheet .close { float: right; }
.media { background: #000; border-radius: 12px; overflow: hidden; margin: 8px 0; display: flex; align-items: center; justify-content: center; min-height: 120px; }
.media video, .media img { display: block; width: 100%; max-height: 60dvh; object-fit: contain; }
.media audio { width: 100%; margin: 16px; }
.media .placeholder { color: var(--muted); text-align: center; padding: 30px 16px; }
.progress { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; margin: 12px auto 0; max-width: 240px; }
.progress > div { height: 100%; background: var(--accent); transition: width .5s; }
.linkbox { display: flex; gap: 8px; margin-top: 12px; }
.linkbox input { flex: 1; min-width: 0; font-size: 14px; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* Pages (links, admin) */
.page { padding: 16px; }
.page h2 { margin: 8px 0 12px; }
.card { background: var(--panel); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.card .row { display: flex; align-items: center; gap: 10px; }
.card .grow { flex: 1; min-width: 0; }
.card .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.card .title { font-weight: 600; word-break: break-word; }
.card .sub { color: var(--muted); font-size: 13px; }
.card .btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--panel-2); color: var(--muted); }
.pill.accent { background: rgba(255,100,75,.18); color: var(--accent); }
.pill.ok { background: rgba(255,230,150,.15); color: var(--yellow); }
.pill.off { background: rgba(255,138,138,.15); color: var(--danger); }
.subtabs { display: flex; gap: 6px; margin-bottom: 14px; }

#toast { position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 24px); transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
