:root { --ink: #171715; --paper: #f2f0e9; --surface: #faf9f4; --line: #c9c6bb; --accent: #ef5b35; --lime: #c7dc48; --muted: #6d6b64; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", "Noto Sans SC", sans-serif; }
.admin-shell { --tblr-primary: var(--accent); --tblr-body-bg: var(--paper); --tblr-body-color: var(--ink); }
.admin-shell .alert { margin: 0 0 24px; border-radius: 0; }
.admin-shell .card, .admin-shell .form-control, .admin-shell .form-select, .admin-shell .btn { border-radius: 0; }
.admin-shell .form-control:focus, .admin-shell .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(239, 91, 53, .16); }
.admin-shell .badge { border-radius: 0; font-size: 10px; font-weight: 600; }
.admin-shell .bg-green-lt { background: var(--lime) !important; color: var(--ink) !important; }
.admin-shell .bg-secondary-lt { background: var(--paper) !important; color: var(--muted) !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 900; }
.brand span { width: 20px; height: 20px; background: var(--accent); border-radius: 50% 50% 0 50%; transform: rotate(-45deg); }
.admin-header { min-height: 72px; padding: 0 3vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--ink); }
.admin-header nav { display: flex; gap: 25px; font-size: 13px; }
.admin-header nav form { margin: 0; }
.admin-header nav button { padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; }
.admin-layout { min-height: calc(100vh - 73px); display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.admin-sidebar { border-right: 1px solid var(--ink); padding: 34px 22px 26px; display: flex; flex-direction: column; background: #e9e7de; }
.sidebar-heading { display: grid; gap: 6px; padding: 0 8px 28px; border-bottom: 1px solid var(--line); }
.sidebar-heading small { font-size: 9px; letter-spacing: 1.5px; color: var(--muted); }
.sidebar-heading strong { font-size: 20px; }
.side-menu { display: grid; gap: 5px; padding-top: 22px; }
.side-menu a { min-height: 48px; padding: 0 12px; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; font-size: 14px; border: 1px solid transparent; }
.side-menu a span { font-size: 9px; color: var(--muted); }
.side-menu a em { min-width: 22px; height: 22px; display: grid; place-items: center; background: var(--paper); font-size: 10px; font-style: normal; }
.side-menu a:hover { border-color: var(--line); }
.side-menu a.active { background: var(--ink); color: white; }
.side-menu a.active span { color: var(--lime); }
.sidebar-status { margin-top: auto; padding: 20px 8px 0; border-top: 1px solid var(--line); display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 10px; }
.sidebar-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); border: 1px solid var(--ink); }
.admin-content { min-width: 0; padding: 48px clamp(28px, 5vw, 76px) 70px; }
.content-heading { min-height: 150px; padding-bottom: 32px; border-bottom: 1px solid var(--ink); display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section-label { font-size: 10px; letter-spacing: 1.5px; font-weight: 700; color: var(--muted); margin: 0 0 12px; }
.content-heading h1 { margin: 0; font-size: clamp(44px, 6vw, 76px); line-height: .95; }
.content-heading > p { max-width: 310px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.publish-surface, .library-surface { max-width: 920px; padding: 30px; border: 1px solid var(--line); background: var(--surface); }
.surface-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 22px; margin-bottom: 28px; border-bottom: 1px solid var(--ink); }
.surface-heading span { font-size: 22px; font-weight: 700; }
.surface-heading small { color: var(--muted); font-size: 9px; letter-spacing: 1.3px; }
.publish-form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 15px; }
.publish-form label { display: grid; gap: 8px; font-size: 12px; font-weight: 600; }
.publish-form input, .publish-form textarea, .publish-form select { width: 100%; border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 12px 2px; outline: 0; border-radius: 0; }
.publish-form input:focus, .publish-form textarea:focus, .publish-form select:focus { border-color: var(--accent); }
.wide { grid-column: 1 / -1; }
.source-fieldset { border: 0; padding: 0; margin: 0; }
.source-fieldset legend { font-size: 12px; font-weight: 600; margin-bottom: 9px; }
.file-drop { border: 1px dashed var(--ink); min-height: 105px; display: grid; place-content: center; text-align: center; cursor: pointer; background: rgba(255,255,255,.25); }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop strong { font-size: 14px; }
.file-drop span { font-size: 10px; color: var(--muted); font-weight: 400; margin-top: 5px; }
.or { display: block; text-align: center; font-size: 10px; color: var(--muted); margin: 10px 0; }
.check { display: flex !important; grid-template-columns: 17px 1fr; align-items: center; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }
.button { min-height: 48px; border: 1px solid var(--ink); padding: 0 18px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.button-primary { background: var(--ink); color: white; }
.button-primary:hover { background: var(--accent); border-color: var(--accent); }
.list-heading dl { display: flex; gap: 34px; margin: 0; }
.list-heading dl div { min-width: 70px; }
.list-heading dt { font-size: 10px; color: var(--muted); }
.list-heading dd { margin: 3px 0 0; font-size: 30px; font-weight: 700; }
.library-surface { max-width: none; margin-top: 30px; }
.bulk-actions { min-height: 46px; display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--ink); }
.bulk-actions label { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; }
.bulk-actions input, .row-select { width: 16px; height: 16px; accent-color: var(--ink); }
.bulk-actions span { margin-right: auto; color: var(--muted); font-size: 11px; }
.bulk-delete { border: 0; background: transparent; color: #b22e24; font-size: 11px; text-decoration: underline; cursor: pointer; }
.bulk-delete:disabled { color: var(--muted); cursor: not-allowed; opacity: .55; }
.content-list { border-top: 1px solid var(--ink); }
.content-row { display: grid; grid-template-columns: 16px 72px minmax(130px, 1fr) auto auto; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.content-thumb { width: 72px; aspect-ratio: 4/3; background: #d6d3c9; position: relative; overflow: hidden; }
.content-thumb img, .content-thumb video { width: 100%; height: 100%; object-fit: cover; }
.content-thumb span { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); color: white; }
.content-name strong, .content-name small { display: block; }
.content-name strong { font-size: 14px; }
.content-name small { margin-top: 4px; font-size: 10px; color: var(--muted); }
.status { font-size: 10px; padding: 5px 8px; border: 1px solid var(--line); }
.status.online { background: var(--lime); border-color: var(--lime); }
.row-actions { display: flex; gap: 6px; }
.row-actions a { padding: 6px; font-size: 11px; text-decoration: underline; }
.row-actions button { background: transparent; border: 0; padding: 6px; font-size: 11px; cursor: pointer; text-decoration: underline; }
.row-actions .danger { color: #b22e24; }
.library-empty { border-top: 1px solid var(--ink); padding: 50px 0; color: var(--muted); }
.duplicate-list { border-top: 1px solid var(--ink); }
.duplicate-group { padding: 20px 0; border-bottom: 1px solid var(--line); }
.duplicate-summary { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.duplicate-summary strong { font-size: 14px; }
.duplicate-summary span { color: var(--muted); font-size: 10px; }
.duplicate-url { display: block; overflow-wrap: anywhere; color: #9b2b20; font-size: 12px; line-height: 1.6; text-decoration: underline; }
.duplicate-articles { display: grid; gap: 7px; margin-top: 14px; }
.duplicate-articles label { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; background: var(--paper); }
.duplicate-articles label > span { min-width: 0; }
.duplicate-articles strong, .duplicate-articles small { display: block; }
.duplicate-articles strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.duplicate-articles small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.duplicate-articles a { font-size: 11px; text-decoration: underline; }
.visitor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 30px; border: 1px solid var(--ink); background: var(--ink); }
.visitor-grid article { min-height: 170px; padding: 24px; display: flex; flex-direction: column; background: var(--surface); }
.visitor-grid small { color: var(--muted); font-size: 10px; }
.visitor-grid strong { margin-top: auto; font-size: 48px; line-height: 1; }
.visitor-grid span { margin-top: 8px; color: var(--muted); font-size: 10px; }
.alert { padding: 13px 16px; margin-bottom: 24px; border: 1px solid; font-size: 13px; }
.alert-success { background: #e3ebba; border-color: #9baa46; }
.alert-error { background: #f6d3c9; border-color: #b64c38; }
.post-editor, .settings-surface { margin-top: 30px; }
.content-editor { min-height: 340px; resize: vertical; line-height: 1.8; }
.settings-surface small { color: var(--muted); font-weight: 400; }
.current-logo { width: min(240px, 100%); max-height: 100px; object-fit: contain; object-position: left center; }
.token-status { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; }
.token-status span { color: var(--muted); }
.schema-editor-surface { max-width: 1100px; }
.schema-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0 0 18px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.schema-toolbar span { margin-right: 8px; color: var(--muted); font-size: 11px; }
.schema-toolbar button { padding: 7px 10px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 11px; }
.schema-toolbar button:hover { border-color: var(--ink); background: var(--lime); }
.schema-json-editor { min-height: 480px; padding: 16px !important; border: 1px solid var(--line) !important; background: #20201d !important; color: #f5f2e9; font-family: Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.6; resize: vertical; tab-size: 2; }
.schema-json-editor:focus { border-color: var(--accent) !important; }
.schema-actions { display: flex; justify-content: flex-end; gap: 12px; }
.schema-actions .button { min-width: 150px; }
.schema-hint { margin: 22px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.schema-hint code { color: var(--ink); }
.builder-topbar { min-height: 92px; padding: 0 0 22px; display: flex; align-items: end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--ink); }
.builder-topbar h1 { margin: 0; font-size: clamp(38px, 5vw, 64px); line-height: .9; }
.builder-top-actions { display: flex; align-items: center; gap: 14px; }
.builder-save-state { color: var(--muted); font-size: 11px; }
.builder-settings { min-height: 38px; background: var(--surface); font-size: 12px; }
.schema-builder { min-height: 690px; display: grid; grid-template-columns: 230px minmax(340px, 1fr) 270px; margin: 24px 0 0; border: 1px solid #d7d9df; background: #f4f5f7; color: #252a35; }
.component-library, .schema-inspector { min-width: 0; background: #fff; }
.component-library { border-right: 1px solid #e1e3e8; }
.schema-inspector { border-left: 1px solid #e1e3e8; }
.builder-panel-title { display: grid; gap: 5px; padding: 20px 18px 16px; border-bottom: 1px solid #e1e3e8; }
.builder-panel-title strong { font-size: 14px; }
.builder-panel-title span, .component-group small { color: #8a909b; font-size: 10px; }
.component-group { padding: 18px 14px; }
.component-library-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 12px; }
.component-library-grid button { min-height: 72px; display: grid; place-items: center; align-content: center; gap: 6px; border: 1px solid #edf0f4; background: #fff; color: #4d5563; cursor: pointer; font-size: 10px; }
.component-library-grid button:hover { border-color: #497cf4; color: #497cf4; box-shadow: 0 4px 12px rgba(48, 84, 160, .1); }
.component-library-grid b { display: grid; width: 24px; height: 24px; place-items: center; color: #497cf4; font-size: 17px; font-weight: 600; }
.component-library-note { margin: 0 16px; padding: 14px 0; border-top: 1px solid #e1e3e8; color: #989da7; font-size: 10px; line-height: 1.7; }
.builder-canvas-wrap { min-width: 0; background: #f4f5f7; }
.canvas-toolbar { height: 48px; padding: 0 18px; display: flex; align-items: center; justify-content: center; gap: 10px; border-bottom: 1px solid #e1e3e8; color: #8a909b; font-size: 11px; }
.canvas-toolbar span { margin-right: auto; }
.canvas-toolbar button { width: 24px; height: 24px; border: 1px solid #dce0e6; background: #fff; color: #596170; cursor: pointer; }
.canvas-toolbar strong { min-width: 38px; text-align: center; font-size: 10px; font-weight: 500; }
.builder-canvas { min-height: 640px; padding: 28px 20px; display: flex; justify-content: center; align-items: flex-start; overflow: auto; }
.phone-frame { width: 310px; min-height: 590px; overflow: hidden; border: 7px solid #22252c; border-radius: 25px; background: #f7f7f7; box-shadow: 0 18px 40px rgba(25, 30, 42, .2); transform-origin: top center; transition: transform .2s ease; }
.phone-status { height: 24px; padding: 0 10px; display: flex; justify-content: space-between; align-items: center; background: #fff; color: #1d2026; font-size: 7px; }
.phone-nav { height: 31px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e3e4e6; background: #fff; color: #22252c; font-size: 10px; }
.phone-nav span { color: #6e737d; font-size: 11px; }
.phone-screen { min-height: 535px; background: #f2f0e9; }
.preview-empty { min-height: 535px; display: grid; place-items: center; padding: 30px; color: #a0a4aa; font-size: 11px; text-align: center; }
.preview-component { position: relative; margin-bottom: 2px; outline: 1px solid transparent; cursor: pointer; }
.preview-component:hover, .preview-component.selected { outline: 2px solid #497cf4; outline-offset: -2px; z-index: 1; }
.preview-component.selected:after { content: attr(data-label); position: absolute; top: 0; right: 0; padding: 3px 5px; background: #497cf4; color: #fff; font-size: 8px; }
.preview-banner { min-height: 152px; padding: 18px 14px; display: flex; flex-direction: column; justify-content: end; background: #263348; color: #fff; }
.preview-banner.has-image { background-size: cover; background-position: center; }
.preview-banner strong { font-size: 18px; }
.preview-banner span { margin-top: 5px; font-size: 9px; opacity: .75; }
.preview-text { padding: 15px; background: #fff; color: #252a35; font-size: 14px; line-height: 1.5; }
.preview-image { width: 100%; height: 130px; display: block; object-fit: cover; background: #dfe5f2; }
.preview-video { height: 130px; display: grid; place-items: center; background: #202632; color: #fff; font-size: 24px; }
.preview-notice { padding: 10px 12px; background: #fff9dc; color: #8a6814; font-size: 9px; }
.preview-button { margin: 12px; padding: 10px; background: #171715; color: #fff; text-align: center; font-size: 10px; }
.preview-spacer { height: 30px; background: repeating-linear-gradient(135deg, #eff1f4 0, #eff1f4 5px, #e5e8ed 5px, #e5e8ed 10px); }
.preview-data { padding: 12px; background: #fff; }
.preview-data-title { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 700; }
.preview-data-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.preview-data-card { min-height: 55px; display: grid; place-items: center; background: #e8edf8; color: #8b94a4; font-size: 8px; }
.inspector-tabs { height: 48px; display: flex; border-bottom: 1px solid #e1e3e8; }
.inspector-tabs button { flex: 1; border: 0; border-bottom: 2px solid transparent; background: #fff; color: #8a909b; cursor: pointer; font-size: 11px; }
.inspector-tabs button.active { border-bottom-color: #497cf4; color: #497cf4; }
.inspector-content { padding: 18px; }
.inspector-section { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid #eef0f3; }
.inspector-section h3 { margin: 0 0 14px; color: #333944; font-size: 11px; font-weight: 700; }
.inspector-field { display: grid; gap: 6px; margin-bottom: 12px; color: #858b96; font-size: 10px; }
.inspector-field input, .inspector-field textarea, .inspector-field select { width: 100%; padding: 8px 9px; border: 1px solid #dfe2e8; outline: 0; background: #fff; color: #303540; font-size: 11px; }
.inspector-field textarea { min-height: 70px; resize: vertical; }
.inspector-field input:focus, .inspector-field textarea:focus, .inspector-field select:focus { border-color: #497cf4; }
.inspector-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.inspector-actions button { padding: 7px 3px; border: 1px solid #dfe2e8; background: #fff; color: #68707e; cursor: pointer; font-size: 10px; }
.inspector-actions button:hover { border-color: #497cf4; color: #497cf4; }
.inspector-empty { padding: 50px 18px; color: #9aa0aa; font-size: 11px; line-height: 1.7; text-align: center; }
.schema-save-bar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0 0; }
.schema-save-bar .schema-actions { display: flex; gap: 10px; }
.schema-advanced { flex: 1; color: #68707e; font-size: 10px; }
.schema-advanced summary { cursor: pointer; }
.schema-advanced textarea { width: min(550px, 100%); height: 90px; display: block; margin-top: 8px; padding: 8px; border: 1px solid #cfd3da; background: #20201d; color: #f5f2e9; font: 11px/1.5 Consolas, monospace; }
@media (max-width: 1100px) { .schema-builder { grid-template-columns: 190px minmax(310px, 1fr) 240px; } .component-library-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .schema-builder { grid-template-columns: 1fr; } .component-library { border-right: 0; border-bottom: 1px solid #e1e3e8; } .component-library-grid { grid-template-columns: repeat(5, 1fr); } .component-library-note { display: none; } .schema-inspector { border-top: 1px solid #e1e3e8; border-left: 0; } .inspector-content { min-height: 160px; } .schema-save-bar { align-items: stretch; flex-direction: column; } .schema-save-bar .schema-actions { justify-content: stretch; } .schema-save-bar .schema-actions .button { flex: 1; } }
@media (max-width: 520px) { .component-library-grid { grid-template-columns: repeat(3, 1fr); } .builder-topbar { align-items: start; flex-direction: column; } .builder-top-actions { width: 100%; justify-content: space-between; } .phone-frame { transform: scale(.9); transform-origin: top center; margin-bottom: -60px; } }
.login-page { min-height: 100vh; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.login-brand { padding: 36px 4vw 7vw; background: var(--lime); display: flex; flex-direction: column; justify-content: space-between; }
.login-brand p { font-size: 11px; letter-spacing: 1.8px; font-weight: 700; }
.login-brand h1 { font-size: clamp(55px, 7vw, 108px); line-height: .95; margin: 25px 0 0; }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-form { width: min(390px, 100%); }
.login-form h2 { font-size: 34px; margin: 12px 0 40px; }
.login-form label { display: grid; gap: 8px; margin-bottom: 25px; font-size: 12px; font-weight: 600; }
.login-form input { border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 12px 2px; outline: 0; }
.login-form .button { width: 100%; margin-top: 35px; }
.back-link { display: inline-block; margin-top: 24px; font-size: 12px; color: var(--muted); }
.product-admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--ink); color: var(--muted); font-size: 10px; letter-spacing: 1.3px; }
.product-admin-toolbar .button { min-height: 40px; letter-spacing: 0; font-size: 12px; }
.product-admin-list { border-top: 1px solid var(--ink); }
.product-admin-row { display: grid; grid-template-columns: 72px minmax(140px, 1fr) auto auto auto; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.product-admin-row > img { width: 72px; height: 72px; object-fit: cover; background: #d6d3c9; }
.product-featured { padding: 5px 8px; background: var(--lime); font-size: 10px; }
.product-admin-row .row-actions form { display: inline; }
.product-edit-surface { max-width: 920px; margin-top: 30px; }
.product-form-page { max-width: 1100px; margin: 0 auto; }
@media (max-width: 700px) { .product-admin-row { grid-template-columns: 58px 1fr auto; gap: 10px; } .product-admin-row > img { width: 58px; height: 58px; } .product-admin-row .status, .product-featured { display: none; } .product-admin-row .row-actions { grid-column: 2 / -1; } }
@media (max-width: 860px) { .admin-layout { grid-template-columns: 1fr; } .admin-sidebar { padding: 16px 18px; border-right: 0; border-bottom: 1px solid var(--ink); } .sidebar-heading, .sidebar-status { display: none; } .side-menu { grid-template-columns: repeat(3, 1fr); padding: 0; } .side-menu a { min-height: 42px; } .admin-content { padding: 34px 18px 60px; } }
@media (max-width: 700px) { .admin-header { padding: 0 18px; } .admin-header nav { gap: 14px; } .content-heading { min-height: 130px; align-items: start; flex-direction: column; } .content-heading h1 { font-size: 46px; } .content-heading > p { max-width: none; } .publish-surface, .library-surface { padding: 20px; } .login-shell { grid-template-columns: 1fr; } .login-brand { min-height: 38vh; padding: 25px 22px 45px; } .login-brand h1 { font-size: 52px; } .login-panel { min-height: 62vh; padding: 42px 22px; } .content-row { grid-template-columns: 16px 58px 1fr auto; gap: 10px; } .content-thumb { width: 58px; } .status { display: none; } .row-actions { grid-column: 3 / -1; } }
@media (max-width: 700px) { .visitor-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .admin-header nav a:first-child { display: none; } .publish-form { grid-template-columns: 1fr; } .publish-form > * { grid-column: 1; } .list-heading dl { gap: 18px; } .visitor-grid { grid-template-columns: 1fr; } }