@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800;900&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #FBF6EC;
  --bg-raised: #FFFFFF;
  --sidebar: #FDF2E4;
  --sidebar-ink: #5B4632;
  --sidebar-ink-dim: #A0876A;
  --sidebar-active: #E2662A;
  --ink: #2B2118;
  --ink-soft: #7C6A54;
  --line: #EFE2CB;
  --primary: #E2662A;
  --primary-ink: #FFFFFF;
  --primary-soft: #FCE9D8;
  --accent: #147F7D;
  --accent-soft: #E2F3F1;
  --ok: #2F8F5B;
  --ok-soft: #E7F5EC;
  --warn: #C77C1E;
  --warn-soft: #FBEFD8;
  --f2: #7A4FB0;
  --f2-soft: #F1E9FB;
  --radius: 14px;
}
/* This dashboard theme is intentionally always-light: no dark-mode variant,
   so it never flips to dark just because the OS/browser prefers it. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: 'Work Sans', -apple-system, sans-serif; font-size: 15.5px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: 'Archivo', -apple-system, sans-serif; font-weight: 800; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.mono { font-family: ui-monospace, 'SF Mono', Consolas, monospace; }

/* ---------- login screen ---------- */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 20px; }
.login-card { width: 100%; max-width: 360px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
.login-card label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin: 14px 0 6px; }
.login-card input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; font-family: inherit; background: var(--bg); color: var(--ink); }
.login-card input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.login-card select {
  width: 100%; padding: 10px 34px 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; font-family: inherit; background-color: var(--bg); color: var(--ink);
  appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237C6A54' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.login-card select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.login-error { margin-top: 14px; font-size: 12.5px; color: #B3261E; background: #FBE9E7; border-radius: 8px; padding: 8px 10px; }

.password-field { position: relative; }
.password-field input { padding-right: 52px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); padding: 4px 6px; }
.password-toggle:hover { color: var(--primary); }

.lang-switch { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 3px; }
.lang-switch button { border: none; background: transparent; color: var(--ink-soft); font-weight: 700; font-size: 11.5px; padding: 4px 12px; border-radius: 20px; cursor: pointer; letter-spacing: 0.03em; }
.lang-switch button.active { background: var(--primary); color: var(--primary-ink); }

/* ================= APP SHELL ================= */
.app-shell { display: grid; grid-template-columns: 258px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-ink); padding: 0 0 24px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 20px 0 0; font-family: 'Archivo', sans-serif; font-size: 18px; font-weight: 900; color: var(--ink); background: var(--bg-raised); border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.sidebar-brand .brand-panel { display: flex; align-items: center; gap: 6px; height: 100%; background: #FFFFFF; padding: 0 20px 0 16px; clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); }
.sidebar-brand .brand-icon { height: 32px; width: auto; display: inline-block; }
.sidebar-brand .brand-wordmark { height: 18px; width: auto; display: inline-block; }
.sidebar-brand .role-pill { margin-left: auto; font-size: 13px; font-weight: 700; background: var(--primary-soft); color: var(--primary); padding: 3px 10px; border-radius: 6px; }
.sidebar-close { display: none; width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent; color: var(--ink-soft); font-size: 16px; cursor: pointer; margin-left: 6px; }
.sidebar-close:hover { color: var(--ink); }
.sidebar-nav { flex: 1; overflow-y: auto; padding-bottom: 24px; scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.15) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 8px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }
.sidebar-group-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sidebar-ink-dim); padding: 16px 20px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 20px; font-size: 13.8px; font-weight: 500; cursor: pointer; border-left: 3px solid transparent; color: var(--sidebar-ink); }
.nav-item:hover { background: rgba(0,0,0,0.035); color: var(--ink); }
.nav-item.active { background: var(--primary-soft); border-left-color: var(--primary); color: var(--primary); font-weight: 700; }
.nav-item .ico { width: 16px; text-align: center; font-size: 14px; }
.nav-item .lock-badge { margin-left: auto; font-size: 9.5px; font-weight: 800; background: var(--f2-soft); color: var(--f2); padding: 1px 6px; border-radius: 3px; }
.nav-item.locked { opacity: 0.6; cursor: not-allowed; }
.sidebar-footer { margin-top: auto; padding: 14px 20px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--sidebar-ink-dim); }
.sidebar-footer a { color: var(--sidebar-ink); text-decoration: underline; }

