
* {
    box-sizing: border-box;
}

:root {
    --bg: #f3f1eb;
    --panel: #fff;
    --text: #20221f;
    --muted: #73766f;
    --border: #dcdcd5;
    --accent: #e8b83f;
    --job: #26384d;
    --task: #b77800;
    --service: #527348;
    --red: #a64242;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    height: 100%;
    display: grid;
    grid-template-rows:77px auto 80px;
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

button, input, select, textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.space {
    flex: 1;
}

header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 35px;
    gap: 25px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -1px;
    cursor: pointer;
}

.logo span {
    color: var(--accent);
}

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

nav a {
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 6px;
    padding: 12px 18px;
    font-weight: bold;
    text-decoration: none;
}

.btn-dark {
    background: var(--text);
    color: #fff;
}

.btn-yellow {
    background: var(--accent);
    color: #171717;
}

.btn-light {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-red {
    background: var(--red);
    color: #fff;
}

.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.wrap {
    max-width: 1400px;
    margin: auto;
    padding: 35px;
}

h1:first-letter, h2:first-letter, h3:first-letter, h4:first-letter {
    text-transform: uppercase;
}

.hero {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 50px 35px;
}

.hero-inner {
    max-width: 1400px;
    margin: auto;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 60px);
    letter-spacing: -2.5px;
    margin: 0 0 10px;
}

.hero p {
    font-size: 18px;
    color: var(--muted);
    margin: 0 0 28px;
}

.search {
    display: flex;
    max-width: 850px;
}

.search input {
    flex: 1;
    height: 54px;
    border: 1px solid var(--border);
    border-right: 0;
    border-radius: 7px 0 0 7px;
    padding: 0 18px;
    outline: none;
}

.search button {
    width: 110px;
    border: 0;
    background: var(--accent);
    font-weight: bold;
    border-radius: 0 7px 7px 0;
}

.list-layout {
    max-width: 1470px;
    margin: auto;
    display: grid;
    grid-template-columns:260px 1fr;
}

.filters {
    padding: 30px 25px;
    border-right: 1px solid var(--border);
}

.filter-head {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.filter-head h3 {
    font-size: 13px;
    letter-spacing: 1px;
    margin: 0;
}

.reset {
    margin-left: auto;
    border: 0;
    background: none;
    padding: 0;
    color: var(--muted);
    font-size: 11px;
    text-decoration: underline;
}

.filter {
    margin-bottom: 25px;
}

.filter-title {
    display: block;
    font-size: 11px;
    font-weight: bold;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 9px;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 0;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.45;
}

.option input {
    accent-color: var(--accent);
    margin-top: 2px;
}

.filters select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: #fff;
    margin-bottom: 7px;
}

.filters select:disabled {
    background: #eee;
    color: #999;
}

.content {
    padding: 30px;
    display: grid;
    grid-auto-rows: 40px 40px auto;
}

.content-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.content-head h2 {
    margin: 0;
    font-size: 20px;
}

.count {
    font-size: 13px;
    color: var(--muted);
}

.shuffle {
    border: 1px solid var(--border);
    background: #fff;
    padding: 9px 13px;
    border-radius: 5px;
}

.active-filters {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.filter-tag {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 10px;
    font-size: 11px;
}

.tiles {
    display: grid;
    grid-template-columns:repeat(6, 1fr);
    grid-auto-rows: 185px;
    grid-auto-flow: dense;
    gap: 12px;
}

.tile {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: .15s;
}

.tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px #00000012;
}

.tile.job {
    grid-column: span 2;
    grid-row: span 2;
    background: var(--job);
    color: #fff;
}

.type {
    display: block;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 14px;
}

.job .type {
    color: #ffd36a;
}

.task .type {
    color: var(--task);
}

.service .type {
    color: var(--service);
}

.tile h3 {
    font-size: 20px;
    line-height: 1.15;
    margin: 0 0 8px;
}

.tile.job h3 {
    font-size: 26px;
}

.location {
    font-size: 13px;
    opacity: .7;
}

.description {
    font-size: 14px;
    line-height: 1.5;
    opacity: .8;
    margin-top: 22px;
}

.tile-footer {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 17px;
    display: flex;
    align-items: center;
}

.price {
    font-size: 14px;
    font-weight: bold;
}

.job .price {
    color: #ffd36a;
}

.answers {
    margin-left: auto;
    font-size: 12px;
    font-weight: bold;
    opacity: .65;
}

.tile.ad {
    grid-column: span 2;
    background: #eee8f1;
    border-color: #d5c9dc;
}
.tile.service,
.tile.task {
    grid-column: span 2;
}

