:root {
    color: #18201d;
    background: #eef1ee;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }

.app-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #12241d; color: #e9f0ec; padding: 28px 20px; }
.brand { color: #fff; display: block; font-size: 22px; font-weight: 800; margin-bottom: 36px; text-decoration: none; }
.brand span { color: #d7b45a; }
.nav-group { margin-bottom: 24px; }
.nav-heading, .eyebrow { color: #84958e; font-size: 11px; font-weight: 800; letter-spacing: .12em; margin: 0 0 8px; text-transform: uppercase; }
.nav-link { align-items: center; border-radius: 8px; color: #e9f0ec; display: flex; justify-content: space-between; margin: 3px 0; padding: 10px 12px; text-decoration: none; }
.nav-link:hover { background: #1d382e; }
.nav-link.disabled { color: #71827b; cursor: not-allowed; }
.nav-link small { font-size: 9px; text-transform: uppercase; }
.security-note { border-top: 1px solid #294238; color: #84958e; font-size: 12px; line-height: 1.5; margin-top: 32px; padding-top: 20px; }
.workspace { min-width: 0; }
.topbar { align-items: center; background: #fff; border-bottom: 1px solid #dbe1dd; display: flex; justify-content: space-between; min-height: 82px; padding: 16px 32px; }
.topbar .eyebrow { margin-bottom: 4px; }
.actor-area { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.status { border-radius: 999px; font-size: 12px; font-weight: 700; padding: 7px 10px; }
.status-loading { background: #edf0ee; color: #5e6a65; }
.status-success { background: #e0f4e9; color: #17623e; }
.status-warning { background: #fff1ce; color: #765710; }
.status-error { background: #fde6e3; color: #8b2921; }
.content { margin: 0 auto; max-width: 1080px; padding: 40px 32px; }
.panel { background: #fff; border: 1px solid #dbe1dd; border-radius: 14px; box-shadow: 0 8px 30px rgba(18, 36, 29, .06); padding: 30px; }
.panel h1 { font-size: 26px; margin: 4px 0 12px; }
.muted { color: #617069; line-height: 1.6; }
.loading-panel { align-items: center; display: flex; gap: 14px; }
.spinner { animation: spin .8s linear infinite; border: 3px solid #dbe1dd; border-top-color: #927122; border-radius: 50%; height: 24px; width: 24px; }
@keyframes spin { to { transform: rotate(360deg); } }
.button { border: 0; border-radius: 8px; cursor: pointer; font-weight: 750; padding: 10px 16px; }
.button:disabled { cursor: wait; opacity: .65; }
.button-primary { background: #927122; color: #fff; }
.button-secondary { background: #edf0ee; color: #24322c; }
.button-outline { background: #fff; border: 1px solid #aebbb4; color: #24322c; }
.button-small { font-size: 12px; padding: 7px 10px; }
.auth-panel { margin: 32px auto; max-width: 440px; }
.login-form { display: grid; gap: 10px; margin-top: 24px; }
.login-form label { font-size: 13px; font-weight: 750; }
.login-form input { border: 1px solid #cbd4cf; border-radius: 8px; margin-bottom: 8px; padding: 12px; width: 100%; }
.alert { border-radius: 8px; line-height: 1.5; margin: 16px 0; padding: 12px; }
.alert-error { background: #fde6e3; color: #78231d; }
.alert-success { background: #e0f4e9; color: #17623e; }
.alert-info { background: #e7f0f7; color: #244f6a; }
.alert-warning, .legacy-warning { background: #fff1ce; color: #765710; }
.legacy-warning { border-left: 4px solid #b78d25; border-radius: 6px; line-height: 1.5; margin: 20px 0; padding: 14px; }
.callout { background: #eef8f2; border-left: 4px solid #2d8055; border-radius: 6px; margin-top: 24px; padding: 16px; }
.product-list { border-top: 1px solid #e2e7e4; margin-top: 24px; }
.product-row { align-items: center; border-bottom: 1px solid #e2e7e4; display: flex; justify-content: space-between; padding: 15px 4px; }
.product-row small { color: #69766f; display: block; margin-top: 5px; }
.badge { background: #edf0ee; border-radius: 999px; color: #59645f; font-size: 12px; padding: 6px 9px; }
.badge.active { background: #e0f4e9; color: #17623e; }
.footer-note { font-size: 13px; margin-bottom: 0; margin-top: 20px; }
.page-actions { align-items: center; display: flex; gap: 24px; justify-content: space-between; }
.page-actions h1 { margin-bottom: 0; }
.filters { align-items: end; border-bottom: 1px solid #e2e7e4; display: flex; gap: 16px; margin-top: 24px; padding-bottom: 18px; }
.filters label { display: grid; font-size: 13px; font-weight: 750; gap: 6px; }
.filters select, .field input { background: #fff; border: 1px solid #c4cfc9; border-radius: 8px; padding: 10px 12px; }
.table-scroll { margin-top: 12px; overflow-x: auto; }
.products-table, .posts-table, .access-table { border-collapse: collapse; min-width: 760px; width: 100%; }
.products-table th, .posts-table th, .access-table th { color: #68766f; font-size: 11px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.products-table th, .products-table td, .posts-table th, .posts-table td, .access-table th, .access-table td { border-bottom: 1px solid #e2e7e4; padding: 14px 10px; vertical-align: middle; }
.products-table td small, .posts-table td small, .access-table td small { color: #69766f; display: block; margin-top: 4px; }
.numeric { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-actions { display: flex; gap: 8px; }
.pagination { align-items: center; display: flex; gap: 16px; justify-content: space-between; margin-top: 20px; }
.pagination span { color: #617069; font-size: 13px; text-align: center; }
.empty-state { color: #617069; padding: 34px 0; text-align: center; }
.product-form, .post-form { display: grid; gap: 17px; margin-top: 24px; max-width: 760px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 750; }
.field textarea { background: #fff; border: 1px solid #c4cfc9; border-radius: 8px; line-height: 1.55; min-height: 92px; padding: 12px; resize: vertical; }
.field-help { color: #617069; font-size: 12px; line-height: 1.45; }
.field-error { color: #9a2f26; font-size: 12px; font-weight: 650; }
.warning-text { color: #765710; }
.checkbox-field { align-items: center; display: flex; font-size: 13px; font-weight: 700; gap: 6px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.publication-state { font-weight: 750; white-space: nowrap; }
.state-draft { color: #59645f; }
.state-scheduled { color: #765710; }
.state-published { color: #17623e; }
.timestamp { color: #52615a; font-size: 13px; white-space: nowrap; }
.dashboard-heading { margin-bottom: 30px; }
.dashboard-heading h1 { font-size: 30px; margin: 4px 0 8px; }
.metric-section { margin-top: 28px; }
.metric-section h2 { font-size: 20px; margin: 0 0 4px; }
.metric-section > .muted { margin-top: 0; }
.metric-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 18px 0 0; }
.metric-card { background: #fff; border: 1px solid #dbe1dd; border-radius: 12px; box-shadow: 0 8px 24px rgba(18, 36, 29, .05); padding: 20px; }
.metric-card dt { color: #617069; font-size: 13px; font-weight: 700; }
.metric-card dd { color: #18201d; font-size: 32px; font-variant-numeric: tabular-nums; font-weight: 800; margin: 8px 0 0; }
.button-danger { background: #9a3027; color: #fff; }
.access-state { border-radius: 999px; display: inline-block; font-size: 12px; font-weight: 750; padding: 6px 9px; }
.access-unconfigured { background: #edf0ee; color: #59645f; }
.access-disabled { background: #fde6e3; color: #8b2921; }
.access-enabled-roleless { background: #fff1ce; color: #765710; }
.access-enabled { background: #e0f4e9; color: #17623e; }
.access-facts { display: grid; gap: 4px 20px; grid-template-columns: max-content 1fr; margin: 24px 0; }
.access-facts dt { color: #617069; font-size: 13px; font-weight: 750; }
.access-facts dd { margin: 0; overflow-wrap: anywhere; }
.role-catalog { border-top: 1px solid #e2e7e4; margin-top: 24px; padding-top: 20px; }
.role-catalog h2 { font-size: 20px; }
.access-controls { margin: 16px 0 22px; }
.role-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.role-card { border: 1px solid #dbe1dd; border-radius: 10px; display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.role-card h3 { margin: 0 0 5px; }
.role-card code { color: #617069; font-size: 12px; }
.role-card .button { align-self: flex-start; margin-top: auto; }
.button:focus-visible, .nav-link:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #d7b45a; outline-offset: 2px; }
.pricing-workspace { display: grid; gap: 24px; }
.pricing-heading h1, .pricing-section h2 { margin: 4px 0 10px; }
.pricing-facts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 18px 0; }
.pricing-fact { background: #f7f9f8; border-radius: 8px; padding: 12px; }
.pricing-fact dt { color: #617069; font-size: 12px; font-weight: 700; }
.pricing-fact dd { margin: 5px 0 0; overflow-wrap: anywhere; }
.pricing-today { border-bottom: 1px solid #e2e7e4; border-top: 1px solid #e2e7e4; padding: 18px 0; }
.pricing-form, .pricing-history { border-top: 1px solid #e2e7e4; margin-top: 24px; padding-top: 20px; }
.pricing-form > .field { max-width: 460px; margin-bottom: 14px; }
.pricing-table { border-collapse: collapse; min-width: 760px; width: 100%; }
.pricing-table th, .pricing-table td { border-bottom: 1px solid #e2e7e4; padding: 12px 9px; text-align: left; vertical-align: middle; }
.pricing-table th { color: #68766f; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.pricing-entry-table input { border: 1px solid #c4cfc9; border-radius: 7px; min-width: 145px; padding: 9px; width: 100%; }
.pricing-detail { background: #f7f9f8; border-radius: 10px; margin-top: 18px; padding: 16px; }

@media (max-width: 760px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { min-height: auto; }
    .topbar { align-items: flex-start; gap: 16px; padding: 16px 20px; }
    .actor-area { align-items: flex-end; flex-direction: column; }
    .content { padding: 24px 16px; }
    .panel { padding: 22px 18px; }
    .page-actions { align-items: stretch; flex-direction: column; }
    .pagination { align-items: stretch; flex-direction: column; }
    .access-table { min-width: 0; }
    .access-table thead { display: none; }
    .access-table, .access-table tbody, .access-table tr, .access-table td { display: block; width: 100%; }
    .access-table tr { border: 1px solid #e2e7e4; border-radius: 10px; margin: 12px 0; padding: 8px; }
    .access-table td { border: 0; padding: 7px; }
    .access-facts { grid-template-columns: 1fr; }
    .access-facts dd { margin-bottom: 10px; }
    .pricing-entry-table { min-width: 0; }
    .pricing-entry-table thead { display: none; }
    .pricing-entry-table, .pricing-entry-table tbody, .pricing-entry-table tr, .pricing-entry-table td { display: block; width: 100%; }
    .pricing-entry-table tr { border: 1px solid #e2e7e4; border-radius: 10px; margin: 12px 0; padding: 8px; }
    .pricing-entry-table td { border: 0; padding: 7px; }
}
