:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #16a34a;
    --danger: #dc2626;
    --bg: #f5f7fb;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', 'Noto Sans Thai', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo-img {
    height: 32px;
    width: auto;
    display: block;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav a { color: var(--text); font-weight: 500; }
.nav a:hover { color: var(--primary); text-decoration: none; }
.nav a.btn-primary { color: #fff; }
.nav a.btn-primary:hover { color: #fff; }

.nav .badge-role {
    background: #eef2ff;
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: #eef2ff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--accent); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-cancel {
    background: #fff;
    color: #000;
    border: 1px solid var(--border);
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.btn-cancel:hover { background: #f8fafc; }
.cancelled-label { color: var(--danger); font-weight: 600; font-size: 13px; }

/* Hero / search */
.hero {
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(79, 70, 229, 0.45)),
        url('../images/banner_bg.jpg') center 15% / cover no-repeat;
    color: #fff;
    padding: 48px 0 40px;
}
.hero h1 { margin: 0 0 8px; font-size: 30px; }
.hero p { margin: 0 0 24px; opacity: .9; }

.features-bar {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-top: -30px;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.feature-item { display: flex; align-items: flex-start; gap: 12px; }
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.feature-icon-blue { background: var(--primary); }
.feature-icon-purple { background: #7c3aed; }
.feature-icon-green { background: var(--accent); }
.feature-icon-orange { background: #f59e0b; }
.feature-item h3 { margin: 0 0 4px; font-size: 15px; }
.feature-item p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.4; }

/* Landing page hero */
.landing-hero {
    background:
        linear-gradient(to right, rgba(255,255,255,0.94) 0%, rgba(255,255,255,0.75) 40%, rgba(255,255,255,0.25) 75%),
        url('../images/LandingPage_BG.png') center center / cover no-repeat;
}
.landing-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 72px 16px 56px;
}
.landing-wide { max-width: 1600px; }
.hero-badge {
    display: inline-block;
    background: #eef2ff;
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
}
.landing-hero h1 {
    margin: 0 0 18px;
    font-size: 42px;
    line-height: 1.25;
    color: #0f172a;
    max-width: 600px;
}
.landing-hero h1 .accent { color: var(--primary); }
.landing-hero .lead {
    margin: 0 0 28px;
    font-size: 20px;
    color: var(--text-muted);
    max-width: 520px;
}
.section-header { display: flex; justify-content: space-between; align-items: center; margin: 40px 0 20px; flex-wrap: wrap; gap: 10px; }
.section-header h2 { margin: 0; font-size: 22px; }
.urgent-heading { color: var(--accent); }
.hot-heading { color: var(--danger); }
.section-link { font-size: 14px; font-weight: 600; }

.latest-jobs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; align-items: stretch; }
.company-jobs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; align-items: stretch; }
.company-jobs-grid .card { margin-bottom: 0; height: 100%; }
.latest-jobs-grid .card { margin-bottom: 0; height: 100%; }

.job-compact-card { padding: 18px; display: flex; flex-direction: column; }
.job-compact-top { display: flex; align-items: flex-start; gap: 10px; }
.job-compact-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    font-weight: 700;
    color: var(--text-muted);
}
.job-compact-logo img { width: 100%; height: 100%; object-fit: contain; }
.job-compact-title { flex: 1; min-width: 0; }
.job-compact-title h3 { margin: 0; font-size: 15px; line-height: 1.3; }
.job-compact-title h3 a { color: var(--primary); font-weight: 700; }
.job-compact-title .company { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.job-compact-title .salary { color: var(--accent); font-weight: 700; font-size: 13px; margin-top: 4px; }
.job-compact-actions { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.job-compact-actions .btn { padding: 5px 14px; font-size: 12.5px; border-radius: 20px; }
.job-compact-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}
.job-compact-bottom .tag { font-size: 11.5px; padding: 3px 10px; }
.job-compact-bottom .post-date-inline { margin-left: auto; white-space: nowrap; }

.favorite-heart-form { flex-shrink: 0; display: flex; align-items: flex-start; }
.favorite-heart {
    background: none;
    border: none;
    padding: 0;
    font-size: 22px;
    line-height: 1;
    color: #000;
    cursor: pointer;
    flex-shrink: 0;
}
a.favorite-heart { text-decoration: none; display: inline-block; }
.favorite-heart-disabled { color: #000; cursor: default; }
.favorite-heart.is-saved { color: var(--danger); }

.link-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
}
.link-button:hover { color: var(--primary-dark); }

.promo-banner-wrap { margin: 40px 0; }

.promo-banner {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}
.promo-icon { flex-shrink: 0; display: block; }
.promo-icon img { width: 120px; height: 120px; object-fit: contain; display: block; }
.promo-text { flex: 1; min-width: 240px; }
.promo-text h2 { margin: 0 0 8px; font-size: 33px; line-height: 1.35; }
.promo-text h2 .accent { color: var(--primary); }
.promo-text p { margin: 0; color: var(--text-muted); font-size: 18px; }

/* Landing footer */
.site-footer-landing {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 50px;
    padding: 44px 0 20px;
}
.footer-columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer-col h4 { margin: 0 0 14px; font-size: 15px; }
.footer-col span, .footer-col a { display: block; color: var(--text-muted); font-size: 13.5px; margin-bottom: 10px; }
.footer-col a:hover { color: var(--primary); }
.footer-col .footer-office-heading { margin: 36px 0 8px; font-size: 15px; }
.footer-office-address { margin: 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.6; }
.contact-icons { display: flex; flex-wrap: nowrap; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.contact-icon-img { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.footer-bottom { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); }

.search-box {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
}
.search-box input, .search-box select {
    flex: 1;
    min-width: 160px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
}
.search-box button { flex-shrink: 0; }
.search-box-inline { margin-bottom: 32px; }

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.job-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.job-card h3 { margin: 0 0 6px; font-size: 18px; }
.job-card .company { color: var(--text-muted); font-size: 14px; margin-bottom: 8px; }
.job-card .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
.job-card-left { display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 240px; }
.company-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    flex-shrink: 0;
}
.job-detail { position: relative; }
.job-detail-company { display: flex; align-items: flex-start; gap: 16px; }
.job-detail-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin: 10px 0 16px; }
.job-detail-overview { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.job-detail-overview .job-detail-info { flex: 1; min-width: 280px; }
.job-detail-stats {
    background: #f1f5f9;
    border-radius: var(--radius);
    padding: 16px 20px;
    min-width: 260px;
    margin-right: 24px;
}
.job-detail-stats p { margin: 0 0 10px; font-size: 16px; }
.job-detail-stats p:last-child { margin-bottom: 0; }
.job-detail-stats span { font-weight: 600; color: var(--text-muted); }

.job-actions-row { display: flex; justify-content: center; gap: 32px; flex-shrink: 0; min-width: 260px; margin-right: 24px; }
.job-action-btn {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 0;
    font-family: inherit; font-size: 13px; color: var(--text-muted);
}
.job-action-btn svg { width: 20px; height: 20px; stroke: var(--text-muted); fill: none; stroke-width: 2; }
.job-action-btn.is-saved, .job-action-btn.is-saved svg { color: var(--danger); stroke: var(--danger); fill: var(--danger); }
a.job-action-btn { text-decoration: none; }
.job-action-form { display: flex; }

.modal-overlay {
    position: fixed; inset: 0; background: rgba(20, 20, 20, .55);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 16px;
}
.modal-overlay[hidden] { display: none; }
.modal-box { background: #fff; border-radius: var(--radius); padding: 26px; max-width: 480px; width: 100%; position: relative; }
.modal-box h3 { margin: 0 0 4px; }
.modal-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none;
    font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-muted);
}
.share-link-row { display: flex; gap: 10px; margin: 18px 0 22px; }
.share-link-row input {
    flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 13.5px; color: var(--text-muted);
}
.share-link-row .btn { white-space: nowrap; flex-shrink: 0; }
.share-icons-row { display: flex; gap: 16px; }
.share-icon-btn {
    background: none; border: none; padding: 0; cursor: pointer;
    line-height: 0; border-radius: 50%; transition: transform .15s;
}
.share-icon-btn:hover { transform: scale(1.08); }
.share-icons-row img { width: 42px; height: 42px; border-radius: 50%; display: block; }

.modal-box h3.report-modal-title { color: var(--primary); text-align: center; font-size: 22px; margin: 0 0 32px; }
#reportIssueModal .form-group label { font-size: 15px; }
.report-type-options { display: flex; gap: 24px; margin-top: 6px; }
.report-type-options label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 15px; cursor: pointer; }
.report-field-row { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.report-field-row + .form-group { margin-top: 22px; }
.report-field-label { font-weight: 600; color: var(--text); }
.report-modal-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; }
.report-modal-actions .btn { min-width: 120px; text-align: center; }