.ad-label {
    display: inline-block;
    background: #75598a;
    color: #fff;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 13px;
}

.tile.ad h3 {
    font-size: 24px;
}

.empty {
    display: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 50px;
    text-align: center;
}

.empty p {
    color: var(--muted);
}

.page-title {
    margin-bottom: 30px;
}

.page-title h1 {
    font-size: 38px;
    letter-spacing: -1.5px;
    margin: 7px 0;
}

.page-title p {
    margin: 0;
    color: var(--muted);
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 28px;
    margin-bottom: 18px;
}

.form-wrap, .preview {
    max-width: 850px;
}

.form-row {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 15px;
}

.form-row.three {
    grid-template-columns:1fr 1fr 1fr;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 7px;
}

.field input, .field select, .field textarea {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}

.field select:disabled {
    background: #eee;
    color: #999;
}

.field textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.5;
}

.help {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
    line-height: 1.5;
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 8px;
    flex-wrap: wrap;
}

.types {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.type-card {
    border: 2px solid var(--border);
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
}

.type-card.active {
    border-color: var(--accent);
    background: #fffaf0;
}

.type-card strong {
    display: block;
    margin-bottom: 5px;
}

.type-card span {
    font-size: 13px;
    color: var(--muted);
}

.terms-box {
    background: #f8f7f2;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 15px 17px;
    margin: 5px 0 15px;
}

.terms-box label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
}

.terms-box input {
    width: auto;
    margin-top: 3px;
    accent-color: var(--accent);
}

.terms-box a {
    font-weight: bold;
    text-decoration: underline;
}

