/* File-platform components, adapted to PM's sidebar and work area. */
:root {
  --primary: var(--accent-ink-light, #316c9f);
  --control-fill: rgba(255,255,255,.7);
  --control-shadow: 0 3px 12px rgba(56,82,124,.06), inset 0 1px 0 rgba(255,255,255,.95);
  --surface-panel: linear-gradient(155deg,rgba(255,255,255,.68),rgba(255,255,255,.38));
}
body { background: var(--page-background); background-attachment: fixed; line-height: 1.55; }
.sidebar { background: var(--surface-panel); border-radius: 28px; border-color: var(--glass-border); }
.workspace { background: transparent; border: 0; border-radius: 0; }
.page-head { min-height: 78px; padding: 14px 20px; background: var(--surface-panel); border: 1px solid var(--glass-border); border-radius: 28px; margin-bottom: 18px; }
.page-head h1 { font-size: 22px; letter-spacing: -.4px; }
.page-head p { font-size: 13px; margin-top: 4px; }
.brand-mark { border: 0; border-radius: 0; background: transparent; color: var(--primary); }
.brand-mark::before { content: none; }
.brand-mark > svg { width: 32px; height: 32px; flex: none; }
.nav-link { border-radius: 999px; }
.nav-link:hover, .nav-link[aria-current] { background: var(--accent-tint); }
.sidebar-chat { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.sidebar-chat .nav-link svg { width: 18px; height: 18px; flex: none; }
.chat-unread { margin-left: auto; border-radius: 999px; padding: 1px 7px; color: var(--primary); background: var(--accent-tint); font-size: 11px; }
.chat-notice-list { display: grid; gap: 4px; }
.chat-notice { display: block; min-width: 0; padding: 9px 12px; border-radius: 14px; color: var(--text); }
.chat-notice:hover { background: var(--accent-tint); }
.chat-notice strong { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 500; }
.chat-notice strong span { color: var(--primary); }
.chat-notice small { display: block; margin-top: 4px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.chat-notice-status { display: block; padding: 0 12px; color: var(--muted); font-size: 11px; }
.chat-notice-status:empty { display: none; }
.project-member-picker { margin: 0; padding: 12px; border: 1px solid var(--glass-border); border-radius: 18px; min-width: 0; grid-column: 1 / -1; }
.project-member-picker legend { padding: 0 5px; font-size: 13px; color: var(--muted); }
.project-member-options { display: flex; flex-wrap: wrap; gap: 8px 18px; max-height: 180px; overflow-y: auto; margin-bottom: 8px; }
.project-member-options label { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.project-member-picker input[type="checkbox"] { appearance: auto; width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; box-shadow: none; accent-color: var(--primary); flex: none; }
.project-members-all { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; }
.member-portrait { display: inline-grid; place-items: center; width: 28px; height: 28px; font-size: 22px; line-height: 1; flex: none; }
.record-field > label { display: block; margin-bottom: 6px; }
.pm-select { position: relative; min-width: 0; }
.pm-select > select { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; padding: 0; pointer-events: none; }
.pm-select > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; min-height: 46px; padding: 10px 14px; border: 1px solid var(--glass-border); border-radius: 18px; background: var(--control-fill); box-shadow: var(--control-shadow); cursor: pointer; color: var(--text); font-size: 14px; }
.pm-select > summary::-webkit-details-marker { display: none; }
.pm-select > summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); margin: -4px 2px 0 6px; flex: none; }
.pm-select > summary[aria-disabled="true"] { opacity: .6; cursor: default; }
.pm-select[open] { z-index: 30; }
.pm-select[open] > summary { border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-tint); }
.pm-select-options { position: absolute; z-index: 31; top: calc(100% + 6px); left: 0; right: 0; max-height: 220px; overflow: auto; padding: 6px; border: 1px solid var(--glass-border); border-radius: 18px; background: var(--dialog-fill); backdrop-filter: blur(32px); box-shadow: var(--glass-shadow); }
.pm-select-options button { display: block; width: 100%; padding: 10px 12px; min-height: 40px; border: 0; border-radius: 12px; text-align: left; background: transparent; color: var(--text); box-shadow: none; }
.pm-select-options button:hover, .pm-select-options button[aria-pressed="true"] { background: var(--accent-tint); color: var(--primary); }
.button { min-height: 44px; padding: 9px 18px; font-size: 13px; }
.secondary, .icon-button { background: var(--control-fill); border-color: var(--glass-border); box-shadow: var(--control-shadow); }
.secondary:hover, .icon-button:hover { background: var(--accent-tint); }
.icon-button { width: 40px; height: 40px; }
.table-wrap, .board-card { border-radius: 20px; border-color: var(--glass-border); }
.records-panel { background: var(--panel); border: 1px solid var(--glass-border); border-radius: 28px; padding: 18px; min-width: 0; }
.records-panel .table-wrap { background: transparent; border: 0; }
.records-panel > #results > .empty { background: transparent; border: 0; border-radius: 18px; }
.filters { background: transparent; border: 0; border-radius: 0; padding: 0; align-items: center; }
.filters input, .filters select { min-height: 44px; border-radius: 999px; }
input, select, textarea { min-height: 46px; background-color: var(--control-fill); border-color: var(--glass-border); box-shadow: var(--control-shadow); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-tint); }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%235c6b83' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
select option { background: var(--bg); color: var(--text); }
.profile.profile-menu { position: relative; display: block; padding: 12px 0 0; border-top: 0; }
.profile-menu > summary { list-style: none; display: flex; gap: 9px; align-items: center; min-height: 58px; padding: 9px 12px; border: 1px solid var(--glass-border); border-radius: 999px; box-shadow: var(--control-shadow); cursor: pointer; }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-menu > summary > div { flex: 1; min-width: 0; }
.profile-menu strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu .avatar { background: transparent; box-shadow: none; border-color: var(--line); }
.profile-menu .avatar[data-chat-avatar="true"] { font-size: 24px; line-height: 1; border: 0; }
.profile-caret { width: 16px; height: 16px; flex: none; color: var(--muted); }
.profile-menu[open] .profile-caret { transform: rotate(180deg); }
.profile-menu .action-list { position: absolute; z-index: 20; left: 0; right: 0; bottom: calc(100% + 6px); top: auto; padding: 8px; border: 1px solid var(--glass-border); border-radius: 24px; background: var(--dialog-fill); box-shadow: var(--glass-shadow); backdrop-filter: blur(32px); }
.profile-menu .action-list :is(button,a) { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 10px 14px; border: 0; border-radius: 16px; background: transparent; color: var(--text); text-align: left; font-size: 14px; }
.profile-menu .action-list :is(button,a):hover { background: var(--accent-tint); }
.profile-menu .action-list .logout-item { color: var(--danger); }
.profile-menu .action-list svg { width: 20px; height: 20px; flex: none; }
.login h1 { margin: 0 0 12px; }
.login .floating-field label { display: block; margin: 0; }
.login-card { background: linear-gradient(145deg,rgba(255,255,255,.9),rgba(246,250,255,.83)); }
.login-panel .muted { color: var(--muted); }
.login-panel #login-form button.primary { font-size: 14px; }
.file-wallpaper-dialog form { max-height: none; display: block; }
.file-wallpaper-dialog input[type=radio] { width: auto; min-height: 0; }
@media (prefers-color-scheme: dark) {
  :root { --primary: var(--accent-ink-dark, #a7cfef); --control-fill: rgba(50,65,86,.55); --control-shadow: 0 3px 12px rgba(0,0,0,.1), inset 0 1px 0 rgba(222,235,255,.07); --surface-panel: linear-gradient(155deg,rgba(27,38,54,.76),rgba(17,25,38,.6)); }
  .login-card { background: linear-gradient(145deg,rgba(39,52,73,.96),rgba(26,37,55,.94)); }
}
@media (max-width: 760px) { .page-head { padding: 14px 16px; } .profile-menu .action-list { left: auto; width: 190px; } }
@media (prefers-reduced-transparency: reduce) { .sidebar, .page-head, .profile-menu .action-list { background: var(--bg); } }

.project-heading { margin-bottom: 22px; min-width: 0; }
.project-title { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.project-identity { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; }
.project-title h1 { margin: 0; font-size: 24px; font-weight: 600; overflow-wrap: anywhere; }
.project-title > .text-link { flex: none; }
.project-back {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px;
  width: 40px; height: 40px; border: 1px solid var(--glass-border); border-radius: 50%;
  background: var(--control-fill); color: var(--muted); box-shadow: var(--control-shadow);
  transition: background .16s, color .16s, transform .12s;
}
.project-back svg { width: 26px; height: 26px; }
.project-back:hover { background: var(--accent-tint); color: var(--primary); }
.project-back:active { transform: scale(.92); }
.project-back:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .project-back { transition: none; } .project-back:active { transform: none; } }
.project-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.project-tabs a { flex: none; padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.project-tabs a:hover { color: var(--primary); background: var(--accent-tint); }
.project-tabs a[aria-current] { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.project-description { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 22px; }
.page-head h2 { font-size: 18px; font-weight: 600; }
.pill.confirmed { background: var(--accent-tint); color: var(--primary); }
@media (max-width: 620px) {
  .project-title h1 { font-size: 21px; }
  .project-tabs a { padding-inline: 11px; }
}
.requirement-sections { display: flex; gap: 6px; margin: 0 0 16px; flex-wrap: wrap; }
.requirement-sections a { color: var(--muted); padding: 6px 13px; border-radius: 999px; font-size: 13px; }
.requirement-sections a[aria-current] { color: var(--primary); background: var(--accent-tint); font-weight: 600; }
.requirement-links { display: flex; flex-wrap: wrap; gap: 12px; }
.records-panel td:last-child { white-space: nowrap; }

@media (max-width: 760px) {
  .sidebar {
    grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 10px;
    background: transparent; border: 0; border-radius: 0; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .sidebar > .brand { grid-column: 1; grid-row: 1; min-width: 0; padding: 0; gap: 8px; font-size: 16px; }
  .sidebar .brand-mark { width: 32px; height: 32px; }
  .sidebar .brand small { font-size: 10px; }
  .profile.profile-menu {
    grid-column: 2; grid-row: 1; justify-self: end; align-self: center;
    width: auto; min-width: 0; max-width: 150px; margin: 0; padding: 0;
  }
  .profile-menu > summary { min-height: 44px; padding: 6px 9px; gap: 6px; }
  .profile-menu .avatar { width: 28px; height: 28px; }
  .profile-menu > summary > div { max-width: 72px; }
  .profile-menu .action-list { left: auto; right: 0; top: calc(100% + 8px); bottom: auto; }
  .sidebar-navigation {
    display: flex; grid-column: 1 / -1; grid-row: 2; align-items: center;
    min-width: 0; overflow-x: auto; padding: 6px;
    background: var(--surface-panel); border: 1px solid var(--glass-border); border-radius: 999px;
    box-shadow: var(--control-shadow);
    -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%);
  }
  .sidebar-navigation #nav { flex: none; overflow: visible; gap: 2px; }
  .sidebar-navigation .sidebar-chat { flex: none; margin: 0 0 0 6px; padding: 0 0 0 6px; border-top: 0; border-left: 1px solid var(--line); }
  .sidebar-navigation .nav-link { min-height: 40px; padding: 8px; gap: 6px; font-size: 13px; }
  .project-title { gap: 8px; }
}
@media (max-width: 360px) {
  .sidebar-navigation .nav-link { padding-inline: 6px; gap: 4px; font-size: 12px; }
  .sidebar-navigation #nav { gap: 0; }
  .sidebar-navigation .sidebar-chat { margin-left: 4px; padding-left: 4px; }
  .project-title h1 { font-size: 18px; }
  .project-identity { column-gap: 8px; }
}
@media (max-width: 760px) {
  .profile-menu[open] > .action-list { display: block; }
}

@media (max-width: 760px) and (prefers-reduced-transparency: reduce) {
  .sidebar-navigation { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (max-width: 760px) {
  .sidebar-navigation { flex-wrap: nowrap; overflow-x: auto; border-radius: 999px; }
  .sidebar-navigation .sidebar-chat {
    display: flex; align-items: center; gap: 8px; flex: 1 0 92px; min-width: 0;
    padding-left: 10px; container-type: inline-size;
  }
  .sidebar-chat > .nav-link { flex: none; margin: 0; border: 0; border-radius: 999px; white-space: nowrap; }
  .chat-notice-list { display: none; flex: 1; min-width: 0; }
  .chat-notice-list:empty, .chat-notice-status { display: none; }
  .chat-notice { display: flex; align-items: center; gap: 8px; padding: 4px 8px; }
  .chat-notice:not(:first-child) { display: none; }
  .chat-notice strong { display: block; flex: 0 1 auto; max-width: 84px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .chat-notice strong span { display: none; }
  .chat-notice small { flex: 1; min-width: 0; margin-top: 0; }
  @container (min-width: 240px) { .chat-notice-list:not(:empty) { display: block; } }
}
@media (max-width: 360px) {
  .sidebar-navigation .sidebar-chat { flex-basis: 82px; padding-left: 6px; }
}