.main { min-width: 0; display: flex; flex-direction: column; }
.sidebar-toggle { display: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-raised); flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; padding: 0; }
.sidebar-toggle span { width: 16px; height: 2px; background: var(--ink); border-radius: 2px; }
.sidebar-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(43,33,24,0.45); z-index: 55; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s; }
.topbar { height: 64px; background: var(--bg-raised); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 28px; gap: 14px; position: sticky; top: 0; z-index: 5; }
.topbar .view-title { font-family: 'Archivo', sans-serif; font-size: 18px; font-weight: 800; flex: 1; min-width: 0; }
.topbar .icon-btn { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--bg-raised); font-size: 15px; cursor: pointer; }
.topbar .avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-soft); background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }

.content { padding: 28px 28px 60px; max-width: 1180px; }

@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; height: auto; width: 258px; z-index: 60;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 12px 0 32px rgba(43,33,24,0.18);
  }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .app-shell.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
  .sidebar-toggle { display: flex; }
  .sidebar-close { display: inline-flex; align-items: center; justify-content: center; }

  .topbar { padding: 0 14px; gap: 8px; }
  .topbar .view-title {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 15px;
  }
  .topbar .avatar { width: 32px; height: 32px; flex-shrink: 0; }
  .topbar #logout-btn { padding: 6px 10px !important; font-size: 11.5px !important; flex-shrink: 0; }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .sidebar, .sidebar-backdrop { transition: none !important; }
}

.view { display: none; }
.view.active { display: block; }
.view-header { margin-bottom: 22px; }
.view-header .eyebrow-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.view-header .eyebrow-row h2 { font-size: 24px; }
.view-header p.sub { color: var(--ink-soft); font-size: 13.5px; margin: 4px 0 0; }

.mockup-tag { font-size: 11.5px; font-weight: 400; font-style: italic; color: var(--ink-soft); }

.category-chip { padding: 8px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--ink); font-size: 13px; font-family: inherit; cursor: pointer; }
.category-chip.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); font-weight: 700; }

.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr 1fr; } }

.card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card h3 { font-family: 'Work Sans', sans-serif; font-size: 13px; color: var(--ink-soft); font-weight: 700; margin-bottom: 8px; }
.card .stat { font-family: 'Archivo', sans-serif; font-size: 27px; font-weight: 800; }
.card .stat-note { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

.panel { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-head { padding: 15px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 15px; }
.panel-head .cta { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 7px 14px; border-radius: 8px; cursor: pointer; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 12px 20px; border-bottom: 1px solid var(--line); }
th { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); background: var(--bg); font-weight: 700; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--primary-soft); }
@media (max-width: 768px) {
  .table-scroll table { min-width: 560px; }
}

/* jobs.js's "My jobs" card header (title / status select / view-applicants) */
.job-row { display: flex; align-items: center; gap: 16px; }
.job-row-title { flex: 1; min-width: 0; font-weight: 700; }
.job-row-status { flex-shrink: 0; width: 190px; }
.job-row-viewbtn { flex-shrink: 0; width: 160px; text-align: right; }
@media (max-width: 768px) {
  .job-row { flex-wrap: wrap; }
  .job-row-status, .job-row-viewbtn { width: auto; }
  .job-row-viewbtn { margin-left: auto; }
}

.pill { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; display: inline-block; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.pend { background: var(--warn-soft); color: var(--warn); }
.pill.new { background: var(--accent-soft); color: var(--accent); }
.pill.muted { background: var(--bg); color: var(--ink-soft); }

.locked-panel { border: 2px dashed var(--line); border-radius: var(--radius); padding: 40px 28px; text-align: center; color: var(--ink-soft); }
.locked-panel h3 { color: var(--ink); font-size: 17px; margin-bottom: 6px; font-family: 'Archivo', sans-serif; }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.p1 { background: var(--accent-soft); color: var(--accent); }
.tag.p15 { background: var(--warn-soft); color: var(--warn); }
.tag.p2 { background: var(--f2-soft); color: var(--f2); }

.btn { display: inline-block; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 13.5px; padding: 10px 18px; border-radius: 9px; cursor: pointer; border: none; }
.btn.ghost { background: transparent; color: var(--primary); border: 2px solid var(--primary); }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 5px; }
.form-row input, .form-row select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; background: var(--bg-raised); color: var(--ink); font-family: inherit; }

