:root {
    --bg: #f5f8fb;
    --panel: #ffffff;
    --text: #1d2939;
    --muted: #667085;
    --line: #d9e3ef;
    --blue: #1570ef;
    --blue-dark: #175cd3;
    --soft-blue: #e8f1ff;
    --green: #078a5b;
    --red: #d92d20;
    --orange: #b54708;
    --shadow: 0 14px 42px rgba(16, 24, 40, .07);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Sans Serif Regular", "Sans Serif", Arial, Helvetica, sans-serif;
    font-weight: 400;
    color: var(--text);
    background: var(--bg);
    line-height: 1.48;
    font-size: 14px;
}
a { color: inherit; text-decoration: none; }
a, button, input, textarea, select, code, small, span, p, h1, h2, h3, h4, h5, h6, strong, b, label, th, td { font-weight: 400 !important; }
button, input, textarea, select { font-family: inherit; }
code { background: #eef4ff; border: 1px solid #d8e7ff; border-radius: 7px; padding: 2px 6px; font-size: .92em; }

.site-shell { width: min(1240px, calc(100% - 28px)); margin: 0 auto; }
.hero {
    margin-top: 16px;
    padding: 14px 0 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f2f7ff 64%, #eaf2ff 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.topbar, .hero-grid, .jobs-layout, .footer { width: min(1160px, calc(100% - 28px)); margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 4px 0 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border-radius: 12px;
    color: #fff;
    background: var(--blue);
    letter-spacing: -.4px;
}
.brand-title { display: block; font-size: 16px; color: var(--text); }
.brand small { display: block; color: var(--muted); margin-top: -2px; font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; }
.top-actions a { display: inline-flex; align-items: center; border: 1px solid rgba(217,227,239,.9); background: rgba(255,255,255,.66); border-radius: 999px; padding: 7px 12px; }
.top-actions a:hover, .footer a:hover { color: var(--blue); }
.admin-link, .clear { color: var(--blue); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: center; }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(25px, 2.55vw, 34px); line-height: 1.14; letter-spacing: -.45px; margin-bottom: 8px; }
.hero-text { max-width: 660px; color: var(--muted); font-size: 13.5px; margin-bottom: 15px; }
.searchbar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    max-width: 690px;
    box-shadow: 0 8px 26px rgba(21, 112, 239, .08);
}
.searchbar input { flex: 1; border: 0; outline: 0; font-size: 13.5px; padding: 9px 12px; min-width: 0; background: transparent; }
.searchbar input::-webkit-search-cancel-button { cursor: pointer; }
.searchbar button, .primary-btn, .login-card button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    background: var(--blue);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}
.searchbar button:hover, .primary-btn:hover, .login-card button:hover { background: var(--blue-dark); }
.stats-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: rgba(255,255,255,.72);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 5px;
    box-shadow: 0 10px 28px rgba(16,24,40,.045);
}
.stats-card div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: transparent;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
}
.stats-card div + div { border-top: 1px solid rgba(217,227,239,.85); }
.stat-number { font-size: 19px; letter-spacing: -.18px; color: var(--text); }
.stats-card span:last-child { color: var(--muted); font-size: 12.5px; text-align: right; }

