:root {
  --navy: #10243e;
  --navy-2: #173554;
  --ink: #172337;
  --muted: #687487;
  --coral: #ef7b69;
  --coral-soft: #fff0ec;
  --sea: #2b756f;
  --sea-soft: #e8f5f2;
  --sand: #f6f3ed;
  --line: #dde3e8;
  --white: #fff;
  --shadow: 0 18px 48px rgba(16, 36, 62, .09);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #f8fafb; font: 15px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); line-height: 1.15; letter-spacing: -.025em; }
h1 { font-size: clamp(2.25rem, 5vw, 4.7rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); }
h3 { font-size: 1.08rem; }
button { cursor: pointer; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: 238px; flex-direction: column; padding: 28px 20px; color: #dce7f2; background: var(--navy); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.25rem; letter-spacing: -.02em; }
.brand small { display: block; margin-top: -3px; color: #8ea2b9; font-size: .62rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--white); background: var(--coral); font: 800 1.35rem Georgia, serif; }
.side-nav { display: grid; gap: 7px; margin-top: 55px; }
.side-nav a { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 12px; color: #afbed0; font-weight: 650; transition: .2s ease; }
.side-nav a span { width: 20px; font-size: 1.3rem; text-align: center; }
.side-nav a:hover, .side-nav a.active { color: white; background: rgba(255,255,255,.1); }
.sidebar-note { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.05); }
.sidebar-note strong { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.sidebar-note p { margin: 5px 0 0; color: #93a8bf; font-size: .78rem; line-height: 1.45; }
.app-shell { min-height: 100vh; margin-left: 238px; }
.mobile-header, .bottom-nav { display: none; }
.screen { display: none; min-height: 100vh; animation: fade .25s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: .35; transform: translateY(5px); } }

.hero { padding: 70px max(6vw, 50px) 78px; color: white; background: radial-gradient(circle at 85% 20%, rgba(239,123,105,.2), transparent 27%), linear-gradient(135deg, var(--navy), #1f4768); }
.hero h1 { max-width: 850px; margin: 10px 0 18px; color: white; }
.hero > p { max-width: 680px; color: #cad7e4; font-size: 1.08rem; }
.eyebrow { color: var(--sea); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow.light { color: #fed1c8; }
.search-panel { display: flex; gap: 12px; max-width: 700px; margin-top: 34px; padding: 9px; border-radius: 16px; background: white; box-shadow: 0 16px 40px rgba(0,0,0,.2); }
.search-field { flex: 1; padding: 4px 13px; }
.search-field span, label { display: block; color: var(--muted); font-size: .76rem; font-weight: 700; }
.search-field input { width: 100%; padding: 2px 0 0; border: 0; outline: 0; color: var(--ink); font-size: 1rem; }
.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; padding: 10px 18px; border: 1px solid transparent; border-radius: 11px; font-weight: 750; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--coral); box-shadow: 0 7px 18px rgba(239,123,105,.22); }
.button.primary:hover { background: #df6d5c; }
.button.secondary { color: var(--navy); border-color: var(--line); background: white; }
.button.danger { color: #a33838; border-color: #f0cccc; background: #fff5f5; }
.button.full { width: 100%; }

.content-wrap { width: min(1180px, calc(100% - 70px)); margin: 0 auto; padding: 52px 0 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading h2 { margin: 5px 0 0; }
.section-heading.compact { margin-top: 30px; }
.result-count { color: var(--muted); font-weight: 650; }
.filters { display: flex; gap: 8px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.filter { flex: none; padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-weight: 700; }
.filter.active { color: white; border-color: var(--navy); background: var(--navy); }
.establishment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.place-card { position: relative; overflow: hidden; border: 1px solid #e2e7eb; border-radius: var(--radius); background: white; box-shadow: 0 8px 28px rgba(16,36,62,.05); transition: transform .2s, box-shadow .2s; }
.place-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.place-card[hidden] { display: none; }
.favorite { position: absolute; z-index: 2; top: 13px; right: 13px; width: 39px; height: 39px; border: 0; border-radius: 50%; color: var(--navy); background: rgba(255,255,255,.92); font-size: 1.45rem; box-shadow: 0 4px 15px rgba(16,36,62,.13); }
.favorite.active { color: white; background: var(--coral); }
.place-visual { display: flex; height: 175px; flex-direction: column; justify-content: end; padding: 22px; color: white; background: linear-gradient(135deg, #37586a, #94b6b5); }
.place-visual span { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; }
.place-visual strong { font: 1.8rem/1.1 Georgia, serif; }
.place-visual.dunes { background: radial-gradient(circle at 75% 20%, #ffd29e, transparent 18%), linear-gradient(145deg, #32737a, #d2aa76); }
.place-visual.atlantic { background: radial-gradient(circle at 20% 30%, #b9d7e1, transparent 23%), linear-gradient(145deg, #203b58, #7098a3); }
.place-visual.garden { background: radial-gradient(circle at 70% 25%, #eab78e, transparent 19%), linear-gradient(145deg, #315a4d, #7a9c73); }
.place-body { padding: 21px; }
.card-topline { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.rating { color: #c66151; }
.place-body h3 { margin: 9px 0 8px; font-size: 1.25rem; }
.place-body p { color: var(--muted); font-size: .9rem; }
.tags, .case-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span, .case-tags span { padding: 5px 8px; border-radius: 6px; color: var(--sea); background: var(--sea-soft); font-size: .69rem; font-weight: 750; }
.empty-state { padding: 45px; border: 1px dashed #cbd3da; border-radius: var(--radius); color: var(--muted); text-align: center; }

.page-banner { padding: 46px max(6vw, 50px); color: #cbd7e3; background: linear-gradient(135deg, var(--navy), #244f6c); }
.back-link { display: inline-block; margin-bottom: 36px; color: #c2d1df; font-size: .86rem; font-weight: 700; }
.back-link.dark { margin-bottom: 26px; color: var(--muted); }
.banner-content { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.banner-content h1 { margin: 8px 0; color: white; font-size: clamp(2.3rem, 5vw, 4rem); }
.banner-content p { margin: 0; }
.favorite-button { color: white; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.09); }
.favorite-button.active { border-color: var(--coral); background: var(--coral); }
.split-layout, .job-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.panel { padding: 25px; border: 1px solid #e1e6ea; border-radius: var(--radius); background: white; box-shadow: 0 8px 28px rgba(16,36,62,.05); }
.score-panel { display: grid; grid-template-columns: 180px 1fr; gap: 35px; align-items: center; }
.global-score { text-align: center; }
.global-score > strong { color: var(--navy); font-size: 3.4rem; letter-spacing: -.06em; }
.global-score > span, .global-score small { color: var(--muted); }
.global-score small { display: block; }
.stars { margin-top: -5px; color: var(--coral); letter-spacing: 2px; }
.score-details { display: grid; gap: 14px; }
.score-row { display: grid; grid-template-columns: 155px 1fr 28px; gap: 12px; align-items: center; font-size: .82rem; }
.score-row > div { overflow: hidden; height: 7px; border-radius: 5px; background: #edf0f2; }
.score-row i { display: block; height: 100%; border-radius: inherit; background: var(--coral); }
.review-card { margin-top: 14px; }
.review-card header { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; }
.review-card h3 { margin: 0 0 3px; }
.avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: white; background: var(--sea); font-weight: 800; }
.avatar.coral { background: var(--coral); }
.verified { color: var(--sea); font-size: .72rem; font-weight: 750; }
.review-card > p { margin: 20px 0 8px; color: #4e5c6f; }
.text-button { padding: 5px 0; border: 0; color: var(--navy); background: none; font-weight: 800; }
.review-details { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
dl div { padding: 10px; border-radius: 9px; background: #f6f8f9; }
dt { color: var(--muted); font-size: .69rem; font-weight: 700; text-transform: uppercase; }
dd { margin: 2px 0 0; color: var(--navy); font-weight: 750; }
.owner-response { margin-top: 16px; padding: 16px; border-left: 3px solid var(--coral); border-radius: 0 10px 10px 0; background: var(--coral-soft); }
.owner-response p { margin: 4px 0; }
.owner-response small { color: var(--muted); }
.inline-form { margin-bottom: 18px; }
.inline-form label, dialog label { margin: 12px 0; }
.inline-form input, .inline-form textarea, dialog input, dialog textarea, dialog select { width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; outline: none; }
.inline-form input:focus, .inline-form textarea:focus, dialog input:focus, dialog textarea:focus, dialog select:focus { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(43,117,111,.1); }
.side-column { display: grid; gap: 16px; }
.trust-card { background: var(--sea-soft); }
.trust-icon { display: grid; width: 38px; height: 38px; place-items: center; margin-bottom: 13px; border-radius: 50%; color: white; background: var(--sea); font-weight: 800; }
.trust-card p, .side-column .panel > p { color: var(--muted); font-size: .88rem; }

.job-wrap { padding-top: 35px; }
.job-heading { padding: 15px 5px 32px; }
.job-heading h1 { margin: 9px 0 6px; font-size: clamp(2.5rem, 6vw, 4.5rem); }
.job-heading > p { color: var(--muted); font-size: 1.1rem; }
.job-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.job-facts span { padding: 8px 11px; border-radius: 9px; color: var(--navy); background: #edf2f5; font-size: .8rem; font-weight: 750; }
.prose h2 { margin-bottom: 15px; }
.prose h3 { margin-top: 25px; }
.prose p, .prose li { color: #526075; }
.prose li { margin-bottom: 7px; }
.apply-card { position: sticky; top: 22px; }
.salary { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.salary span, .mini-rating span { display: block; color: var(--muted); font-size: .75rem; }
.salary strong { color: var(--navy); font-size: 2rem; }
.mini-rating { display: flex; align-items: center; justify-content: space-between; margin: 16px 0; }
.mini-rating strong { color: #c66151; }
.apply-card > small { display: block; margin-top: 12px; color: var(--muted); text-align: center; }
dialog { width: min(530px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 22px; box-shadow: 0 25px 90px rgba(16,36,62,.3); }
dialog::backdrop { background: rgba(16,36,62,.72); backdrop-filter: blur(3px); }
dialog form { padding: 28px; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; }
.dialog-head h2 { margin: 5px 0; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--muted); background: #eef1f3; font-size: 1.4rem; }
.privacy-note { margin: 12px 0 0; color: var(--muted); font-size: .72rem; text-align: center; }

.admin-screen { background: #f3f6f8; }
.admin-wrap { max-width: 1080px; padding-top: 48px; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; }
.admin-heading h1 { margin: 8px 0 5px; font-size: 2.7rem; }
.admin-heading p { color: var(--muted); }
.admin-avatar { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: white; background: var(--navy); font-size: .8rem; font-weight: 800; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 27px 0 38px; }
.stats-grid article { padding: 20px; border: 1px solid #e0e6ea; border-radius: 15px; background: white; }
.stats-grid span, .stats-grid small { display: block; color: var(--muted); }
.stats-grid strong { display: block; margin: 7px 0 2px; color: var(--navy); font-size: 2rem; }
.status-legend { color: var(--muted); font-size: .76rem; }
.status-legend i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--coral); }
.moderation-list { display: grid; gap: 13px; }
.moderation-card { padding: 21px; border: 1px solid #dfe5e9; border-radius: 16px; background: white; transition: opacity .2s; }
.case-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .73rem; }
.priority { padding: 4px 8px; border-radius: 999px; font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.priority.high { color: #a33c32; background: #ffe8e4; }
.priority.medium { color: #806116; background: #fff3cb; }
.priority.low { color: var(--sea); background: var(--sea-soft); }
.case-content { display: grid; grid-template-columns: 1fr 115px; gap: 30px; margin-top: 15px; }
.case-content h3 { margin-bottom: 6px; }
.case-content p { margin-bottom: 13px; color: var(--muted); }
.case-tags .verification.pending { color: #806116; background: #fff5d6; }
.case-tags .verification.verified { color: var(--sea); background: var(--sea-soft); }
.case-score { text-align: right; }
.case-score small { display: block; color: var(--muted); }
.case-score strong { color: var(--navy); }
.case-actions { display: flex; gap: 8px; align-items: center; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.decision { margin-left: auto; color: var(--sea); font-size: .78rem; font-weight: 800; }
.moderation-card.resolved { opacity: .68; }
.toast { position: fixed; z-index: 100; right: 25px; bottom: 25px; max-width: 350px; padding: 13px 18px; border-radius: 11px; color: white; background: var(--navy); box-shadow: var(--shadow); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1050px) {
  .establishment-grid { grid-template-columns: repeat(2, 1fr); }
  .split-layout, .job-layout { grid-template-columns: minmax(0, 1fr) 280px; }
}

@media (max-width: 780px) {
  body { padding-bottom: 70px; }
  .sidebar { display: none; }
  .app-shell { margin-left: 0; }
  .mobile-header { position: sticky; z-index: 30; top: 0; display: flex; height: 61px; align-items: center; justify-content: space-between; padding: 0 18px; color: var(--navy); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
  .mobile-header .brand-mark { width: 32px; height: 32px; border-radius: 10px; font-size: 1.1rem; }
  .demo-pill { padding: 4px 9px; border-radius: 999px; color: var(--sea); background: var(--sea-soft); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
  .bottom-nav { position: fixed; z-index: 40; inset: auto 0 0; display: grid; height: 68px; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: white; }
  .bottom-nav a { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1px; color: #8290a2; font-size: .61rem; font-weight: 750; }
  .bottom-nav a span { font-size: 1.3rem; line-height: 1.2; }
  .bottom-nav a.active { color: var(--coral); }
  .hero { padding: 48px 20px 55px; }
  .hero h1 { font-size: 2.5rem; }
  .search-panel { align-items: stretch; flex-direction: column; }
  .content-wrap { width: calc(100% - 32px); padding: 38px 0 50px; }
  .section-heading { align-items: start; }
  .establishment-grid { grid-template-columns: 1fr; }
  .place-visual { height: 150px; }
  .page-banner { padding: 30px 20px 36px; }
  .back-link { margin-bottom: 25px; }
  .banner-content { align-items: start; flex-direction: column; }
  .split-layout, .job-layout { grid-template-columns: 1fr; }
  .score-panel { grid-template-columns: 1fr; gap: 20px; }
  .score-row { grid-template-columns: 135px 1fr 28px; }
  .side-column { grid-row: auto; }
  .job-layout .side-column { grid-row: 1; }
  .apply-card { position: static; }
  dl { grid-template-columns: 1fr; }
  .review-card header { grid-template-columns: 42px 1fr; }
  .review-card header > .rating { grid-column: 2; }
  .stats-grid { grid-template-columns: 1fr; }
  .case-content { grid-template-columns: 1fr; gap: 10px; }
  .case-score { text-align: left; }
  .case-actions { flex-wrap: wrap; }
  .decision { width: 100%; margin: 6px 0 0; }
  .toast { right: 16px; bottom: 82px; left: 16px; text-align: center; }
}

@media (max-width: 420px) {
  .section-heading { flex-direction: column; gap: 8px; }
  .score-row { grid-template-columns: 1fr 42px; }
  .score-row > div { grid-row: 2; grid-column: 1 / -1; }
  .admin-heading p { max-width: 250px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
