:root {
    --canvas: #f5f5f3;
    --surface: #fff;
    --ink: #232624;
    --muted: #70756f;
    --line: #e7e8e3;
    --gold: #a18245;
    --sidebar-width: 256px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 28px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, .btn { touch-action: manipulation; }
:focus-visible { outline: 3px solid #a1824580; outline-offset: 4px; }
.icon { display: inline-block; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.skip-link { position: fixed; z-index: 2000; top: -80px; left: 20px; padding: 14px 20px; background: var(--ink); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-sidebar { --bs-offcanvas-width: 290px; background: var(--surface) !important; border-right: 1px solid var(--line); }
.app-sidebar .offcanvas-header { padding: 32px 22px 38px; }
.brand { display: flex; gap: 10px; align-items: center; font-size: 16px; font-weight: 650; letter-spacing: -.5px; }
.brand small { display: block; font-size: 10px; font-weight: 400; letter-spacing: .1px; color: var(--muted); margin-top: 3px; }
.app-sidebar .offcanvas-body { flex-direction: column; padding: 0 16px 20px; }
.sidebar-navigation { width: 100%; }
.nav-caption { font-size: 9px; color: #858b84; font-weight: 650; letter-spacing: 1.25px; padding: 0 14px; margin: 0 0 13px; }
.planned-caption { margin-top: 16px; margin-bottom: 3px; }
.sidebar-group summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; list-style: none; }
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-group summary::after { content: ""; width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); margin-left: auto; }
.sidebar-group[open] summary::after { transform: rotate(225deg); }
.sidebar-link { display: flex; gap: 13px; align-items: center; padding: 13px 14px; font-size: 12px; border-radius: 9px; margin-bottom: 3px; min-height: 44px; }
.sidebar-link .icon { width: 18px; height: 18px; color: #80867d; }
.sidebar-link.active { background: #f1f2ed; color: #3d4936; font-weight: 600; }
.sidebar-link.active .icon { color: #5d6b50; }
.sidebar-link.planned { color: #777d75; cursor: default; }
.sidebar-bottom { margin-top: auto; padding-top: 32px; }
.workspace-note { display: flex; align-items: flex-start; gap: 9px; padding: 16px 13px; font-size: 11px; border-top: 1px solid var(--line); }
.workspace-note small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.status-dot { display: inline-block; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.workspace-note .status-dot { margin-top: 4px; }
.logout-button { width: 100%; border: 0; background: transparent; color: var(--muted); text-align: left; }
.app-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 88px; padding: 0 40px; border-bottom: 1px solid var(--line); background: #ffffffb3; }
.header-location, .header-actions { display: flex; gap: 20px; align-items: center; min-width: 0; }
.header-location .menu-toggle { padding: 8px; min-height: 44px; min-width: 44px; }
.page-breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 10px; color: var(--muted); margin-bottom: 5px; }
.page-breadcrumb a:hover { color: var(--ink); }
.header-title { font-size: 14px; font-weight: 550; }
.account-link { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #565d54; min-height: 44px; }
.account-label { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-avatar { display: flex; align-items: center; justify-content: center; background: #eeefe9; width: 32px; height: 32px; border: 1px solid #e3e6dd; border-radius: 50%; }
.user-avatar .icon { width: 16px; height: 16px; }
.btn-install { font-size: 11px; color: var(--muted); min-height: 44px; }
.btn-install .icon { width: 16px; margin-right: 5px; }
.page-content { max-width: 1460px; margin: 0 auto; padding: 45px 40px 28px; }
.welcome-section { margin-bottom: 36px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 9px; font-weight: 650; letter-spacing: 1.5px; }
.eyebrow-line { width: 20px; height: 1px; background: var(--gold); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -1.65px; line-height: 1.15; font-weight: 600; }
.welcome-section h1 { margin: 16px 0 13px; }
.gold-period { color: var(--gold); }
.welcome-subtitle { font-size: 18px; line-height: 1.5; letter-spacing: -.3px; color: #60685c; margin-bottom: 10px; }
.welcome-description { color: var(--muted); font-size: 12px; margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 3px #202b1a02; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; }
.overview-panel { padding: 24px 26px; }
.panel-topline { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.panel-label { color: #777e73; font-size: 9px; font-weight: 600; letter-spacing: 1.1px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; background: #f7f4ec; color: #8c7342; padding: 5px 8px; font-size: 9px; border-radius: 5px; }
.status-badge .status-dot { width: 4px; height: 4px; }
.empty-overview { padding: 32px 0 26px; text-align: center; }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 13px; color: #a0a99a; background: #f4f5f0; margin-bottom: 17px; }
.empty-icon .icon { width: 24px; height: 24px; }
.empty-overview h2 { font-size: 17px; letter-spacing: -.3px; margin-bottom: 9px; }
.empty-overview p { color: var(--muted); font-size: 11px; margin-bottom: 12px; }
.subtle-label { font-size: 10px; color: #858b81; }
.getting-started-panel { padding: 27px; background: #eff0e9; border-color: #e3e6db; }
.getting-started-panel h2 { font-size: 25px; line-height: 1.25; letter-spacing: -.8px; font-weight: 550; margin: 18px 0 12px; }
.getting-started-panel p { font-size: 11px; color: #70796a; line-height: 1.7; max-width: 230px; }
.text-action { display: inline-flex; align-items: center; gap: 22px; padding: 10px 0; font-size: 11px; font-weight: 600; border-bottom: 1px solid #aeb7a3; }
.text-action:hover { color: #526044; }
.getting-started-footer { display: flex; align-items: center; gap: 7px; border-top: 1px solid #dfe3d7; margin-top: 24px; padding-top: 15px; font-size: 9px; color: #7b8474; }
.getting-started-footer .icon { width: 14px; height: 14px; }
.modules-section { margin-top: 44px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 18px; }
.section-heading h2 { margin: 9px 0 8px; font-size: 23px; letter-spacing: -.7px; font-weight: 550; }
.section-heading p { font-size: 11px; color: var(--muted); margin-bottom: 0; }
.module-search { position: relative; display: flex; align-items: center; gap: 9px; width: 246px; min-height: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding-left: 12px; flex-shrink: 0; }
.module-search > .icon { color: #838a7d; width: 16px; height: 16px; }
.module-search input { border: 0; outline: none; background: transparent; padding: 11px 0; min-width: 0; width: 100%; font-size: 11px; color: var(--ink); }
.module-search:focus-within { outline: 2px solid #a1824580; outline-offset: 2px; }
.search-submit { background: transparent; border: 0; color: var(--muted); min-width: 42px; min-height: 44px; }
.search-progress { position: absolute; top: 100%; right: 0; font-size: 10px; color: var(--muted); margin-top: 4px; }
.htmx-indicator { visibility: hidden; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { visibility: visible; }
.results-count { font-size: 10px; color: var(--muted); margin-bottom: 12px; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.module-card { min-width: 0; padding: 20px; }
.module-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 20px; }
.module-icon { display: flex; align-items: center; justify-content: center; width: 33px; height: 33px; border: 1px solid #eceee6; border-radius: 8px; color: #75816b; background: #f8f9f5; }
.module-icon .icon { width: 17px; height: 17px; }
.module-state { font-size: 10px; color: #70766b; background: #f5f5f2; padding: 4px 6px; border-radius: 4px; white-space: nowrap; }
.module-state.available { color: #667650; background: #eff3e8; }
.module-card h3 { font-size: 14px; font-weight: 550; letter-spacing: -.15px; margin-bottom: 7px; }
.module-card p { font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 0; }
.search-empty { padding: 44px 20px; text-align: center; }
.search-empty > .icon { color: var(--muted); margin-bottom: 15px; }
.search-empty h3 { font-size: 17px; }
.search-empty p { color: var(--muted); font-size: 12px; }
.connection-note { display: flex; align-items: flex-start; justify-content: center; gap: 9px; margin: 28px 0 6px; color: #818879; }
.connection-note .icon { width: 14px; height: 14px; margin-top: 1px; }
.connection-note p { font-size: 10px; margin: 0; line-height: 1.7; }
.connection-note span { color: var(--muted); }
.app-footer { display: flex; justify-content: space-between; max-width: 1460px; margin: 0 auto; padding: 18px 40px 24px; color: #868d7e; font-size: 9px; border-top: 1px solid var(--line); }
.notice { padding: 14px 16px; border: 1px solid #dfd5bc; border-radius: 9px; margin-bottom: 24px; font-size: 12px; background: #fcf8ec; color: #6e5b32; }
.notice-update { display: flex; gap: 20px; align-items: center; justify-content: space-between; background: #eff3e8; border-color: #d9e2ce; color: #4e5d3e; }
.btn { border-radius: 8px; min-height: 44px; padding: 11px 16px; font-size: 12px; }
.btn-dark { background: #30382b; border-color: #30382b; }
.btn-dark:hover, .btn-dark:focus { background: #48533f; border-color: #48533f; }
.btn-sm { padding: 8px 12px; }
.form-label { font-size: 12px; font-weight: 550; }
.form-control { min-height: 48px; border-color: #e0e3da; border-radius: 8px; font-size: 16px; }
.form-control:focus { border-color: #9ba78e; box-shadow: 0 0 0 3px #9ba78e26; }
.validation-message { font-size: 12px; color: #9e3d35; margin: 8px 0 16px; }
.validation-message.validation-summary-valid, .validation-message.field-validation-valid { display: none; }
.page-intro { margin-bottom: 28px; }
.page-intro h1 { margin: 17px 0; }
.page-intro p { color: var(--muted); }
.account-panel { padding: 32px; max-width: 680px; }
.account-panel h2 { font-size: 23px; }
.account-panel p { line-height: 1.8; }
.auth-container { max-width: 440px; margin: 16px auto 40px; }
.auth-panel { padding: 36px; }
.auth-brand { margin-bottom: 28px; }
.auth-panel h1 { font-size: 27px; letter-spacing: -.9px; margin: 14px 0; }
.auth-panel > p { font-size: 12px; line-height: 1.8; color: var(--muted); margin-bottom: 30px; }
.auth-note { display: flex; gap: 8px; padding-top: 23px; margin-top: 25px; border-top: 1px solid var(--line); color: var(--muted); }
.auth-note .icon { width: 15px; height: 15px; }
.auth-note p { font-size: 10px; margin: 0; }
.auth-connection { font-size: 11px; text-align: center; color: var(--muted); margin-top: 18px; }
.message-panel { padding: 48px 32px; text-align: center; max-width: 680px; margin: 30px auto; }
.message-panel h1 { font-size: 30px; letter-spacing: -.8px; }
.message-panel p { color: var(--muted); line-height: 1.8; margin: 20px 0 26px; }
.message-panel .trace-reference { font-size: 10px; margin-bottom: 0; overflow-wrap: anywhere; }
.offline-page { display: grid; place-items: center; min-height: 100dvh; padding: 24px; }
.offline-page .brand { justify-content: center; margin-bottom: 35px; }
.offline-page .btn { display: inline-block; background: #30382b; color: white; }
.table-responsive { max-width: 100%; overscroll-behavior-x: contain; }
@media (min-width: 992px) {
    .app-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); height: 100dvh; z-index: 1030; display: flex; flex-direction: column; }
    .app-sidebar .offcanvas-header { display: flex; }
    .app-sidebar .offcanvas-body { display: flex; flex: 1; overflow-y: auto; }
    .app-main { margin-left: var(--sidebar-width); min-height: 100dvh; display: flex; flex-direction: column; }
    .page-content { width: 100%; flex: 1; }
    .app-footer { width: calc(100% - 80px); padding-left: 0; padding-right: 0; }
}
@media (max-width: 1199.98px) and (min-width: 992px) {
    :root { --sidebar-width: 232px; }
    .page-content { padding: 32px 28px; }
    .app-header { padding: 0 28px; }
    .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .module-search { width: 210px; }
}
@media (max-width: 991.98px) {
    .app-header { height: calc(78px + env(safe-area-inset-top)); padding: calc(12px + env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); }
    .header-location { gap: 12px; }
    .app-sidebar .offcanvas-header { padding: max(28px, env(safe-area-inset-top)) 22px 32px; }
    .app-sidebar .offcanvas-body { display: flex; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
    .page-content { padding: 32px max(28px, env(safe-area-inset-right)) 20px max(28px, env(safe-area-inset-left)); }
    .app-main { padding-bottom: calc(70px + env(safe-area-inset-bottom)); min-height: 100dvh; }
    .app-footer { margin: 0 28px; padding: 18px 0; }
    .mobile-navigation { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1020; display: flex; justify-content: space-around; align-items: center; padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: #fffffff5; border-top: 1px solid var(--line); }
    .mobile-navigation a, .mobile-navigation button { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; min-height: 48px; min-width: 64px; color: #626d5b; font-size: 9px; border: none; background: transparent; }
    .mobile-navigation .icon { width: 20px; height: 20px; }
    .sidebar-link { font-size: 14px; min-height: 48px; }
}
@media (max-width: 639.98px) {
    .app-header { gap: 8px; padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
    .header-actions { gap: 8px; }
    .account-label { display: none; }
    .account-link { min-width: 44px; justify-content: center; }
    .btn-install { padding: 6px; }
    .btn-install span { display: none; }
    .btn-install .icon { margin: 0; width: 20px; }
    .page-content { padding: 28px max(20px, env(safe-area-inset-right)) 20px max(20px, env(safe-area-inset-left)); }
    .welcome-section { margin-bottom: 27px; }
    .welcome-section h1 { font-size: 34px; margin-top: 17px; }
    .welcome-subtitle { font-size: 16px; max-width: 330px; }
    .welcome-description { font-size: 11px; line-height: 1.7; }
    .overview-grid { grid-template-columns: 1fr; gap: 14px; }
    .overview-panel { padding: 22px 20px; }
    .empty-overview { padding: 28px 0 17px; }
    .empty-overview p { max-width: 260px; margin-left: auto; margin-right: auto; line-height: 1.8; }
    .getting-started-panel { padding: 24px; }
    .getting-started-panel h2 { font-size: 24px; }
    .getting-started-panel h2 br { display: none; }
    .getting-started-panel p { max-width: none; }
    .getting-started-footer { margin-top: 17px; }
    .modules-section { margin-top: 32px; }
    .section-heading { flex-direction: column; align-items: stretch; gap: 20px; margin-bottom: 15px; }
    .section-heading h2 { font-size: 22px; }
    .module-search { width: 100%; }
    .module-search input { font-size: 16px; }
    .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .module-card { padding: 16px 13px; }
    .module-card-heading { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 13px; }
    .module-card h3 { font-size: 13px; line-height: 1.5; }
    .module-card p { font-size: 12px; }
    .module-state { font-size: 10px; }
    .connection-note { justify-content: flex-start; margin-top: 24px; }
    .connection-note span { display: block; }
    .app-footer { margin: 0 20px; }
    .auth-container { margin-top: 0; }
    .auth-panel { padding: 28px 24px; }
    .auth-panel h1 { font-size: 25px; }
    .account-panel { padding: 24px; }
    .message-panel { padding: 32px 24px; }
    .notice-update { align-items: flex-start; }
}
@media (max-width: 359.98px) {
    .module-grid { grid-template-columns: 1fr; }
    .module-card-heading { flex-direction: row; align-items: center; }
    .welcome-section h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