.jobs-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; padding: 22px 0; }
.field-sidebar {
    position: sticky;
    top: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(16,24,40,.04);
    padding: 13px;
}
.sidebar-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 10px; color: var(--text); font-size: 14px; }
.field-nav { display: grid; gap: 7px; }
.field-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 13px;
    color: var(--muted);
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.field-link:hover, .field-link.active { background: #eef4ff; border-color: #d8e7ff; color: var(--blue-dark); }
.field-link span { line-height: 1.25; }
.field-link small { background: #fff; color: var(--muted); border: 1px solid var(--line); min-width: 28px; text-align: center; padding: 2px 8px; border-radius: 999px; }
.jobs-panel { min-width: 0; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-title-row h2 { font-size: 19px; margin: 0; letter-spacing: -.1px; }
.hint { color: var(--muted); margin: 0; font-size: 14px; }
.result-pill { display: inline-flex; align-items: center; gap: 4px; background: #eef4ff; border: 1px solid #d8e7ff; color: var(--blue-dark); border-radius: 999px; padding: 7px 12px; font-size: 12.5px; white-space: nowrap; }
.job-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.job-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 17px;
    padding: 15px;
    box-shadow: 0 10px 24px rgba(16,24,40,.045);
    display: flex;
    flex-direction: column;
    min-height: 292px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    outline: none;
}
.job-card:hover, .job-card:focus { transform: translateY(-2px); border-color: rgba(21,112,239,.46); box-shadow: 0 16px 36px rgba(21,112,239,.1); }
.job-card.featured { border-color: rgba(21,112,239,.5); box-shadow: 0 14px 36px rgba(21,112,239,.08); }
.job-card.expired { opacity: .76; }
.job-card[hidden], .filter-empty[hidden] { display: none !important; }
.job-topline { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.section-badge, .featured-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    line-height: 1.3;
}
.section-badge { background: #f2f4f7; color: #344054; }
.featured-badge { background: #fff4e5; color: var(--orange); }
.job-card h3 { font-size: 16px; letter-spacing: -.08px; margin-bottom: 4px; line-height: 1.32; }
.company { color: var(--blue-dark); margin-bottom: 12px; font-size: 14px; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; color: var(--muted); font-size: 12.5px; margin-bottom: 11px; }
.summary { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 5px; }
.tags span, .admin-tags span { background: #f2f4f7; color: #475467; border-radius: 999px; padding: 3px 7px; font-size: 11.5px; line-height: 1.35; }
.job-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.deadline { color: var(--green); font-size: 12.5px; }
.deadline.closed { color: var(--red); }
.card-action { color: var(--blue); font-size: 12.5px; white-space: nowrap; }
.view-btn, .secondary-btn, .danger-btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}
.view-btn:hover, .secondary-btn:hover { border-color: var(--blue); color: var(--blue); }
.danger-btn { color: var(--red); border-color: #fecdca; }
.danger-btn:hover { background: #fff1f0; }
.small { padding: 7px 11px; font-size: 13px; }
.empty-state, .empty-mini {
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 18px;
    padding: 26px;
    text-align: center;
    color: var(--muted);
}
.empty-state h3 { color: var(--text); margin-bottom: 6px; font-size: 17px; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 auto 26px; padding: 13px 16px; color: var(--muted); font-size: 12.5px; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 16px; }
.footer a { color: var(--blue); }

.modal { display: none; position: fixed; inset: 0; z-index: 50; }
.modal[aria-hidden="false"] { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16,24,40,.56); backdrop-filter: blur(6px); }
.modal-panel {
    position: relative;
    width: min(800px, calc(100% - 28px));
    max-height: calc(100vh - 56px);
    overflow: auto;
    margin: 28px auto;
    background: #fff;
    border-radius: 18px;
    padding: 19px;
    box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
.modal-open { overflow: hidden; }
.modal-close { position: absolute; top: 16px; right: 16px; border: 0; background: #f2f4f7; border-radius: 50%; width: 36px; height: 36px; font-size: 24px; line-height: 1; cursor: pointer; }
.modal-header { padding-right: 42px; border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 15px; }
.modal-header h2 { font-size: 21px; margin: 8px 0 5px; }
.modal-header p { color: var(--muted); margin: 0; }
.modal-info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 17px; }
.modal-info-grid div { background: #f8fafc; border: 1px solid var(--line); border-radius: 15px; padding: 11px; }
.info-label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.modal-content h3 { margin: 15px 0 6px; font-size: 14px; }
.modal-content p { color: #475467; white-space: normal; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 15px; margin-top: 15px; }

.admin-body { background: #f3f6fb; }
.admin-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.admin-sidebar { background: #fff; border-right: 1px solid var(--line); padding: 20px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.admin-sidebar nav { display: grid; gap: 8px; margin: 24px 0; }
.admin-nav-link { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 14px; color: var(--muted); }
.admin-nav-link.active, .admin-nav-link:hover { background: #eef4ff; color: var(--blue-dark); }
.admin-nav-link small { background: #fff; border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.admin-note { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 13px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.admin-note strong { color: var(--text); }
.logout { display: block; color: var(--red); margin-top: 18px; }
.admin-main { padding: 28px; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.admin-header h1 { font-size: 24px; margin-bottom: 6px; }
.admin-header p { color: var(--muted); margin-bottom: 0; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 18px; align-items: start; }
.admin-panel, .login-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 20px; }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-title-row h2 { margin: 0; font-size: 18px; }
.admin-form { display: grid; gap: 13px; }
.admin-form label, .login-card label { display: grid; gap: 6px; font-size: 13px; color: #344054; }
.admin-form input, .admin-form select, .admin-form textarea, .login-card input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 11px 12px;
    font: inherit;
    outline: none;
    background: #fff;
}
.admin-form textarea { resize: vertical; }
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus, .login-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(21,112,239,.08); }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkbox { display: flex !important; align-items: center; gap: 8px !important; padding-top: 24px; }
.checkbox input { width: auto; }
.check-row { align-items: end; }
.alert { border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }
.alert.success { background: #ecfdf3; color: #027a48; border: 1px solid #abefc6; }
.alert.error { background: #fff1f3; color: #c01048; border: 1px solid #fecdd6; }
.alert.info { background: #eff8ff; color: #175cd3; border: 1px solid #b2ddff; }
.admin-job-list { display: grid; gap: 10px; }
.admin-job-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; }
.admin-job-item p { margin: 5px 0 8px; color: var(--muted); font-size: 13px; }
.admin-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.admin-tags .status.published { color: var(--green); background: #ecfdf3; }
.admin-tags .status.draft { color: var(--orange); background: #fff7ed; }
.admin-item-actions { display: flex; align-items: center; gap: 7px; }
.admin-item-actions form { margin: 0; }
.login-card { width: min(430px, calc(100% - 32px)); margin: 8vh auto 0; }
.login-brand { margin-bottom: 18px; }
.login-card h1 { font-size: 23px; margin-bottom: 14px; }
.login-card form { display: grid; gap: 14px; }
.login-card button { width: 100%; }

@media (max-width: 1080px) {
    .hero-grid { grid-template-columns: 1fr; }
    .stats-card { grid-template-columns: repeat(3, 1fr); }
    .stats-card div { display: block; border-top: 0; }
    .stats-card div + div { border-left: 1px solid rgba(217,227,239,.85); }
    .stats-card span:last-child { display: block; text-align: left; }
    .jobs-layout { grid-template-columns: 230px minmax(0, 1fr); }
    .job-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-grid { grid-template-columns: 1fr; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; }
}
@media (max-width: 780px) {
    .site-shell { width: min(100% - 18px, 1240px); }
    .topbar, .hero-grid, .jobs-layout, .footer { width: min(100% - 22px, 1160px); }
    .topbar, .section-title-row, .footer, .admin-header { align-items: flex-start; flex-direction: column; }
    .jobs-layout { grid-template-columns: 1fr; padding-top: 18px; }
    .field-sidebar { position: static; }
    .field-nav { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 2px; }
    .field-link { min-width: max-content; }
    .stats-card, .modal-info-grid, .two-cols { grid-template-columns: 1fr; }
    .stats-card div + div { border-left: 0; border-top: 1px solid rgba(217,227,239,.85); }
    .job-grid { grid-template-columns: 1fr; }
    .searchbar { border-radius: 16px; }
    .modal-panel { padding: 16px; margin: 14px auto; max-height: calc(100vh - 28px); }
    .admin-main { padding: 16px; }
}
@media (max-width: 480px) {
    .stats-card, .modal-info-grid, .two-cols, .meta-grid { grid-template-columns: 1fr; }
    .stats-card div + div { border-left: 0; border-top: 1px solid rgba(217,227,239,.85); }
    h1 { font-size: 25px; }
}