.ad-modal-box { position: relative; width: 1000px; max-width: 92vw; }
.ad-modal-box img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.ad-modal-close {
    position: absolute; top: -14px; right: -14px; width: 34px; height: 34px;
    border-radius: 50%; background: #fff; border: none; cursor: pointer;
    font-size: 20px; line-height: 1; color: var(--text); box-shadow: var(--shadow);
}
.job-detail-logo {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    border: 1px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
    object-fit: contain;
    background: #fff;
}
.job-detail-company-name { margin: 0 0 4px; font-size: 20px; }
.job-detail-company-about { margin: 0; color: var(--text-muted); white-space: pre-line; }
.job-detail-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.job-detail-info { display: grid; grid-template-columns: 170px 1fr; row-gap: 10px; column-gap: 16px; margin: 0; padding-left: 32px; }
.job-detail-info dt { margin: 0; font-weight: 600; color: var(--text-muted); }
.job-detail-info dd { margin: 0; }
.job-detail-title { font-size: 22px; color: var(--primary); font-weight: 700; }
.job-detail-text { white-space: pre-line; padding-left: 24px; }

/* Policy / legal content pages */
.policy-content h2 { font-size: 18px; margin-top: 30px; }
.policy-content .toc { list-style-type: none; padding-left: 0; margin-bottom: 30px; }
.policy-content .toc li { margin-bottom: 5px; }
.policy-content .indent { margin-left: 20px; }
.policy-content p { margin-bottom: 10px; }
.policy-content .no-bullet { list-style-type: none; padding-left: 0; margin-top: 5px; margin-bottom: 10px; }
.policy-content .no-bullet li { margin-bottom: 3px; }
.policy-content table { font-size: 14px; }
.policy-content .toc-list { padding-left: 24px; margin-bottom: 24px; }
.policy-content .toc-list li { color: var(--primary); margin-bottom: 8px; font-weight: 600; }
.policy-content .content-list { padding-left: 24px; margin-bottom: 20px; }
.policy-content .content-list li { color: var(--text); margin-bottom: 10px; }

