:root {
    --accent: #2563eb;
    --surface: #fff;
    --border: #dfe3e8;
    --muted: #667085;
}
.dark { --accent: #60a5fa; --surface: #1f2937; --border: #374151; --muted: #9ca3af; }
body { min-height: 100vh; display: flex; flex-direction: column; letter-spacing: 0; }
.material-symbols-outlined { font-size: 20px; flex-shrink: 0; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.material-symbols-outlined.hidden { display: none; }
.app-nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding: 12px 24px; border-bottom: 1px solid var(--border); }
.app-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; white-space: nowrap; }
.brand-logo { width: 190px; height: auto; }
.brand-logo-dark { display: none; }
.dark .brand-logo-light { display: none; }
.dark .brand-logo-dark { display: block; }
.app-links, .app-controls { display: flex; align-items: center; gap: 6px; min-width: 0; }
.app-controls { justify-self: end; gap: 10px; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.nav-link:hover, .nav-link.is-active { color: var(--accent); background: #eff6ff; }
.dark .nav-link:hover, .dark .nav-link.is-active { background: #25334a; }
.icon-button { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 6px; }
.icon-button:hover { background: #e5e7eb; }
.dark .icon-button:hover { background: #374151; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-main { flex: 1; }
.app-footer { display: flex; justify-content: center; gap: 12px; padding: 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); background: var(--surface); }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.workspace-heading h1 { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; }
.workspace-heading h1 .material-symbols-outlined { color: var(--accent); }
.section-toggle { width: 100%; display: flex; align-items: center; gap: 10px; padding: 16px; margin-bottom: 16px; border-radius: 6px; background: #2563eb; text-align: center; color: #fff; font-weight: 700; box-shadow: 0 2px 4px #00000014; }
.section-toggle:hover { background: #1d4ed8; }
.section-toggle > :nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.section-toggle > :last-child { margin-left: auto; }
.language-switch { display: flex; align-items: center; padding: 3px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.language-option { position: relative; cursor: pointer; }
.language-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.language-option span { display: flex; align-items: center; justify-content: center; width: 34px; height: 28px; border-radius: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.language-option input:checked + span { background: #2563eb; color: #fff; }
.language-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
#eval-form .box-base, #eval-form .box-green, #eval-form .box-yellow, #eval-form .box-red { border-width: 1px 1px 1px 4px; border-radius: 6px; }
#eval-form h2 { font-size: 16px; }
#eval-form input:not([type=hidden]), #eval-form select { min-height: 42px; }
#eval-form input, #eval-form select, .project-item { min-width: 0; }
#feasibility-title { font-size: 12px; text-align: left; letter-spacing: 0; }
.status-box { border-radius: 6px; box-shadow: none; }
.project-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.project-identity { min-width: 0; overflow-wrap: anywhere; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-shrink: 0; }
.project-item > div { border: 1px solid var(--border); border-left-width: 4px; box-shadow: none; }
.project-item > div:hover { box-shadow: 0 2px 8px #0000000a; }
.project-item .grid > div { overflow-wrap: anywhere; }
.access-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.access-sidebar { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.access-sidebar .nav-link { white-space: normal; }
.access-panel { min-width: 0; }
.access-list-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.access-list-heading .access-heading { margin-bottom: 0; }
.user-company-group { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.user-company-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.user-company-heading h3 { font-size: 18px; font-weight: 700; }
.access-card { margin-bottom: 16px; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.access-card summary { cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }
.access-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.access-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.access-form input:not([type=checkbox]), .access-form select { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: inherit; }
.access-form label.access-check { flex-direction: row; align-items: center; }
.access-form input[type=checkbox] { width: 18px; height: 18px; }
.access-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; grid-column: 1 / -1; }
.access-button { padding: 8px 14px; border-radius: 6px; background: #2563eb; color: white; font-weight: 600; }
.access-button:hover { background: #1d4ed8; }
.access-button:disabled { opacity: .6; cursor: wait; }
.access-danger { background: #b91c1c; }
.access-danger:hover { background: #991b1b; }
.access-help { margin-top: 8px; font-size: 13px; color: var(--muted); }
.access-heading { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.access-notice { margin-bottom: 20px; padding: 12px; border-radius: 6px; overflow-wrap: anywhere; }
.access-notice:empty { display: none; }
.access-notice[data-status=error] { background: #fee2e2; color: #991b1b; }
.access-notice[data-status=success] { background: #dcfce7; color: #166534; }
.permission-company-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.permission-company-heading h3 { font-size: 18px; font-weight: 700; }
.permission-table-scroll { overflow-x: auto; margin-bottom: 20px; }
.permission-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.permission-table th, .permission-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); }
.permission-table thead { background: #f3f4f6; }
.dark .permission-table thead { background: #111827; }
.permission-table th { text-align: left; font-weight: 600; }
.permission-table td, .permission-table thead th:not(:first-child) { text-align: center; }
.permission-table input { width: 18px; height: 18px; accent-color: #2563eb; vertical-align: middle; }
.permission-table input:disabled { opacity: .5; cursor: not-allowed; }
.permission-admin-note { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
@media (max-width: 1100px) {
    .app-nav { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px 16px; }
    .app-links { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; }
    .app-controls { grid-column: 2; grid-row: 1; }
}
@media (max-width: 767px) {
    .app-header { position: relative; }
    .app-brand { gap: 4px; min-width: 0; white-space: normal; }
    .brand-logo { width: 140px; max-width: 100%; }
    .app-controls { gap: 4px; }
    .project-topline { flex-direction: column; }
    .project-actions { width: 100%; }
    #sticky-surface .grid { gap: 8px; }
    .status-box { padding: 12px; }
    .workspace-heading h1 { font-size: 20px; }
    .access-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .access-sidebar { flex-direction: row; flex-wrap: wrap; }
    .access-form { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}