@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #203344;
  --muted: #5d6f7e;
  --line: #dce4eb;
  --paper: #f5f7f9;
  --white: #fff;
  --green: #245f99;
  --green-dark: #194775;
  --green-soft: #eaf1f9;
  --lime: #d9e9fa;
  --accent-rgb: 36, 95, 153;
  --accent-end: #397caf;
  --orange: #ef9b64;
  --shadow: 0 18px 50px rgba(22, 50, 41, .08);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; padding-bottom: 82px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }

.topbar {
  height: 72px; padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 21px Manrope, sans-serif; letter-spacing: -1px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; color: white; background: #176b58; font-size: 17px; letter-spacing: -2px; }
.brand-accent { color: #176b58; }
.desktop-links, .top-actions { display: flex; align-items: center; gap: 26px; }
.desktop-links { color: #52645d; font-size: 14px; font-weight: 600; margin-right: auto; margin-left: 25px; }
.desktop-links a:hover, .notification-link:hover { color: var(--green); }
.top-actions { gap: 12px; font-size: 13px; font-weight: 700; }
.notification-link { position: relative; color: #52645d; padding: 10px; }
.notification-dot { display: inline-grid; place-items: center; min-width: 19px; height: 19px; border-radius: 20px; padding: 0 4px; margin-left: 4px; background: var(--orange); color: white; font-size: 10px; vertical-align: 1px; }
.avatar-link { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 800; }
.page-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; min-height: calc(100vh - 158px); padding: 34px 0 56px; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Manrope, "DM Sans", sans-serif; letter-spacing: -.045em; }
h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.07; margin-bottom: 16px; }
h2 { font-size: clamp(25px, 3vw, 34px); margin-bottom: 10px; }
h3 { font-size: 18px; margin-bottom: 9px; }
p { line-height: 1.65; color: #586a63; }
.muted, small { color: var(--muted); }
.eyebrow { display: inline-flex; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.lead { font-size: 17px; max-width: 630px; color: #d8e7e0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 34px 0 16px; }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 5px 0 0; }
.hero {
  overflow: hidden; border-radius: 28px; padding: clamp(28px, 6vw, 68px);
  color: white; background: radial-gradient(circle at 86% 18%, rgba(216,232,245,.18), transparent 26%),
  linear-gradient(122deg, var(--green-dark) 5%, var(--green) 70%, var(--accent-end) 100%);
  position: relative; box-shadow: var(--shadow);
}
.hero::after { content: ""; position: absolute; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.14); border-radius: 45% 55% 55% 45%; right: -80px; bottom: -120px; transform: rotate(25deg); }
.hero-content { max-width: 690px; position: relative; z-index: 1; }
.hero h1 { max-width: 650px; }
.hero .eyebrow { color: var(--lime); }
.hero .button { margin-top: 18px; }
.hero-stats { position: absolute; bottom: 26px; right: 36px; display: flex; gap: 24px; z-index: 1; }
.hero-stat { border-left: 1px solid rgba(255,255,255,.3); padding-left: 14px; font-size: 12px; color: #d7e9e0; }
.hero-stat b { display: block; color: white; font: 800 20px Manrope, sans-serif; }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; border: 0; border-radius: 13px; padding: 0 18px; font-weight: 700; font-size: 14px; transition: transform .18s, box-shadow .18s, background .18s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--green); color: white; box-shadow: 0 7px 18px rgba(var(--accent-rgb),.16); }
.button-primary:hover { background: var(--green-dark); color: white; }
.button-light { background: white; color: var(--green-dark); }
.button-quiet { color: var(--green); background: var(--green-soft); }
.button-danger { background: #fff0ed; color: #a54432; }
.button-small { min-height: 38px; padding: 0 14px; font-size: 13px; }
.button-block { width: 100%; }
.inline-form { display: inline; }
.button-link { border: 0; background: none; color: var(--green); padding: 0; font-weight: 700; }

.search-panel { margin-top: -24px; position: relative; z-index: 2; margin-left: 24px; margin-right: 24px; }
.panel, .card { border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 8px 26px rgba(22,50,41,.035); }
.panel { padding: 18px; }
.card { padding: 20px; }
.search-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab-link { padding: 9px 14px; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 700; background: #f5f8f6; }
.tab-link.active { background: var(--green); color: white; }
.filters { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.filter-extra { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label, label { color: #40554c; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 45px; border: 1px solid #dce6e0; border-radius: 12px; padding: 11px 13px; color: var(--ink); background: white; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.14); }
textarea { min-height: 120px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: unset; accent-color: var(--green); }
input[type="file"] { padding: 9px; font-size: 13px; }
.form-card { max-width: 760px; margin: 0 auto; padding: clamp(22px, 5vw, 42px); }
.form-card > p { margin-bottom: 25px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-span { grid-column: 1 / -1; }
.choice-row { display: flex; flex-wrap: wrap; gap: 12px; }
.choice { display: flex; align-items: center; gap: 8px; background: #f5f8f6; padding: 11px 13px; border-radius: 12px; color: #41564d; font-size: 13px; }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.check-grid label { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 500; }

.category-grid, .provider-grid, .job-grid, .stats-grid { display: grid; gap: 14px; }
.category-grid { grid-template-columns: repeat(5, 1fr); }
.category-card { min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; border: 1px solid var(--line); background: white; border-radius: 17px; transition: .2s ease; }
.category-card:hover { border-color: #9dcdb8; transform: translateY(-3px); box-shadow: var(--shadow); }
.category-mark { width: 36px; height: 36px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font: 800 16px Manrope; }
.category-card strong { font-size: 13px; line-height: 1.35; }
.provider-grid { grid-template-columns: repeat(3, 1fr); }
.provider-card, .job-card { transition: transform .18s, box-shadow .18s; }
.provider-card:hover, .job-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.provider-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 11px; }
.provider-avatar { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; overflow: hidden; border-radius: 16px; background: var(--green-soft); color: var(--green); font: 800 20px Manrope; }
.provider-avatar img { width: 100%; height: 100%; object-fit: cover; }
.provider-heading h3 { margin: 0 0 3px; }
.provider-heading p { margin: 0; font-size: 12px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0; }
.tag { display: inline-flex; background: #f2f6f3; color: #4d6258; font-size: 11px; font-weight: 700; padding: 6px 9px; border-radius: 20px; }
.rating { color: #a36b29; font-weight: 700; font-size: 13px; }
.card-actions { display: flex; gap: 9px; margin-top: 16px; }
.card-actions > * { flex: 1; }
.job-grid { grid-template-columns: repeat(2, 1fr); }
.job-meta { display: flex; flex-wrap: wrap; gap: 7px 13px; color: var(--muted); font-size: 12px; margin: 12px 0; }
.price { color: var(--green); font: 800 20px Manrope, sans-serif; }
.job-image, .portfolio-image { width: 100%; max-height: 320px; object-fit: cover; border-radius: 14px; margin-top: 12px; }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.portfolio-grid img { width: 100%; height: 180px; border-radius: 14px; object-fit: cover; }

.dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.dashboard-head h1 { font-size: clamp(28px, 4vw, 40px); margin: 0; }
.role-switch { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border: 1px solid var(--line); background: white; border-radius: 13px; font-size: 12px; color: var(--muted); }
.stats-grid { grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; }
.stat-card { padding: 19px; border: 1px solid var(--line); border-radius: 17px; background: white; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; font: 800 27px Manrope; margin-top: 6px; }
.content-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; align-items: start; }
.stack { display: grid; gap: 13px; }
.list-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 13px 0; }
.list-row:last-child { border: 0; padding-bottom: 0; }
.list-row:first-child { padding-top: 4px; }
.list-row p { margin: 4px 0 0; font-size: 12px; }
.badge { display: inline-flex; padding: 5px 8px; border-radius: 30px; background: #eff5f1; color: #527065; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.badge-green { background: #e3f3e8; color: #28764e; }
.badge-orange { background: #fff1df; color: #98621b; }
.badge-red { background: #fff0ed; color: #a54432; }
.empty-state { text-align: center; padding: 35px 20px; border: 1px dashed #cbd8d0; border-radius: 18px; background: rgba(255,255,255,.65); }
.empty-state p { margin: 6px 0 15px; }
.message-list { display: grid; gap: 9px; }
.message-preview { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.message-bubble { max-width: 82%; width: fit-content; padding: 12px 15px; background: white; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; }
.message-bubble.mine { margin-left: auto; background: var(--green); color: white; border-color: var(--green); border-radius: 16px 16px 4px 16px; }
.message-bubble p { margin: 0; color: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-bubble time { display: block; font-size: 10px; opacity: .7; margin-top: 6px; }
.conversation { display: grid; gap: 10px; padding: 18px 0; }
.flash-stack { display: grid; gap: 8px; margin-bottom: 18px; }
.flash { padding: 12px 15px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.flash-success { color: #236746; background: #e5f5eb; }
.flash-error { color: #a63e30; background: #fff0ed; }
.flash-info { color: #46654e; background: #edf5ea; }
.email-verification-warning {
  margin-bottom: 26px;
  padding: clamp(20px, 3vw, 30px);
  border: 2px solid #c83b3b;
  border-left-width: 7px;
  border-radius: 18px;
  background: #fff1f0;
  color: #8e2020;
}
.email-verification-warning h2 {
  margin: 0 0 12px;
  color: #a32222;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.3;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.email-verification-warning p {
  margin: 0 0 20px;
  max-width: 760px;
  color: #7d3030;
  font-size: 16px;
}
.email-verification-warning form { margin: 0; }
.email-verification-warning__button {
  max-width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  background: #b42323;
  color: #fff8f7;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
  transition: none;
}
.email-verification-warning__button:hover { background: #921c1c; transform: none; }
.email-verification-warning__button:focus-visible {
  outline: 3px solid #791919;
  outline-offset: 4px;
}
@media (max-width: 767px) {
  .email-verification-warning { padding: 20px 16px; border-radius: 14px; }
  .email-verification-warning__button { width: 100%; }
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.table-wrap { overflow-x: auto; }
.report-card { padding: 13px 0; border-bottom: 1px solid var(--line); }
.report-card:last-child { border: 0; }

.bottom-nav { display: none; }

@media (max-width: 850px) {
  .filters { grid-template-columns: repeat(2, 1fr); }
  .filters .button { grid-column: 1 / -1; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .provider-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { position: static; margin-top: 30px; }
}
@media (max-width: 620px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .topbar { height: 60px; padding: 0 16px; }
  .brand { font-size: 19px; }
  .brand-mark { width: 31px; height: 31px; }
  .desktop-links { display: none; }
  .top-actions { margin-left: auto; }
  .top-actions .button-quiet { display: none; }
  .top-actions .button { min-height: 34px; padding: 0 11px; font-size: 12px; }
  .notification-link { font-size: 0; padding: 8px; }
  .notification-link::before { content: none; }
  .notification-dot { font-size: 9px; position: absolute; top: -1px; right: -3px; }
  .page-shell { width: min(100% - 30px, 560px); padding: 20px 0 28px; min-height: calc(100vh - 132px); }
  .hero { border-radius: 22px; padding: 30px 23px; }
  .hero h1 { font-size: 36px; }
  .lead { font-size: 15px; }
  .hero-stats { gap: 14px; }
  .hero-stat { font-size: 10px; padding-left: 9px; }
  .hero-stat b { font-size: 16px; }
  .search-panel { margin: -14px 9px 0; padding: 13px; }
  .filters { grid-template-columns: 1fr 1fr; gap: 8px; }
  .filter-extra { grid-template-columns: 1fr 1fr; gap: 8px; }
  .filters .field:first-child { grid-column: 1 / -1; }
  input, select { min-height: 43px; padding: 10px; font-size: 14px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .category-card { min-height: 105px; padding: 12px; border-radius: 14px; }
  .category-card strong { font-size: 12px; }
  .provider-grid, .job-grid { grid-template-columns: 1fr; gap: 10px; }
  .card { padding: 17px; border-radius: 17px; }
  .section-heading { margin-top: 28px; }
  .section-heading h2 { font-size: 23px; }
  .form-card { padding: 22px 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-span { grid-column: auto; }
  .check-grid { grid-template-columns: 1fr; }
  .dashboard-head { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 15px; }
  .stat-card strong { font-size: 23px; }
  .content-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid img { height: 135px; }
  .admin-table { min-width: 650px; }
  .bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    display: flex; justify-content: space-around; gap: 4px;
    padding: 9px 8px calc(9px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }
  .bottom-nav a { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 2px; color: #7b8982; font-size: 10px; font-weight: 700; }
  .bottom-nav a.active { color: var(--green); }
  .nav-symbol { font-size: 20px; line-height: 22px; font-weight: 500; }
}