.hero-banner { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; }
.hero-banner img { width: 100%; height: 150px; object-fit: cover; display: block; }
.hero-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(36,26,16,0.78), rgba(36,26,16,0.15)); }
.hero-banner .hb-text { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: 0 26px; color: #fff; }
.hero-banner .hb-text strong { font-family: 'Archivo', sans-serif; font-size: 19px; }
.hero-banner .hb-text span { font-size: 13px; color: #F0E2CC; }

/* ---------- public site header/footer (shared with empresa.html) ---------- */
.pub-header { display: flex; align-items: stretch; height: 76px; padding: 0 40px 0 0; border-bottom: 1px solid var(--line); background: var(--bg-raised); position: relative; }
.pub-header .brand-panel { display: flex; align-items: center; background: #FFFFFF; padding: 0 46px 0 40px; margin-right: 14px; clip-path: polygon(0 0, 100% 0, calc(100% - 30px) 100%, 0 100%); }
.pub-header .brand { font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 20px; display: flex; align-items: center; gap: 6px; }
.pub-header .brand .brand-icon { height: 40px; width: auto; display: inline-block; }
.pub-header .brand .brand-wordmark { height: 22px; width: auto; display: inline-block; }
.pub-header nav { display: flex; align-items: center; gap: 22px; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); }
.pub-header .spacer { margin-left: auto; display: flex; gap: 14px; align-items: center; }

/* ---------- mobile nav (pub-header) ---------- */
.pub-nav-panel { display: flex; align-items: center; flex: 1; min-width: 0; }
.menu-toggle {
  display: none; align-self: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-raised); flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; cursor: pointer; padding: 0;
}
.menu-toggle span { width: 17px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@media (max-width: 768px) {
  .menu-toggle { display: flex; margin-left: auto; }
  .pub-nav-panel {
    display: block; position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    background: var(--bg-raised); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px rgba(43,33,24,0.14);
    padding: 8px 24px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .18s ease, opacity .18s ease, visibility .18s;
  }
  .pub-nav-panel.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .pub-nav-panel nav { flex-direction: column; align-items: stretch; gap: 0; }
  .pub-nav-panel nav a { padding: 13px 2px; font-size: 15px; border-bottom: 1px solid var(--line); }
  .pub-nav-panel nav a:last-child { border-bottom: none; }
  .pub-nav-panel .spacer { flex-direction: column; align-items: stretch; margin: 14px 0 0; gap: 10px; }
  .pub-nav-panel .spacer .lang-switch { align-self: flex-start; }
  .pub-nav-panel .spacer .btn { width: 100%; text-align: center; }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .pub-nav-panel, .menu-toggle span { transition: none !important; }
}

.section { max-width: 1120px; margin: 0 auto; padding: 52px 24px; }
.section h2 { font-size: 26px; margin-bottom: 20px; }
.section .kicker { color: var(--primary); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; display: block; }

/* ---------- Blog cards (homepage preview, blog.html) ---------- */
.entry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .entry-grid { grid-template-columns: 1fr; } }
.entry-card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; color: inherit; text-decoration: none; }
.entry-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.entry-card .entry-body { padding: 16px 18px; }
.entry-card h3 { font-size: 15px; margin: 0 0 6px; }
.entry-card p { color: var(--ink-soft); font-size: 13px; margin: 0 0 12px; }
.pill { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; display: inline-block; background: var(--accent-soft); color: var(--accent); }

/* ---------- Blog post body (blog-post.html) ---------- */
.post-body { font-size: 15.5px; line-height: 1.7; color: var(--ink); }
.post-body h2 { font-size: 21px; margin: 32px 0 12px; }
.post-body h3 { font-size: 17px; margin: 24px 0 10px; }
.post-body p { margin: 0 0 16px; }
.post-body ul, .post-body ol { margin: 0 0 16px; padding-left: 22px; }
.post-body li { margin-bottom: 6px; }
.post-body a { color: var(--primary); }
.post-body img { max-width: 100%; border-radius: var(--radius); margin: 8px 0 16px; }

footer.pub-footer { border-top: 1px solid var(--line); margin-top: 10px; padding: 30px 40px; font-size: 12.5px; color: var(--ink-soft); }

/* ---------- FAQ + contact grid (support page) ---------- */
.support-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 44px; margin-top: 36px; align-items: flex-start; }
@media (max-width: 768px) {
  .support-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- FAQ accordion (support page) ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 16px 0; font-weight: 700; font-size: 14.5px; font-family: inherit; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
.faq-a { display: none; padding: 0 0 16px; color: var(--ink-soft); font-size: 13.5px; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-q .chev { flex-shrink: 0; transition: transform .15s ease; color: var(--ink-soft); }

/* ---------- Contact / support form ---------- */
.login-card textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; font-family: inherit; background: var(--bg); color: var(--ink); resize: vertical; }
.login-card textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.form-success { margin-top: 14px; font-size: 12.5px; color: var(--ok); background: var(--ok-soft); border-radius: 8px; padding: 8px 10px; }