.faq-container { margin-top: 10px; border-bottom: 1px solid var(--border); }
.faq-item { border-top: 1px solid var(--border); }
.faq-item summary {
    padding: 14px 8px; cursor: pointer; list-style: none;
    font-weight: 600; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: "\25BC"; font-size: 11px; margin-right: 10px;
    color: var(--text-muted); display: inline-block;
}
.faq-item[open] { background: #f8fafc; border-top: 2px solid var(--primary); }
.faq-item[open] summary { color: var(--primary); }
.faq-item[open] summary::before { content: "\25B2"; color: var(--primary); }
.faq-answer { padding: 0 16px 16px 30px; }
.faq-answer p { margin: 0; }

.company-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-muted);
    background: #f1f5f9;
}
.tag {
    display: inline-block;
    background: #f1f5f9;
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
}
.tag-status-approved { background: #dcfce7; color: #15803d; }
.tag-status-pending { background: #fef9c3; color: #a16207; }
.tag-status-rejected, .tag-status-closed { background: #fee2e2; color: #b91c1c; }
.tag-status-reviewed { background: #dbeafe; color: #1d4ed8; }
.tag-status-accepted { background: #dcfce7; color: #15803d; }

.salary { font-weight: 700; color: var(--accent); }
.post-date { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 4px 0; }
.checkbox-inline { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 14px; }
.checkbox-inline input { width: auto; }
.auth-card { max-width: 440px; margin: 48px auto; }
.auth-card h2 { margin-top: 0; }

/* Jobseeker profile form */
.required-mark { color: var(--danger); }
.profile-section-card { margin-bottom: 20px; }
.profile-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.profile-section-icon {
    width: 32px; height: 32px; border-radius: 50%; background: var(--primary);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-section-icon svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; }
.profile-section-header h3 { margin: 0; font-size: 17px; font-weight: 700; }

.profile-photo-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 24px; }
.profile-photo-circle {
    width: 96px; height: 96px; border-radius: 50%; background: #e5e7eb;
    display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.profile-photo-circle img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-placeholder { width: 48px; height: 48px; stroke: #9ca3af; fill: none; stroke-width: 2; }
.profile-photo-btn { cursor: pointer; }

.birth-date-row { display: flex; gap: 10px; }
.birth-date-row select { flex: 1; }

.repeat-row { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.repeat-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.repeat-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.repeat-row-header strong { font-size: 15px; }
.link-remove { background: none; border: none; color: var(--danger); font-size: 14px; cursor: pointer; padding: 0; }
.repeat-add-btn { margin-top: 4px; }

.exp-to-label { text-align: center; color: var(--text-muted); font-size: 14px; margin: -6px 0 16px; }
.label-with-check { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.label-with-check label { margin-bottom: 0; }
.form-group-half { max-width: 380px; }
.no-exp-check { margin-bottom: 20px; }

.document-upload-box { background: #f8fafc; border-radius: var(--radius); padding: 36px 20px; text-align: center; }
.document-upload-btn { display: inline-flex; align-items: center; gap: 8px; }
.document-upload-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.document-upload-hint { margin: 14px 0 0; font-size: 13px; color: var(--text-muted); }
.document-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.document-list-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; background: #f8fafc; border-radius: 6px; font-size: 14px; }
.document-list-item a { word-break: break-all; }

.profile-accept-row { text-align: center; margin-top: 20px; background: #f8fafc; border-radius: var(--radius); padding: 16px; }
.profile-accept-row .checkbox-inline { justify-content: center; font-weight: 600; }
.profile-save-row { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.skills-view-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 0; font-size: 14px; }

.skills-table th { text-align: center; }
.skills-table td { padding: 14px; border-bottom: 1px solid var(--border); vertical-align: top; font-weight: 600; font-size: 14px; }
.skills-table tr:last-child td { border-bottom: none; }
.skills-table td:first-child { width: 40%; }
.skills-table td:last-child { width: 60%; }
.skills-table td.skills-freeform { width: 100%; }
.skills-lang-other-input { margin-top: 0; max-width: 280px; font-weight: 400; }
.skills-clear-row { text-align: right; margin-top: 14px; }
.skills-text-input { margin-top: 8px; font-weight: 400; width: 100%; }
.skills-rating-radios { display: flex; flex-wrap: nowrap; gap: 8px 14px; font-weight: 400; white-space: nowrap; }

.skills-lang-block { margin-bottom: 18px; }
.skills-lang-block:last-of-type { margin-bottom: 0; }
.skills-lang-toggle { font-weight: 700; }
.skills-lang-toggle-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.skills-lang-toggle-row .skills-lang-toggle { margin: 0; }
.skills-subskill-list { margin-top: 10px; padding-left: 26px; display: flex; flex-direction: column; gap: 10px; }
.skills-subskill-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-weight: 400; }
.skills-subskill-label { min-width: 160px; }
.skills-multi-block { margin-top: 18px; }
.skills-multi-heading { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.skills-multi-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.skills-multi-row .skills-text-input { margin-top: 0; flex: 1; min-width: 200px; width: auto; }
.skills-multi-row .skills-rating-radios,
.skills-subskill-row .skills-rating-radios { flex-shrink: 0; }

/* Category management */
.category-block summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-weight: 700;
    font-size: 16px;
}
.category-block summary::-webkit-details-marker { display: none; }
.category-block summary form { margin: 0; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: #dcfce7; color: #15803d; }
.alert-error { background: #fee2e2; color: #b91c1c; }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { background: #f8fafc; font-weight: 600; color: var(--text-muted); }
tr:last-child td { border-bottom: none; }

/* Dashboard layout */
.dashboard {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    padding: 24px 0 48px;
}
.sidebar { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; height: fit-content; }
.sidebar a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); font-weight: 500; margin-bottom: 4px; }
.sidebar a:hover, .sidebar a.active { background: #eef2ff; color: var(--primary); text-decoration: none; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; text-align: center; }
.stat-card .num { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-card .label { font-size: 13px; color: var(--text-muted); }

.page-title { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 16px; flex-wrap: wrap; gap: 10px; }
.page-title h1 { margin: 0; font-size: 24px; display: flex; align-items: center; gap: 8px; }
.icon-search { color: var(--primary); flex-shrink: 0; }

.page-view-badge { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--surface); }
.page-view-icon { display: flex; align-items: center; justify-content: center; width: 40px; background: #f1f5f9; color: var(--text-muted); border-right: 1px solid var(--border); }
.page-view-icon svg { width: 18px; height: 18px; }
.page-view-count { padding: 0 16px; display: flex; align-items: center; font-weight: 600; color: var(--text); min-width: 32px; justify-content: center; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 24px 0 8px; }
.page-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 10px; border-radius: 8px;
    border: 1px solid var(--border); text-decoration: none;
    color: var(--text); font-size: 14px; background: var(--surface);
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link.disabled { color: var(--text-muted); background: #f1f5f9; cursor: default; }
.page-ellipsis { padding: 0 4px; color: var(--text-muted); }

/* Home layout: 3/4 main content, 1/4 sidebar */
.home-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 24px;
    align-items: start;
}
.home-main { min-width: 0; }
.home-sidebar { min-width: 0; }
.region-stats { padding: 20px; }
.region-stats-title { margin: 0 0 16px; font-size: 17px; }
.region-stats-group { margin-bottom: 16px; }
.region-stats-group:last-child { margin-bottom: 0; }
.region-stats-region {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}
.region-stats-list { list-style: none; margin: 0; padding: 0; }
.region-stats-list li { margin-bottom: 6px; }
.region-stats-list a {
    color: var(--text);
    font-size: 13.5px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.region-stats-list a:hover { color: var(--primary); text-decoration: none; }
.region-stats-list .job-count { color: var(--danger); }

/* Footer */
.site-footer {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 40px;
}

/* Tablet */
@media (max-width: 1100px) {
    .latest-jobs-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
        border-bottom: 1px solid var(--border);
        gap: 12px;
    }
    .nav.open { display: flex; }
    .dashboard { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }
    .sidebar { display: flex; overflow-x: auto; gap: 6px; padding: 10px; }
    .sidebar a { white-space: nowrap; margin-bottom: 0; }
    .hero h1 { font-size: 24px; }
    .search-box { flex-direction: column; }
    .logo-img { height: 26px; }
    .home-layout { grid-template-columns: 1fr; }
    .features-bar { grid-template-columns: 1fr; margin-top: 16px; gap: 16px; }
    .landing-hero h1 { font-size: 30px; }
    .landing-hero .lead { font-size: 16px; }
    .latest-jobs-grid { grid-template-columns: 1fr; }
    .company-jobs-grid { grid-template-columns: 1fr; }
    .footer-columns { grid-template-columns: 1fr 1fr; }
    .promo-banner { flex-direction: column; text-align: center; }
}
