:root {
  --navy: #18233f;
  --navy-2: #233357;
  --ink: #1a2233;
  --muted: #6b7488;
  --line: #e6eaf2;
  --bg: #f5f7fc;
  --card: #ffffff;
  --accent: #4f6ef7;
  --accent-2: #6a4ff7;
  --accent-dark: #3a55d9;
  --ok: #15a05a;
  --ok-bg: #e7f7ee;
  --warn: #b9791a;
  --warn-bg: #fcf3e2;
  --err: #d23b3b;
  --err-bg: #fdeceb;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 60, 0.06), 0 1px 3px rgba(20, 30, 60, 0.05);
  --shadow: 0 6px 20px rgba(24, 35, 63, 0.08);
  --shadow-lg: 0 16px 40px rgba(24, 35, 63, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 500px at 100% -10%, #eaf0ff 0%, transparent 60%),
    radial-gradient(1000px 500px at -10% 0%, #f0ecff 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Top bar ---------- */
.topbar {
  background: linear-gradient(100deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 26px;
  box-shadow: 0 2px 18px rgba(24, 35, 63, 0.18);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  color: #fff; text-decoration: none; font-weight: 800; font-size: 1.16rem;
  letter-spacing: 0.2px; display: flex; align-items: center; gap: 9px;
}
.brand span { color: #9db8ff; font-weight: 600; }
.topnav { display: flex; align-items: center; gap: 18px; }
.who { color: #cdd7ee; font-size: 0.9rem; font-weight: 500; }
.navlink { color: #cdd7ee; text-decoration: none; font-size: 0.9rem; transition: color 0.15s; }
.navlink:hover { color: #fff; }
.linkbtn {
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-size: 0.88rem;
  font-family: inherit; transition: background 0.15s;
}
.linkbtn:hover { background: rgba(255, 255, 255, 0.2); }

/* ---------- Layout ---------- */
.container { max-width: 1000px; margin: 0 auto; padding: 36px 24px 72px; }
h1 { font-size: 1.7rem; margin: 0 0 6px; letter-spacing: -0.3px; }
h2 { font-size: 1.18rem; letter-spacing: -0.2px; }
.muted { color: var(--muted); }
.section-title { margin-top: 40px; padding-bottom: 6px; }
.back { display: inline-block; margin-bottom: 16px; color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.back:hover { text-decoration: underline; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
}
.card.login { max-width: 400px; margin: 9vh auto 0; padding: 36px 34px; }
.card.login h1 { text-align: center; }
.card.login .muted { text-align: center; margin-bottom: 22px; }

/* ---------- Skill grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.skill-card {
  position: relative;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 22px 20px;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.skill-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0; transition: opacity 0.16s ease;
}
.skill-card:hover {
  transform: translateY(-4px);
  border-color: #cfd9f7;
  box-shadow: var(--shadow-lg);
}
.skill-card:hover::before { opacity: 1; }
.skill-icon {
  width: 50px; height: 50px; border-radius: 13px;
  background: linear-gradient(135deg, #eef2ff, #e9e6ff);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 14px;
  box-shadow: inset 0 0 0 1px rgba(79, 110, 247, 0.12);
}
.skill-card h2 { margin: 0 0 8px; color: var(--navy); font-size: 1.08rem; }
.skill-card p { color: var(--muted); margin: 0 0 18px; flex: 1; font-size: 0.92rem; line-height: 1.5; }
.skill-card .cta { color: var(--accent); font-weight: 700; font-size: 0.92rem; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 20px; }
.field > span { display: block; font-weight: 600; margin-bottom: 7px; font-size: 0.95rem; }
.field small { display: block; color: var(--muted); margin-top: 7px; font-size: 0.82rem; }
input, textarea {
  width: 100%; padding: 12px 13px; border: 1.5px solid var(--line);
  border-radius: 11px; font: inherit; background: #fbfcff; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.13); background: #fff; }
input[type=file] { padding: 10px; background: #fff; cursor: pointer; }
textarea { resize: vertical; }
.outinfo { background: linear-gradient(135deg, #f0f5ff, #f3f0ff); border: 1px solid #dde6fb; padding: 12px 14px; border-radius: 11px; font-size: 0.92rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: 0; border-radius: 11px; padding: 12px 22px;
  font: inherit; font-weight: 700; cursor: pointer; transition: transform 0.1s, box-shadow 0.15s, filter 0.15s;
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 6px 16px rgba(79, 110, 247, 0.32);
}
.btn.primary:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(79, 110, 247, 0.4); }
.btn.primary:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; box-shadow: none; }

/* ---------- Messages ---------- */
.error { background: var(--err-bg); border: 1px solid #f6c9c6; color: var(--err); padding: 11px 14px; border-radius: 11px; margin-top: 12px; font-size: 0.92rem; }
.ok-msg { background: var(--ok-bg); border: 1px solid #b9e6cd; color: var(--ok); padding: 11px 14px; border-radius: 11px; margin-top: 12px; font-size: 0.92rem; }

/* ---------- Progress ---------- */
.progress { margin-top: 18px; }
.progress .bar { height: 9px; background: #e8edf8; border-radius: 99px; overflow: hidden; }
.progress .fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.25s ease; }
.progress .ptext { display: block; margin-top: 9px; color: var(--muted); font-size: 0.9rem; }

/* ---------- Status ---------- */
.statusline { display: flex; align-items: center; gap: 10px; }
.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px;
  font-size: 0.8rem; font-weight: 700; text-transform: capitalize; letter-spacing: 0.2px;
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.queued { background: #eef1f7; color: #5b6478; }
.status.running { background: var(--warn-bg); color: var(--warn); }
.status.done { background: var(--ok-bg); color: var(--ok); }
.status.error { background: var(--err-bg); color: var(--err); }

.spinner {
  width: 17px; height: 17px; border: 2.5px solid #d6def0; border-top-color: var(--accent);
  border-radius: 50%; display: inline-block; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Files ---------- */
.files { list-style: none; padding: 0; margin: 10px 0 0; }
.files li { margin: 0 0 9px; }
.files a {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px;
  background: linear-gradient(135deg, #f0f5ff, #f3f0ff); border: 1px solid #dde6fb;
  border-radius: 11px; color: var(--accent-dark); text-decoration: none; font-weight: 600; font-size: 0.92rem;
  transition: border-color 0.15s, transform 0.1s;
}
.files a::before { content: '⬇'; font-size: 0.95rem; }
.files a:hover { border-color: var(--accent); transform: translateX(2px); }

/* ---------- Tables ---------- */
table.jobs {
  width: 100%; border-collapse: separate; border-spacing: 0; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
table.jobs th, table.jobs td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 0.91rem; }
table.jobs th { background: #f7f9fd; color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 0.74rem; letter-spacing: 0.5px; }
table.jobs tbody tr { transition: background 0.12s; }
table.jobs tbody tr:hover { background: #f9fbff; }
table.jobs tr:last-child td { border-bottom: 0; }
table.jobs td a { color: var(--accent); font-weight: 600; text-decoration: none; }
table.jobs td a:hover { text-decoration: underline; }
.tag { display: inline-block; font-size: 0.68rem; font-weight: 700; background: #eef2ff; color: var(--accent-dark); padding: 2px 8px; border-radius: 99px; vertical-align: middle; text-transform: uppercase; letter-spacing: 0.4px; }

/* ---------- Log ---------- */
.logwrap { margin-top: 20px; }
.logwrap summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.logwrap pre {
  background: #131a2b; color: #cfe0ff; padding: 16px; border-radius: 12px; margin-top: 10px;
  overflow: auto; max-height: 360px; font-size: 0.8rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
}

/* ---------- Conferência ---------- */
#confcard { border-left: 4px solid var(--accent); }
.review { font-size: 0.93rem; color: var(--ink); }
.review h4 { margin: 16px 0 6px; color: var(--navy); font-size: 1rem; }
.review h4:first-child { margin-top: 4px; }
.review p { margin: 0 0 8px; }
.review ul { margin: 0 0 12px; padding-left: 20px; }
.review li { margin: 3px 0; }

.foot { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 28px; }
