* { box-sizing: border-box; }
body {
    font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f4f5f7;
    margin: 0;
    color: #222;
}
a { color: #1a73e8; text-decoration: none; }
a:hover { text-decoration: underline; }

header.site-header {
    background: #1a3c6e;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
header.site-header a { color: #fff; }
header.site-header .logo { font-size: 20px; font-weight: 700; }
header.site-header nav a {
    margin-left: 16px;
    font-size: 14px;
}

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

.layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.col-filters {
    flex: 0 0 240px;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 16px;
}
.col-results {
    flex: 1;
    min-width: 0;
}

.col-filters h3 {
    margin-top: 0;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #555;
}
.col-filters input[type=text] {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}
.col-filters button {
    margin-top: 10px;
    width: 100%;
    padding: 9px 10px;
    background: #1a3c6e;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.col-filters button:hover { background: #142f57; }
.col-filters .clear-link {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    text-align: center;
}

.ad-card {
    display: flex;
    gap: 14px;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 14px;
    transition: box-shadow .15s;
}
.ad-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.ad-card .thumb {
    flex: 0 0 120px;
    height: 90px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}
.ad-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ad-card .info { flex: 1; min-width: 0; }
.ad-card .info h2 { margin: 0 0 6px; font-size: 17px; }
.ad-card .price { color: #1a7d36; font-weight: 700; font-size: 16px; }
.ad-card .meta { color: #777; font-size: 13px; margin-top: 6px; }

.empty-state {
    background: #fff;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    color: #777;
}

.ad-view {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 24px;
}
.ad-view img.full {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 16px;
}
.ad-view h1 { margin-top: 0; }
.ad-view .price { font-size: 22px; color: #1a7d36; font-weight: 700; margin: 8px 0; }
.ad-view .meta { color: #777; margin-bottom: 16px; font-size: 14px; }
.ad-view .desc { white-space: pre-wrap; line-height: 1.5; }
.back-link { display: inline-block; margin-bottom: 14px; }

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
table.admin-table th, table.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 14px;
}
table.admin-table th { background: #f0f2f5; }
.badge-hidden {
    background: #fdecea;
    color: #b71c1c;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.badge-live {
    background: #e6f4ea;
    color: #1a7d36;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 13px;
    border: 1px solid #ccc;
    background: #fafafa;
    cursor: pointer;
}
.btn-primary { background: #1a3c6e; color: #fff; border-color: #1a3c6e; }
.btn-danger { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn-warn { background: #e67e22; color: #fff; border-color: #e67e22; }
.actions a, .actions button { margin-right: 6px; }

.admin-form label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 600;
    font-size: 14px;
}
.admin-form input[type=text],
.admin-form input[type=number],
.admin-form input[type=tel],
.admin-form input[type=file],
.admin-form textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}
.admin-form textarea { min-height: 140px; }

.login-box {
    max-width: 360px;
    margin: 80px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
}

.flash {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 14px;
}
.flash-ok { background: #e6f4ea; color: #1a7d36; }
.flash-err { background: #fdecea; color: #b71c1c; }

@media (max-width: 700px) {
    .layout { flex-direction: column; }
    .col-filters { flex: none; width: 100%; }
    .ad-card { flex-direction: column; }
    .ad-card .thumb { width: 100%; height: 160px; }
}
