:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; color: #1c2722; }
* { box-sizing: border-box; }
body.backend { min-height: 100vh; margin: 0; background: #f1f3ef; color: #1c2722; }
.backend-shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 64px; }
.backend-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 36px; }
.backend-brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; font-weight: 750; font-size: 18px; text-decoration: none; color: inherit; }
.backend-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: #234d3e; color: white; }
.backend-nav a { color: #526159; text-decoration: none; }
.backend-nav__links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.backend-nav__links a { padding: 9px 11px; border-radius: 9px; font-size: 14px; font-weight: 650; }
.backend-nav__links a:hover { background: #e4e9e5; color: #234d3e; }
.backend-nav__links a.is-active { background: #234d3e; color: white; }
.backend-nav__links .backend-nav__editor { background: #dfeae4; color: #234d3e; }
.backend-hero { margin-bottom: 28px; }
.backend-kicker { color: #5d7167; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.backend-hero h1 { max-width: 720px; margin: 8px 0 10px; font-family: Georgia, serif; font-size: clamp(36px, 6vw, 64px); line-height: 1.02; font-weight: 500; letter-spacing: -.035em; }
.backend-hero p { max-width: 650px; color: #627169; font-size: 17px; line-height: 1.6; }
.backend-page-heading { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: start; gap: 24px; margin: 36px 0 28px; }
.backend-page-heading h1 { margin: 0 0 8px; font-family: Georgia, serif; font-size: clamp(34px, 5vw, 54px); line-height: 1.05; font-weight: 500; letter-spacing: -.03em; }
.backend-page-heading p { max-width: 650px; margin: 0; color: #627169; font-size: 17px; line-height: 1.6; }
.backend-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.backend-stack { display: grid; gap: 24px; }
.backend-card { grid-column: span 6; padding: 26px; border: 1px solid #dce2dd; border-radius: 20px; background: rgba(255,255,255,.82); box-shadow: 0 12px 35px rgba(38,56,47,.06); }
.backend-card.wide { grid-column: 1 / -1; }
.backend-card[id] { scroll-margin-top: 20px; }
.backend-card h2 { margin: 0 0 6px; font-size: 20px; }
.backend-card > p { margin: 0 0 22px; color: #6b7871; }
.backend-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.backend-section-heading h2 { margin-top: 5px; font-size: 26px; }
.backend-section-heading p { margin: 0; color: #6b7871; }
.backend-count { display: grid; min-width: 42px; height: 42px; padding: 0 10px; place-items: center; border-radius: 12px; background: #e6eee9; color: #234d3e; font-weight: 800; }
.backend-form { display: grid; gap: 16px; }
.backend-form label { display: grid; gap: 7px; color: #4b5b53; font-size: 13px; font-weight: 700; }
.backend-inline-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto; align-items: end; gap: 12px; margin-bottom: 22px; padding: 16px; border-radius: 14px; background: #f4f6f3; }
.backend-inline-form--site { grid-template-columns: minmax(150px, 1fr) minmax(140px, .8fr) minmax(180px, 1fr) auto; }
.backend-inline-form label { display: grid; gap: 6px; color: #4b5b53; font-size: 12px; font-weight: 750; }
.backend-input { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid #ced7d1; border-radius: 10px; background: #fff; color: #17201c; font: inherit; }
.backend-input:focus { outline: 3px solid rgba(80,135,114,.2); border-color: #508772; }
.backend-button { min-height: 46px; padding: 10px 17px; border: 0; border-radius: 10px; background: #234d3e; color: white; font: 700 14px/1 system-ui; cursor: pointer; }
.backend-button:disabled { cursor: not-allowed; opacity: .45; }
.backend-button.secondary { border: 1px solid #ced7d1; background: white; color: #34463d; }
.backend-message { min-height: 24px; color: #376d59; font-weight: 650; }
.backend-table { width: 100%; border-collapse: collapse; }
.backend-table th, .backend-table td { padding: 14px 10px; border-bottom: 1px solid #e5e9e6; text-align: left; }
.backend-table th { color: #708078; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.backend-table tbody tr:last-child td { border-bottom: 0; }
.backend-table code { padding: 3px 6px; border-radius: 6px; background: #edf1ee; color: #405048; font-size: 12px; }
.backend-table-wrap { overflow-x: auto; }
.backend-empty { padding: 28px 10px !important; color: #78847e; text-align: center !important; }
.backend-table-action { display: inline-flex; min-height: 34px; align-items: center; padding: 7px 10px; border: 0; border-radius: 8px; background: #e6eee9; color: #234d3e; font: 750 12px/1 system-ui; text-decoration: none; cursor: pointer; }
.backend-table-action.is-danger { background: #fff0ed; color: #9e392d; }
.backend-status, .backend-kind { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #edf0ee; color: #5b6962; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.backend-status.is-live { background: #e0f0e6; color: #276341; }
.backend-status.is-locked { background: #f3ece0; color: #7a5a1e; }
.backend-kind { background: #e8edf6; color: #42577a; }
.backend-auth { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.backend-auth-card { width: min(520px, 100%); padding: clamp(28px, 6vw, 52px); border-radius: 26px; background: white; box-shadow: 0 30px 80px rgba(35,77,62,.12); }
.backend-auth-card h1 { margin: 24px 0 12px; font-family: Georgia, serif; font-size: clamp(34px, 7vw, 50px); line-height: 1.05; font-weight: 500; }
.backend-auth-card > p { color: #67766e; line-height: 1.6; }
.backend-auth-card a { color: #275f49; }
@media (max-width: 900px) { .backend-inline-form, .backend-inline-form--site { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .backend-card { grid-column: 1 / -1; padding: 20px; } .backend-shell { width: min(100% - 20px, 1160px); padding-top: 18px; } .backend-nav { align-items: flex-start; } .backend-nav__links { width: 100%; order: 3; overflow-x: auto; flex-wrap: nowrap; } .backend-nav__links a { white-space: nowrap; } .backend-page-heading { grid-template-columns: 1fr; gap: 8px; } .backend-inline-form, .backend-inline-form--site { grid-template-columns: 1fr; } .backend-table { min-width: 650px; } }

/* Catalog preview tiles */
.backend-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-bottom: 28px; }
.backend-tile { display: grid; grid-template-rows: 200px auto; overflow: hidden; border: 1px solid #dce2dd; border-radius: 16px; background: #fff; }
.backend-tile__preview { position: relative; overflow: hidden; background: oklch(98% 0.008 85); border-bottom: 1px solid #e6ebe7; }
.backend-tile__frame { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.backend-tile__preview--block { display: flex; align-items: center; justify-content: center; gap: 14px; }
.backend-columns { display: grid; gap: 4px; width: 64px; height: 44px; }
.backend-columns.is-1 { grid-template-columns: 1fr; } .backend-columns.is-2 { grid-template-columns: 1fr 1fr; } .backend-columns.is-3 { grid-template-columns: 1fr 1fr 1fr; }
.backend-columns i { display: block; border-radius: 5px; background: #9db8a9; }
.backend-tile__body { display: grid; gap: 6px; padding: 14px 16px 16px; }
.backend-tile__body strong { font-size: 15px; }
.backend-tile__body p { margin: 0; color: #6b7871; font-size: 13px; line-height: 1.5; }
.backend-tile .backend-kind { justify-self: start; }

/* Websites dashboard */
.backend-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.backend-stat { display: grid; min-width: 118px; padding: 12px 16px; border: 1px solid #dce2dd; border-radius: 14px; background: rgba(255,255,255,.82); }
.backend-stat strong { font-size: 24px; line-height: 1.1; }
.backend-stat span { color: #6b7871; font-size: 12.5px; }
.backend-new-site { position: relative; margin-left: auto; }
.backend-new-site summary { list-style: none; display: inline-flex; align-items: center; cursor: pointer; }
.backend-new-site summary::-webkit-details-marker { display: none; }
.backend-new-site[open] summary { border-radius: 10px 10px 0 0; }
.backend-new-site form { position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; width: min(680px, calc(100vw - 48px)); padding: 18px; border: 1px solid #dce2dd; border-radius: 16px; background: white; box-shadow: 0 18px 50px rgba(38,56,47,.16); }
.backend-sites { display: grid; gap: 20px; }
.backend-site { display: grid; grid-template-columns: 300px minmax(0, 1fr); overflow: hidden; border: 1px solid #dce2dd; border-radius: 20px; background: rgba(255,255,255,.88); box-shadow: 0 12px 35px rgba(38,56,47,.06); }
@media (max-width: 760px) { .backend-site { grid-template-columns: 1fr; } }
.backend-site__preview { position: relative; display: block; min-height: 220px; overflow: hidden; background: oklch(98% 0.008 85); border-right: 1px solid #e6ebe7; }
.backend-thumb { display: block; width: 100%; height: 100%; min-height: 220px; border: 0; pointer-events: none; }
.backend-thumb--empty { display: grid; place-items: center; color: #8a958f; font-size: 13px; }
.backend-site__body { display: grid; gap: 14px; padding: 20px 22px; }
.backend-site__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.backend-site__head h2 { margin: 0 0 4px; font-size: 22px; }
.backend-site__head code { color: #6b7871; font-size: 13px; }
.backend-site__facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; }
.backend-site__facts div { display: grid; }
.backend-site__facts dt { color: #6b7871; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.backend-site__facts dd { margin: 0; font-size: 14px; font-weight: 600; }
.backend-site__customers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.backend-site__label { color: #6b7871; font-size: 12px; font-weight: 700; margin-right: 4px; }
.backend-muted { color: #8a958f; font-size: 13px; }
.backend-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 6px 4px 11px; border: 1px solid #d3dcd6; border-radius: 999px; background: #f4f7f5; font-size: 13px; }
.backend-chip__remove { display: grid; width: 22px; height: 22px; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #7a8781; font-size: 15px; cursor: pointer; }
.backend-chip__remove:hover { background: #f7dcd6; color: #a12d1c; }
.backend-grant summary { list-style: none; cursor: pointer; padding: 5px 11px; border: 1px dashed #b9c6bf; border-radius: 999px; color: #234d3e; font-size: 13px; font-weight: 650; }
.backend-grant summary::-webkit-details-marker { display: none; }
.backend-grant form { margin-top: 10px; padding: 14px; border: 1px solid #dce2dd; border-radius: 12px; background: #fafbfa; }
.backend-inline-form--grant { width: 100%; }
.backend-site__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.backend-site__golive { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; }
.backend-site__golive form { margin-left: auto; }
.backend-site__golive a { color: inherit; font-weight: 600; }
.backend-inline-form--site, .backend-inline-form--grant { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 0; }
.backend-button { display: inline-flex; align-items: center; text-decoration: none; }
.backend-grant[open] { flex: 1 1 100%; }
