:root {
  --ink: #122019;
  --forest: #11291f;
  --paper: #f2f1ea;
  --white: #fffef9;
  --lime: #d8ef57;
  --orange: #ee5d43;
  --line: #d1d5cb;
  --muted: #6b756e;
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand span { display: grid; width: 40px; height: 40px; place-items: center; background: var(--lime); color: var(--ink); font-weight: 800; }
.brand img { width: 40px; height: 40px; object-fit: cover; border-radius: 3px; }
.brand strong { font-size: 19px; letter-spacing: .04em; }
.eyebrow { margin: 0 0 12px; color: #e45138; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.login-view { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: var(--forest); }
.login-card { display: grid; width: min(460px, 100%); gap: 16px; padding: 36px; background: var(--white); }
.login-card h1 { margin: 0 0 8px; font-size: 36px; line-height: 1; }
.login-card label, dialog label { display: grid; gap: 7px; font-size: 11px; font-weight: 700; }
.login-card input, select, textarea { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid var(--line); background: #fbfbf7; }
.login-card button, .save { min-height: 46px; border: 0; background: var(--forest); color: #fff; font-weight: 750; cursor: pointer; }
.message { min-height: 20px; margin: 0; color: #ba3f2a; font-size: 12px; }
.admin-view { display: grid; min-height: 100vh; grid-template-columns: 230px 1fr; }
aside { display: flex; flex-direction: column; gap: 40px; padding: 24px 16px; background: var(--forest); color: #fff; }
aside nav { display: grid; gap: 6px; }
aside nav button, aside nav a, .logout { display: block; padding: 12px; border: 0; background: transparent; color: rgba(255,255,255,.65); text-align: left; text-decoration: none; cursor: pointer; }
aside nav .active { background: rgba(255,255,255,.1); color: #fff; }
.logout { margin-top: auto; }
main { width: min(1280px, calc(100% - 56px)); margin: auto; padding: 42px 0 70px; }
main > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
main h1 { margin: 0; font-size: 46px; text-transform: uppercase; }
.user { padding: 10px 12px; border: 1px solid var(--line); background: var(--white); font-size: 11px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 28px 0 18px; }
.stat { padding: 20px; background: var(--white); border: 1px solid var(--line); }
.stat span { color: var(--muted); font-size: 10px; }
.stat strong { display: block; margin-top: 16px; font-size: 35px; }
.stat:first-child { background: var(--forest); color: #fff; }
.stat:first-child span { color: rgba(255,255,255,.55); }
.stat--lime { background: #e6edbd; }
.stat--blue { background: #d8e6eb; }
.stat--sand { background: #ebe1ca; }
.stat--dark { background: var(--forest); color: #fff; }
.stat--dark span { color: rgba(255,255,255,.55); }
.panel { padding: 20px; background: var(--white); border: 1px solid var(--line); }
.toolbar { display: flex; gap: 8px; margin-bottom: 15px; }
.toolbar select { width: 180px; }
.toolbar button { padding: 0 18px; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 11px; }
th { padding: 10px; border-block: 1px solid var(--line); color: var(--muted); text-align: left; }
td { padding: 13px 10px; border-bottom: 1px solid #e7e9e3; }
.contact-cell { display: grid; gap: 2px; }
.contact-cell strong { font-size: 12px; }
.contact-cell span { color: var(--muted); font-size: 9px; }
.pill { display: inline-block; padding: 4px 8px; background: #e8ebe5; border-radius: 99px; font-size: 9px; }
.pill--new { background: #e6edbd; color: #465208; }
.pill--contacted { background: #d7e7ef; color: #244d61; }
.pill--quoted { background: #f2d8c8; color: #7d3b1f; }
.pill--closed { background: #e4e6e0; color: #626b64; }
.row-button { border: 0; background: transparent; cursor: pointer; }
.row-link { color: #d94e35; font-size: 10px; font-weight: 750; text-decoration: none; white-space: nowrap; }
dialog { width: min(620px, calc(100% - 32px)); padding: 28px; border: 0; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(8, 18, 12, .55); }
dialog h2 { margin: 0 0 20px; font-size: 30px; }
.dialog-close { position: absolute; top: 12px; right: 12px; }
.dialog-close button { border: 0; background: transparent; font-size: 24px; cursor: pointer; }
.detail-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.detail-meta div { padding: 10px; background: var(--paper); }
.detail-meta span, .detail-meta strong { display: block; }
.detail-meta span { color: var(--muted); font-size: 8px; }
.detail-meta strong { margin-top: 3px; font-size: 10px; }
blockquote { margin: 0 0 18px; padding: 18px; background: #f3f3ed; border-left: 3px solid var(--orange); white-space: pre-wrap; }
dialog label { margin-bottom: 13px; }
.empty { padding: 40px; color: var(--muted); text-align: center; }
.dashboard-actions { display: flex; gap: 10px; margin-bottom: 24px; }
.dashboard-actions a { padding: 11px 15px; background: var(--white); border: 1px solid var(--line); color: var(--ink); font-size: 10px; font-weight: 700; text-decoration: none; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin: 26px 0 16px; }
.section-title h2, .workflow h2, .inquiry-content h2 { margin: 0; font-size: 28px; text-transform: uppercase; }
.back-link { display: inline-block; margin-bottom: 16px; color: var(--muted); font-size: 10px; text-decoration: none; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); align-items: start; gap: 16px; }
.detail-top { display: flex; justify-content: space-between; gap: 20px; }
.detail-top h2 { margin: 12px 0 3px; }
.detail-top p { margin: 0; color: var(--muted); font-size: 11px; }
.detail-top > span { color: var(--muted); font-size: 9px; }
.inquiry-content blockquote { margin: 24px 0; font-size: 14px; line-height: 1.75; }
.detail-meta a { font-size: 10px; color: var(--ink); }
.workflow { display: grid; gap: 13px; }
.workflow label, .create-member label { display: grid; gap: 6px; font-size: 10px; font-weight: 700; }
.readonly { color: var(--muted); font-size: 10px; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.role-grid article { min-height: 150px; padding: 20px; background: var(--white); border: 1px solid var(--line); }
.role-grid article:first-child { background: var(--forest); color: #fff; }
.role-grid span { color: #db4a33; font-size: 8px; font-weight: 800; }
.role-grid h2 { margin: 28px 0 6px; font-size: 24px; }
.role-grid p { margin: 0; color: var(--muted); font-size: 10px; }
.role-grid article:first-child p { color: rgba(255,255,255,.55); }
.member-list { display: grid; border-top: 1px solid var(--line); }
.member-row { display: grid; grid-template-columns: 38px minmax(160px,1fr) minmax(140px,.7fr) 120px; align-items: center; gap: 13px; min-height: 68px; border-bottom: 1px solid var(--line); }
.member-avatar { display: grid; width: 34px; height: 34px; place-items: center; background: var(--forest); color: var(--lime); font-weight: 800; }
.member-row > div { display: grid; gap: 2px; }
.member-row > div span, .member-row small { color: var(--muted); font-size: 9px; }
.member-row select { min-height: 36px; }
.create-member { margin-top: 18px; }
.create-member form { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.create-member form button { align-self: end; border: 0; background: var(--forest); color: #fff; font-weight: 750; cursor: pointer; }
.message { grid-column: 1 / -1; }
.seo-panel { max-width: 980px; }
.seo-intro { max-width: 760px; margin: 0 0 20px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.seo-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.seo-form label { display: grid; gap: 6px; font-size: 10px; font-weight: 700; }
.seo-form .wide { grid-column: 1 / -1; }
.seo-form button { min-height: 46px; border: 0; background: var(--forest); color: #fff; font-weight: 750; cursor: pointer; }
.seo-assets { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.seo-assets a { padding: 8px 10px; border: 1px solid var(--line); font-size: 9px; font-weight: 700; text-decoration: none; }
@media (max-width: 760px) {
  .admin-view { grid-template-columns: 1fr; }
  aside { flex-direction: row; align-items: center; gap: 16px; }
  aside nav { display: none; }
  .logout { margin: 0 0 0 auto; }
  main { width: calc(100% - 28px); padding-top: 25px; }
  main h1 { font-size: 36px; }
  .user { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .detail-meta { grid-template-columns: 1fr; }
  .detail-grid, .role-grid, .create-member form { grid-template-columns: 1fr; }
  .member-row { grid-template-columns: 36px 1fr; padding-block: 12px; }
  .member-row small, .member-row select { grid-column: 2; }
  .seo-form { grid-template-columns: 1fr; }
  .seo-form .wide { grid-column: auto; }
}