.status {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-draft {
    background: #eee;
    color: #555;
}

.status-review {
    background: #fff1c9;
    color: #7c5b00;
}

.status-live {
    background: #dcebd8;
    color: #355b2e;
}

.status-closed {
    background: #eee;
    color: #666;
}

.notice {
    padding: 16px 18px;
    border-radius: 7px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.notice-yellow {
    background: #fff4d2;
    border: 1px solid #eed48a;
}

.notice-green {
    background: #e7f2e4;
    border: 1px solid #bfd3b9;
}

.manage-grid {
    display: grid;
    grid-template-columns:2fr 1fr;
    gap: 20px;
    max-width: 1000px;
}

.manage-info p {
    color: var(--muted);
    line-height: 1.5;
}

.manage-actions .btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.preview-head {
    border-bottom: 1px solid var(--border);
    padding-bottom: 25px;
    margin-bottom: 25px;
}

.preview-head h1 {
    font-size: 38px;
    margin: 8px 0;
}

.preview-body {
    font-size: 16px;
    line-height: 1.7;
    white-space: pre-line;
}

.preview-meta {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 10px;
    margin: 30px 0;
}

.meta {
    background: var(--bg);
    padding: 15px;
    border-radius: 6px;
}

.meta small {
    display: block;
    color: var(--muted);
    margin-bottom: 5px;
}

.answer-head {
    display: flex;
    gap: 15px;
    align-items: start;
}

.answer-text {
    line-height: 1.6;
}

.divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: #0008;
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-bg.show {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 600px;
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    max-height: 90vh;
    overflow: auto;
}

.modal h2 {
    margin-top: 0;
}

.modal p, .modal li {
    color: var(--muted);
    line-height: 1.55;
}

.modal h3 {
    margin: 24px 0 5px;
    font-size: 15px;
}

footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 30px 35px;
    font-size: 13px;
    color: var(--muted);
}

.footer {
    max-width: 1400px;
    margin: auto;
    display: flex;
    gap: 22px;
}

.footer a {
    color: var(--muted);
    text-decoration: none;
}

.mobile-filter {
    display: none;
}

@media (max-width: 900px) {
    .tiles {
        grid-template-columns:repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    header {
        padding: 0 18px;
    }

    nav a {
        display: none;
    }

    .hero {
        padding: 35px 18px;
    }

    .list-layout {
        display: block;
    }

    .filters {
        display: none;
    }

    .content, .wrap {
        padding: 18px;
    }

    .mobile-filter {
        display: block;
        margin-bottom: 15px;
    }

    .mobile-filter button {
        width: 100%;
        background: #fff;
        border: 1px solid var(--border);
        padding: 12px;
        border-radius: 6px;
        font-weight: bold;
    }

    .tiles {
        grid-template-columns:repeat(2, 1fr);
        grid-auto-rows: 170px;
    }

    .tile.job {
        grid-column: span 2;
        grid-row: span 1;
    }

    .tile.ad {
        grid-column: span 2;
    }

    .tile.job h3 {
        font-size: 23px;
    }

    .description {
        display: none;
    }

    .form-row, .form-row.three, .types, .manage-grid, .preview-meta {
        grid-template-columns:1fr;
    }
}

@media (max-width: 430px) {
    .tiles {
        grid-template-columns:1fr;
    }

    .tile.job, .tile.ad {
        grid-column: span 1;
    }
}



.mosaic {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:14px;
    align-items:stretch;
}

.ad-tile {
    background:#fff;
    border:1px solid var(--border);
    border-radius:14px;
    padding:18px;
    min-height:190px;
    display:flex;
    flex-direction:column;
    cursor:pointer;
    transition:.15s;
}

.ad-tile:hover {
    transform:translateY(-2px);
    box-shadow:0 8px 25px rgba(0,0,0,.08);
}

.ad-tile.job {
    grid-column:span 2;
    min-height:230px;
    background:var(--job);
    color:#fff;
}

.ad-top,.ad-bottom {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.ad-type {
    font-size:12px;
    font-weight:800;
    letter-spacing:.08em;
}

.job .ad-type {color:var(--accent);}
.task .ad-type {color:var(--task);}
.service .ad-type {color:var(--service);}

.ad-answers,.ad-meta {
    font-size:13px;
    opacity:.75;
}

.ad-meta {
    display:flex;
    flex-wrap:wrap;
    gap:8px 14px;
}

.ad-tile h2 {
    margin:18px 0 12px;
    font-size:20px;
    line-height:1.2;
}

.ad-tile.job h2 {
    font-size:28px;
}

.ad-bottom {
    margin-top:auto;
    padding-top:20px;
    font-weight:700;
}

.ad-arrow {
    font-size:22px;
}

.empty-results {
    grid-column:1/-1;
    background:#fff;
    border:1px solid var(--border);
    border-radius:14px;
    padding:40px;
    text-align:center;
}

@media(max-width:900px) {
    .mosaic {grid-template-columns:repeat(2,1fr);}
}

@media(max-width:600px) {
    .mosaic {grid-template-columns:1fr;}
    .ad-tile.job {grid-column:span 1;}
}

.paging{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:15px;
    margin:30px 0;
}

.paging button{
    padding:8px 14px;
    cursor:pointer;
}

.paging button:disabled{
    opacity:.4;
    cursor:default;
}

.admin-result{
    max-width:500px;
    margin:80px auto;
    padding:30px;
    text-align:center;
    background:#fff;
    border:1px solid #ddd;
    border-radius:8px;
}
.admin-result h1{font-size:24px;margin:0 0 15px;}
.admin-result p{color:#666;line-height:1.6;}
.admin-result a{display:inline-block;margin-top:15px;color:#222;}
.admin-result.error{border-top:4px solid #c44;}
.admin-result.approved{border-top:4px solid #4a8;}
.admin-result.rejected{border-top:4px solid #888;}




/* -- ERROR SECTION ------------------------ */

.error-section {
    width: min(100% - 40px, 700px);
    margin: 60px auto;
    padding: 40px;
    box-sizing: border-box;
    background: #fff;
    color: #253047;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    box-shadow: 0 8px 30px #1522380a;
    line-height: 1.7;
}

/* -- TITLE ------------------------------- */

.error-section h1 {
    margin: 0 0 15px;
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 700;
    line-height: 1.3;
    color: #243b63;
}

.error-section p {
    margin: 0 0 16px;
    color: #586579;
}

/* -- BUTTON ------------------------------ */

.error-section .error-button {
    display: inline-block;
    margin: 10px 0 30px;
    padding: 12px 26px;
    background: #2864b4;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: background .2s, transform .2s;
}

.error-section .error-button:hover {
    background: #194b8e;
    transform: translateY(-2px);
}

/* -- SUPPORT MESSAGE --------------------- */

.error-section .error-support {
    margin: 25px 0;
    padding: 18px 20px;
    background: #f5f8fc;
    border: 1px solid #e4eaf3;
    border-left: 4px solid #2864b4;
    border-radius: 6px;
}

.error-section .error-support strong {
    display: block;
    margin-bottom: 6px;
    color: #243b63;
}

.error-section .error-support p {
    margin: 0;
    font-size: 14px;
}

/* -- FOOTER ------------------------------ */

.error-section small {
    display: block;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #e4e8ef;
    color: #8993a3;
    font-size: 12px;
}

/* -- MOBILE ------------------------------ */

@media (max-width: 600px) {
    .error-section {
        width: calc(100% - 24px);
        margin: 25px auto;
        padding: 25px 20px;
    }

    .error-section .error-button {
        display: block;
        text-align: center;
    }
}
