/* Подряд — палитра и компоненты 1:1 из макета Podryad Marketplace.dc.html */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --accent: oklch(0.62 0.16 155);
  --accent-hover: oklch(0.54 0.16 155);
  --accent-text: oklch(0.5 0.15 155);
  --accent-light: #F1F8F3;
  --ink: #0D1210;
  --muted: #6E786F;
  --muted-2: #93A099;
  --border: #EDF1EE;
  --border-2: #E1E6E2;
  --bg-soft: #F7F9F7;
  --danger-bg: #FDF1F1;
  --danger-border: #F6E1E1;
  --danger-text: #C4453F;
  --danger-text-2: #9A5450;
  --warn-bg: #F0EDE3;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: #fff; color: var(--ink);
  font-family: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
::selection { background: #d7ecdf; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 48px; }
@media (max-width: 900px) { .container { padding: 0 20px; } }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px; border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--accent);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800;
}
.nav-main { display: flex; align-items: center; gap: 44px; }
.nav-links { display: flex; gap: 26px; font-size: 14px; font-weight: 500; color: #3C4640; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; gap: 4px; margin-right: 6px; }
.lang-switch a {
  width: 28px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; background: var(--bg-soft); color: var(--muted);
}
.lang-switch a.active { background: var(--ink); color: #fff; }
.balance-pill {
  background: var(--accent-light); color: var(--accent-text); font-weight: 700; font-size: 13px;
  border-radius: 100px; padding: 8px 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px; padding: 12px 20px; font-size: 14px; font-weight: 700;
  cursor: pointer; text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { background: none; border: 1px solid var(--border-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-danger-outline { background: none; border: 1px solid #E1C7C7; color: var(--danger-text-2); }
.btn-sm { padding: 9px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Cards / surfaces ---------- */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
}
.card-soft { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-md); }
.card-accent { background: var(--accent-light); border-radius: var(--radius-md); }
.card-danger { background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: var(--radius-md); }

/* ---------- Badges / pills ---------- */
.pill { border-radius: 100px; padding: 5px 10px; font-size: 11px; font-weight: 700; display: inline-block; }
.pill-accent { background: var(--accent-light); color: var(--accent-text); }
.pill-solid { background: var(--accent); color: #fff; }
.pill-warn { background: var(--warn-bg); color: var(--muted-2); }
.pill-danger { background: var(--danger-bg); color: var(--danger-text); }
.pill-muted { background: var(--border); color: var(--muted); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.field .hint { font-size: 12px; color: var(--muted-2); margin-top: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], textarea, select {
  width: 100%; background: #fff; border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 14px;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.radio-card {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border-2);
  border-radius: 12px; padding: 13px 14px; font-size: 14px; cursor: pointer;
}
.radio-card input { width: auto; }

/* ---------- Avatar ---------- */
.avatar { border-radius: 50%; background: var(--border-2); flex-shrink: 0; }

/* ---------- Flash messages ---------- */
.flash-wrap { max-width: 1280px; margin: 16px auto 0; padding: 0 48px; }
.flash {
  background: var(--accent-light); color: #2f4a38; border-radius: 12px; padding: 12px 16px;
  font-size: 14px; margin-bottom: 8px;
}

/* ---------- Placeholder image block (заглушка вместо реальных фото) ---------- */
.ph-image {
  background-image: repeating-linear-gradient(135deg, var(--border) 0 1px, transparent 1px 9px);
}

/* ---------- Tabs (pill switcher) ---------- */
.tab-switch { display: inline-flex; gap: 6px; background: var(--bg-soft); border-radius: 100px; padding: 6px; }
.tab-switch a, .tab-switch button {
  border: none; background: none; border-radius: 100px; padding: 10px 18px; font-size: 13px;
  font-weight: 600; color: var(--muted); cursor: pointer;
}
.tab-switch a.active, .tab-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(13,18,16,0.06); }

/* ---------- Landing ---------- */
.hero { padding: 80px 48px 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent-light); border-radius: 100px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--accent-text);
}
.hero h1 { margin-top: 24px; font-size: 60px; line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
.hero p.sub { margin-top: 22px; max-width: 46ch; font-size: 17px; line-height: 1.6; color: var(--muted); }
.search-bar {
  margin-top: 30px; display: flex; background: var(--bg-soft); border: 1px solid var(--border-2);
  border-radius: 14px; padding: 6px; max-width: 560px;
}
.search-bar input { flex: 1; border: none; background: none; padding: 12px 18px; }
.search-bar input:focus { outline: none; }
.hero-stats { border-radius: 24px; overflow: hidden; background: var(--bg-soft); border: 1px solid var(--border); }
.hero-stats .ph-image { height: 280px; }
.hero-stats-row { display: grid; grid-template-columns: repeat(3,1fr); padding: 22px; gap: 8px; border-top: 1px solid var(--border); }
.hero-stats-row div { text-align: center; }
.hero-stats-row .num { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.hero-stats-row .lbl { margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--muted-2); }

.section { padding: 48px; }
.section-soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; }
.section-head h2 { font-size: 28px; letter-spacing: -0.02em; font-weight: 800; }
.section-head a { font-size: 14px; font-weight: 600; color: var(--accent-text); }

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2,1fr); } }
.cat-card {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 18px; padding: 24px; cursor: pointer;
}
.cat-card:hover { border-color: var(--accent); }
.cat-icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--accent-light);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.cat-card.cta { background: var(--accent); color: #fff; }
.cat-card.cta .cat-icon { background: rgba(255,255,255,0.2); }
.cat-title { margin-top: 16px; font-size: 16px; font-weight: 700; }
.cat-sub { margin-top: 6px; font-size: 13px; line-height: 1.5; color: #6E786F; }
.cat-card.cta .cat-sub { color: rgba(255,255,255,0.8); }
.cat-count { margin-top: 16px; font-size: 12px; font-weight: 600; color: var(--muted-2); }

.gig-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1100px) { .gig-grid { grid-template-columns: repeat(2,1fr); } }
.gig-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; cursor: pointer; display: block; }
.gig-card:hover { box-shadow: 0 12px 30px -18px rgba(13,18,16,0.25); }
.gig-card .ph-image { height: 148px; }
.gig-card .body { padding: 16px; }
.gig-author { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.gig-author .avatar { width: 22px; height: 22px; }
.gig-title { margin-top: 10px; font-size: 14px; line-height: 1.45; font-weight: 500; min-height: 40px; }
.gig-meta { margin-top: 14px; display: flex; align-items: baseline; justify-content: space-between; }
.gig-rating { font-size: 12px; color: var(--muted); }
.gig-price { font-size: 15px; font-weight: 800; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step-num {
  width: 36px; height: 36px; border-radius: 10px; background: var(--accent-light); color: var(--accent-text);
  font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.step-title { margin-top: 16px; font-size: 16px; font-weight: 700; }
.step-sub { margin-top: 8px; font-size: 13px; line-height: 1.6; color: var(--muted); }

.site-footer { padding: 56px 48px 64px; background: var(--ink); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; max-width: 1280px; margin: 0 auto; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: rgba(255,255,255,0.6); }
.footer-col .heading { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 4px; }
.footer-col a { color: rgba(255,255,255,0.6); }

/* ---------- Catalog ---------- */
.catalog-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .catalog-layout { grid-template-columns: 1fr; } }
.filters-box .filters-head {
  padding: 16px 18px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted-2);
}
.filters-section { padding: 18px; border-bottom: 1px solid var(--border); }
.filters-section:last-child { border-bottom: none; }
.filters-section .title { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.cat-filter-link {
  display: flex; justify-content: space-between; text-align: left; border-radius: 8px; padding: 9px 10px;
  font-size: 13px; color: #3C4640;
}
.cat-filter-link.active { background: #fff; font-weight: 600; box-shadow: 0 1px 4px rgba(13,18,16,0.08); }
.cat-filter-link span.count { color: var(--muted-2); font-size: 12px; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; }
.sort-links { display: flex; gap: 8px; font-size: 13px; }
.sort-links a { border-radius: 100px; padding: 8px 14px; color: var(--muted); }
.sort-links a.active { background: var(--ink); color: #fff; font-weight: 600; }
.pagination { margin-top: 28px; display: flex; justify-content: center; gap: 6px; }
.pagination a, .pagination span {
  border-radius: 10px; width: 34px; height: 34px; display: grid; place-items: center; font-size: 13px;
  background: var(--bg-soft); border: 1px solid var(--border);
}
.pagination .active { background: var(--accent); color: #fff; border: none; font-weight: 600; }

/* ---------- Gig detail ---------- */
.gig-detail-layout { display: grid; grid-template-columns: 1fr 372px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .gig-detail-layout { grid-template-columns: 1fr; } }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.seller-line { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.seller-line .avatar { width: 38px; height: 38px; }
.gig-cover { margin-top: 24px; border-radius: 20px; overflow: hidden; }
.gig-cover .ph-image { height: 360px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted-2); }
.check-list { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: #3C4640; margin-top: 20px; }
.check-list li { display: flex; gap: 10px; }
.check-list .mark { color: var(--accent-text); }
.review-item { background: var(--bg-soft); border-radius: 16px; padding: 18px 20px; }
.review-head { display: flex; align-items: center; gap: 10px; }
.review-head .avatar { width: 26px; height: 26px; }
.review-head .stars { font-size: 12px; color: var(--accent-text); }
.review-body { margin-top: 10px; font-size: 14px; line-height: 1.6; color: #3C4640; }

.tier-box { position: sticky; top: 20px; }
.tier-tabs { display: flex; border-bottom: 1px solid var(--border); }
.tier-tabs a { flex: 1; text-align: center; padding: 14px; font-size: 13px; font-weight: 600; color: var(--muted-2); }
.tier-tabs a.active { color: var(--ink); border-bottom: 2px solid var(--ink); }
.tier-body { padding: 22px 20px; }
.tier-price-row { display: flex; align-items: baseline; justify-content: space-between; }
.tier-price-row .name { font-size: 15px; font-weight: 700; }
.tier-price-row .price { font-size: 24px; font-weight: 800; }
.tier-desc { margin-top: 12px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.tier-facts { margin-top: 16px; display: flex; gap: 18px; font-size: 12px; color: var(--muted); }
.escrow-note { margin-top: 16px; font-size: 12px; line-height: 1.6; color: #4C5A50; padding: 16px 18px; }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } }
.order-line { display: flex; gap: 16px; padding: 20px; }
.order-line .ph-image { width: 84px; height: 64px; border-radius: 12px; flex-shrink: 0; }
.summary-box { position: sticky; top: 20px; padding: 22px 20px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; color: #3C4640; margin-bottom: 10px; }
.summary-total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; }
.hr { height: 1px; background: var(--border); margin: 16px 0; }

/* ---------- Order / chat ---------- */
.order-layout { display: grid; grid-template-columns: 280px 1fr 280px; gap: 0; min-height: 70vh; }
@media (max-width: 1100px) { .order-layout { grid-template-columns: 1fr; } }
.chat-col { display: flex; flex-direction: column; background: var(--bg-soft); border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.chat-header { padding: 16px 24px; border-bottom: 1px solid var(--border); background: #fff; display: flex; align-items: center; gap: 12px; }
.chat-thread { flex: 1; padding: 24px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; max-height: 60vh; }
.chat-bubble { max-width: 60%; padding: 12px 14px; font-size: 14px; line-height: 1.5; border-radius: 16px; }
.chat-bubble.mine { align-self: flex-end; background: var(--accent); color: #fff; border-radius: 16px 16px 4px 16px; }
.chat-bubble.theirs { align-self: flex-start; background: #fff; border-radius: 16px 16px 16px 4px; }
.chat-system { align-self: center; font-size: 11px; color: var(--muted); background: var(--border); border-radius: 100px; padding: 5px 14px; }
.chat-input-row { padding: 16px 24px; border-top: 1px solid var(--border); background: #fff; display: flex; gap: 10px; }
.chat-input-row input { flex: 1; border-radius: 100px; background: var(--bg-soft); border: none; padding: 12px 18px; }
.chat-input-row .btn { border-radius: 100px; }
.deal-side { padding: 20px 18px; display: flex; flex-direction: column; gap: 18px; }
.deal-amount { margin-top: 6px; font-size: 20px; font-weight: 800; }
.deal-steps { display: flex; flex-direction: column; gap: 12px; }
.deal-step { display: flex; gap: 10px; font-size: 13px; }
.deal-step.done { color: var(--ink); }
.deal-step.done .dot { color: var(--accent-text); }
.deal-step.pending { color: #A9AFA9; }

/* ---------- Dashboards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2,1fr); } }
.stat-card { border-radius: 16px; padding: 20px; }
.stat-num { font-size: 24px; font-weight: 800; }
.stat-lbl { margin-top: 6px; font-size: 11px; font-weight: 600; color: var(--muted-2); }

.list-panel { border-radius: 18px; overflow: hidden; }
.list-panel-head { padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 700; }
.list-row {
  padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center;
  gap: 18px;
}
.list-row:last-child { border-bottom: none; }
.list-row .thumb { width: 50px; height: 50px; border-radius: 12px; flex-shrink: 0; }
.list-row .grow { flex: 1; }
.list-row .grow .title { font-size: 14px; font-weight: 700; }
.list-row .grow .meta { margin-top: 5px; font-size: 12px; color: var(--muted); }
.list-row .price { font-size: 14px; font-weight: 800; white-space: nowrap; }

.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Admin table ---------- */
.admin-table { border-radius: 18px; overflow: hidden; }
.admin-table-head, .admin-row {
  display: grid; padding: 14px 20px; align-items: center;
}
.admin-table-head {
  background: var(--bg-soft); font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--muted-2);
}
.admin-row { border-top: 1px solid var(--border); font-size: 13px; }
.admin-users-grid { grid-template-columns: 2fr 1fr 1fr 1fr 120px; }
.admin-payouts-grid { grid-template-columns: 2fr 1fr 1fr 120px; }
.user-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.user-cell .avatar { width: 30px; height: 30px; }

.search-input-inline {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px;
  font-size: 13px; min-width: 240px;
}

.dispute-card { padding: 20px 22px; }
.moderation-card { padding: 20px; }
.moderation-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 900px) { .moderation-grid { grid-template-columns: 1fr; } }

.turnover-chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; }
.turnover-chart .bar { flex: 1; background: var(--border); border-radius: 6px 6px 0 0; }
.turnover-chart .bar.last { background: var(--accent); }

.page-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 30px; letter-spacing: -0.02em; font-weight: 800; }
.page-wrap { padding: 36px 48px 80px; }
@media (max-width: 700px) { .page-wrap { padding: 24px 20px 60px; } }

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

.star-input { display: flex; gap: 4px; font-size: 22px; }
.star-input label { cursor: pointer; color: var(--border-2); }
.star-input input:checked ~ label,
.star-input input:hover ~ label { color: var(--accent-text); }
