:root {
  color-scheme: light;
  --pine: #0b2a1e;
  --forest: #17593b;
  --leaf: #3a9a62;
  --ink: #173227;
  --muted: #63756a;
  --surface: #ffffff;
  --soft: #eaf4ec;
  --line: #d9e7dc;
  --canvas: #f3f7f3;
  font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--forest); }
a:hover { color: var(--pine); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }
.shell, .admin-main { width: min(100% - 32px, 1120px); margin-inline: auto; }
.topbar { background: var(--pine); color: #fff; }
.topbar-inner { height: 64px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 17px; font-weight: 800; letter-spacing: -.035em; }
.brand:hover { color: #fff; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: var(--leaf); color: #fff; font-size: 19px; }
.top-note { color: #b8d7c0; font-size: 12px; text-align: right; }
.main-nav, .sidebar-foot { display: none; }
.hero { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(122deg,#3a9a62 0%,#17593b 55%,#0b2a1e 100%); color: #fff; margin: 16px 0 28px; border-radius: 20px; padding: 25px 23px 24px; box-shadow: 0 15px 30px rgba(11,42,30,.13); animation: rise .38s ease both; }
.hero::before { content: ""; position: absolute; z-index: -1; width: 250px; height: 250px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; right: -135px; top: -100px; box-shadow: 0 0 0 46px rgba(255,255,255,.04),0 0 0 92px rgba(255,255,255,.03); }
.eyebrow, .section-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.eyebrow { color: #c4eed1; }
.signal { width: 7px; height: 7px; background: #9ce0ae; border-radius: 50%; box-shadow: 0 0 0 4px rgba(156,224,174,.15); }
h1,h2,p { margin-top: 0; }
.hero h1 { font-size: clamp(25px,6.4vw,42px); line-height: 1.15; letter-spacing: -.045em; margin: 13px 0 12px; max-width: 660px; }
.hero p { color: #e5f4e9; margin: 0; max-width: 570px; line-height: 1.55; font-size: 14px; }
.hero-stats { display: inline-flex; align-items: center; margin-top: 20px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.23); border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font-size: 12px; font-weight: 650; backdrop-filter: blur(8px); }
.hero-decor { display: none; }
.workspace-heading { display: grid; gap: 14px; margin-bottom: 15px; }
.section-kicker { color: var(--leaf); }
.workspace-heading h2, .list-heading h2 { font-size: 22px; letter-spacing: -.035em; margin: 2px 0 2px; line-height: 1.25; }
.workspace-heading p { color: var(--muted); margin: 0; font-size: 13px; }
.search-wrap { width: 100%; }
input[type=search], input[type=password], input[type=file] { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); padding: 11px 15px; outline: none; }
input[type=search]::placeholder { color: #809286; }
input:focus-visible { border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(58,154,98,.12); outline: none; }
.packages { display: flex; gap: 9px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 0 2px 12px; margin: 0 -2px; scrollbar-width: thin; scrollbar-color: #b9d8c0 transparent; }
.package-tab { scroll-snap-align: start; min-width: 120px; min-height: 52px; display: flex; justify-content: center; align-items: center; gap: 8px; flex: 0 0 auto; padding: 8px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.package-tab:hover { border-color: #8ac7a0; transform: translateY(-2px); }
.package-tab.active { color: var(--forest); border-color: #8ac7a0; background: var(--soft); box-shadow: 0 3px 10px rgba(23,89,59,.08); font-weight: 800; }
.package-tab small { color: var(--muted); font-size: 11px; font-weight: 750; }
.list-section { padding-top: 9px; scroll-margin-top: 20px; }
.list-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 12px 0 14px; }
.list-heading h2 { margin-bottom: 0; }
.progress-pill { white-space: nowrap; border-radius: 999px; padding: 7px 10px; background: var(--soft); color: var(--forest); font-size: 10px; font-weight: 750; }
.company-list { display: grid; gap: 14px; padding-bottom: 56px; }
.company { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 17px; box-shadow: 0 5px 20px rgba(15,62,36,.035); }
.company-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.company-head > div { min-width: 0; display: flex; align-items: flex-start; gap: 10px; }
.company h2 { font-size: 17px; line-height: 1.26; letter-spacing: -.02em; overflow-wrap: anywhere; margin: 2px 0 0; }
.number { flex: 0 0 auto; min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--forest); background: var(--soft); font-weight: 800; font-size: 12px; }
.status { flex: 0 0 auto; border-radius: 999px; padding: 6px 9px; background: #f0f2ef; color: #707f74; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status.done { color: var(--forest); background: var(--soft); }
.meta { display: flex; flex-wrap: wrap; gap: 3px 12px; margin: 8px 0 13px 44px; color: var(--muted); font-size: 12px; }
.meta span + span::before { content: "·"; margin-right: 12px; }
.map-link { display: block; padding: 14px 1px; border-top: 1px solid var(--line); color: var(--forest); font-size: 13px; font-weight: 750; text-decoration: none; overflow-wrap: anywhere; }
.map-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.script-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 15px; padding: 18px; border-radius: 12px; background: var(--soft); color: #244231; font-size: 14px; line-height: 1.6; }
.actions { display: grid; grid-template-columns: 1fr; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 11px; border: 1px solid var(--line); padding: 10px 16px; font-weight: 750; line-height: 1.25; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:not(:disabled):hover { transform: translateY(-2px); }
.button.primary { background: var(--forest); border-color: var(--forest); color: #fff; box-shadow: 0 6px 16px rgba(23,89,59,.16); }
.button.primary:hover { background: var(--pine); }
.button.secondary { background: var(--surface); color: var(--forest); }
.button.secondary:hover:not(:disabled) { background: var(--soft); }
.button:disabled { cursor: default; opacity: .65; }
.empty { text-align: center; padding: 42px 18px; border: 1px dashed #b8d5c0; border-radius: 15px; color: var(--muted); background: rgba(255,255,255,.7); }
.notice { position: fixed; z-index: 5; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); max-width: 450px; margin-inline: auto; padding: 14px 18px; color: #fff; background: var(--pine); border-radius: 13px; box-shadow: 0 14px 40px rgba(11,42,30,.28); font-size: 13px; text-align: center; animation: toast .24s ease both; }
.notice.error { background: #a13d3d; }
/* Administration */
.admin-main { padding: 28px 0 70px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 20px 0; }
.stat-tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 15px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.stat-tile strong { font-size: 25px; letter-spacing: -.04em; line-height: 1.2; }
.stat-tile span { color: var(--muted); font-size: 10px; line-height: 1.3; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 15px; margin-bottom: 18px; }
.page-head h1 { font-size: 28px; letter-spacing: -.035em; margin: 3px 0 4px; }
.page-head p { margin: 0; font-size: 13px; }
.admin-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 20px; margin-top: 15px; box-shadow: 0 5px 20px rgba(15,62,36,.035); }
.admin-panel h2 { font-size: 20px; letter-spacing: -.025em; margin: 0 0 8px; }
.admin-panel p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0 0 14px; }
.admin-panel label { display: block; font-size: 13px; font-weight: 750; margin-bottom: 8px; }
.admin-panel input { margin-bottom: 13px; }
.admin-panel form .button { width: 100%; }
.admin-alert { padding: 13px 16px; color: var(--forest); background: var(--soft); border-radius: 12px; font-weight: 650; }
.admin-alert.error { background: #fde9e7; color: #a13d3d; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); padding: 10px 12px; }
.admin-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.admin-table a { color: var(--forest); font-weight: 700; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table .table-done { color: var(--forest); font-weight: 750; }
.admin-table .table-empty { color: var(--muted); text-align: center; padding: 25px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .company-head { flex-wrap: wrap; }
  .company-head .status { margin-left: 44px; }
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; margin-top: 10px; }
  .admin-table td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border: 0; text-align: right; }
  .admin-table td::before { content: attr(data-label); color: var(--muted); font-weight: 650; text-align: left; }
}
@media (min-width: 600px) {
  .hero { padding: 35px 40px; }
  .workspace-heading { display: flex; align-items: end; justify-content: space-between; }
  .search-wrap { width: min(100%, 325px); }
  .actions { display: flex; flex-wrap: wrap; }
  .actions .button { min-width: 185px; }
  .admin-panel { padding: 25px; }
  .admin-panel form .button { width: auto; min-width: 170px; }
  .stats-grid { gap: 14px; }
  .stat-tile { padding: 19px 23px; }
  .stat-tile strong { font-size: 31px; }
  .stat-tile span { font-size: 12px; }
}
@media (min-width: 960px) {
  .topbar { position: fixed; z-index: 3; top: 0; left: 0; bottom: 0; width: 236px; }
  .topbar-inner { height: 100%; padding: 28px 17px 24px; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }
  .brand { padding: 0 8px; font-size: 20px; }
  .brand-mark { width: 43px; height: 43px; border-radius: 12px; font-size: 22px; }
  .top-note { text-align: left; margin: 32px 8px 12px; color: #91b5a0; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
  .main-nav { display: grid; gap: 5px; }
  .main-nav a { display: block; text-decoration: none; color: #b8d1c0; padding: 12px 17px; border-radius: 11px; font-size: 14px; font-weight: 650; }
  .main-nav a:hover { color: #fff; background: #1e4430; }
  .main-nav a.selected { color: #fff; background: #244d36; }
  .sidebar-foot { display: block; margin: auto 8px 0; border-top: 1px solid #315640; padding-top: 18px; color: #91b5a0; font-size: 11px; }
  .shell, .admin-main { width: min(calc(100% - 236px - 72px), 1120px); margin-left: max(272px, calc((100% + 236px - 1120px)/2)); margin-right: auto; }
  .hero { margin: 30px 0 33px; padding: 38px 45px; }
  .hero h1 { font-size: 42px; }
  .hero-decor { display: block; position: absolute; right: 7%; bottom: 11%; width: 190px; height: 145px; border: 1px solid rgba(255,255,255,.18); border-radius: 24px; transform: rotate(-12deg); }
  .hero-decor span { display: block; margin: 22px 25px; height: 8px; width: 84px; background: rgba(255,255,255,.16); border-radius: 8px; }
  .hero-decor span:nth-child(2) { width: 120px; }.hero-decor span:nth-child(3) { width: 68px; }
  .company-list { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .admin-main { padding-top: 38px; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
