/* Wehaa FTP Uploader — identidad del prototipo */
:root {
  --bg: #EAF4FB;
  --surface: #FFFFFF;
  --ink: #14293B;
  --ink-soft: #2A4358;
  --muted: #61798E;
  --faint: #8AA0B2;
  --line: #D3E0EA;
  --accent: #189FDD;
  --accent-deep: #0B6EA6;
  --accent-soft: #D5EBF8;
  --danger: #E06060;
  --danger-soft: #FBE9E9;
  --ok: #1F8A5B;
  --warn: #A9741F;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Asap', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}
.logo {
  font-family: 'Exo 2', sans-serif;
  font-style: italic;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.4px;
  text-decoration: none;
}
a { color: var(--accent-deep); }

/* ---- layout ---- */
.center-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

/* ---- tarjetas ---- */
.card {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(20, 60, 90, 0.08);
  padding: 24px 28px;
}

/* ---- formularios ---- */
label { display: block; font-weight: 600; font-size: 13px; color: var(--ink-soft); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:hover { background: #0F8FCB; }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--bg); }

/* ---- login ---- */
.login-card { width: 100%; max-width: 400px; }
.login-card .logo { display: block; text-align: center; font-size: 26px; margin-bottom: 8px; }
.login-foot { text-align: center; font-size: 12.5px; margin-top: 14px; }
.alert {
  background: var(--danger-soft);
  color: #A33;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-top: 14px;
}
.alert.ok { background: #E3F4EC; color: var(--ok); }

/* ---- header de app ---- */
.app-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.app-head .logo { font-size: 22px; }
.app-head .titles h1 { font-size: 17px; margin: 0; }
.app-head .titles p { font-size: 12.5px; color: var(--muted); margin: 0; }
.pill {
  margin-left: auto;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 600;
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pill form { display: inline; }
.pill button { background: none; border: 0; color: var(--accent-deep); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 0; }

/* ---- tabs ---- */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.tab {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 10px;
  font-weight: 600; font-size: 13.5px;
  color: var(--muted); background: #DFEBF4; text-decoration: none;
}
.tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(20, 60, 90, 0.10); }

/* ---- estados ---- */
.err-icon {
  width: 48px; height: 48px; border-radius: 999px;
  background: var(--danger-soft); color: var(--danger);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; font-size: 22px; font-weight: 700;
}
.stub-note {
  border: 1px dashed var(--line);
  border-radius: 11px;
  background: #F6FBFE;
  color: var(--muted);
  padding: 16px 18px;
  font-size: 13.5px;
  margin-top: 16px;
}

/* ---- panel admin: listas ---- */
.card-title { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(20, 60, 90, 0.06);
  padding: 13px 18px;
  margin-bottom: 11px;
}
.avatar {
  width: 36px; height: 36px; border-radius: 999px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent-deep);
  font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.avatar.square { border-radius: 10px; }
.row .who { min-width: 0; }
.row .who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .who span { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blue-line { color: var(--accent); }
.warn-line { color: var(--warn); }
.muted-line { color: var(--muted); }
.acts { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.acts form { display: flex; align-items: center; }
.iconbtn {
  background: none; border: 0; padding: 4px; cursor: pointer; line-height: 0;
  border-radius: 7px; display: inline-flex;
}
.iconbtn:hover { background: var(--bg); }
.iconbtn svg { width: 17px; height: 17px; stroke: var(--accent); }
.iconbtn svg.del { stroke: var(--danger); }
.copied-note { font-size: 11.5px; color: var(--ok); font-weight: 600; }
select.compact {
  width: auto; max-width: 190px;
  padding: 6px 8px; font-size: 12px; border-radius: 7px; color: var(--ink-soft);
}

/* ---- formularios del panel ---- */
.input-row { display: flex; gap: 10px; align-items: stretch; }
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.soft { font-weight: 400; color: var(--faint); }
.switch { display: flex; align-items: center; gap: 10px; margin-top: 16px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i {
  width: 36px; height: 20px; border-radius: 999px; background: #C9D8E4;
  position: relative; transition: background .15s ease; flex-shrink: 0;
}
.switch i::after {
  content: ""; position: absolute; left: 2.5px; top: 2.5px;
  width: 15px; height: 15px; border-radius: 999px; background: #fff;
  transition: transform .15s ease;
}
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- portal de subida ---- */
.drop {
  border: 2px dashed #9CC9E4;
  border-radius: 14px;
  background: #F3FAFE;
  color: var(--muted);
  text-align: center;
  padding: 38px 20px;
  cursor: pointer;
  margin-bottom: 16px;
}
.drop svg { color: var(--accent); }
.drop b { display: block; color: var(--ink); font-size: 14.5px; margin-top: 10px; }
.drop span { font-size: 12.5px; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid #E1ECF4;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 9px;
}
.f-icon { line-height: 0; flex-shrink: 0; }
.f-icon svg { width: 21px; height: 21px; }
.f-main { flex: 1; min-width: 0; }
.f-main b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-main small { color: var(--faint); font-size: 12px; }
.f-main small.f-err { color: var(--danger); }
.f-prog { height: 6px; border-radius: 999px; background: #E3EEF6; margin-top: 7px; overflow: hidden; }
.f-prog i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .15s ease; }
.f-prog.pulse i { animation: fprog-pulse 1.1s ease-in-out infinite; }
@keyframes fprog-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .f-prog.pulse i { animation: none; } }
.f-side { display: flex; align-items: center; gap: 9px; flex-shrink: 0; max-width: 46%; }
.f-url {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--accent-deep);
  background: #EAF6FC;
  border: 1px solid #CBE6F5;
  border-radius: 7px;
  padding: 5px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn.sm { padding: 6px 13px; font-size: 12.5px; border-radius: 8px; white-space: nowrap; }

/* ---- historial de archivos ---- */
.section-title { font-size: 15px; font-weight: 700; margin: 26px 0 12px; }
.row.dim { opacity: 0.62; }
.row .f-icon { line-height: 0; flex-shrink: 0; }
.row .f-icon svg { width: 20px; height: 20px; }
.muted-note { font-size: 12px; color: var(--faint); white-space: nowrap; }
.fail-note { font-size: 12px; color: var(--danger); white-space: nowrap; }
.acts .f-url { max-width: 260px; }
.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--surface); border-radius: 13px;
  box-shadow: 0 1px 6px rgba(20, 60, 90, 0.06);
  padding: 12px 16px; margin-bottom: 14px;
}
.filters select, .filters input[type=text] { width: auto; flex: 0 1 auto; font-size: 13px; padding: 8px 10px; }
.filters input[type=text] { flex: 1 1 160px; }
.pager { display: flex; align-items: center; gap: 14px; justify-content: center; margin-top: 18px; color: var(--muted); font-size: 13px; }

@media (max-width: 680px) {
  .form-grid2 { grid-template-columns: 1fr; }
  .row { flex-wrap: wrap; }
  .acts { margin-left: 50px; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .file-row { flex-wrap: wrap; }
  .f-side { max-width: 100%; margin-left: 33px; }
}
