/* AORYN Portal — view-specific styles (dashboard, project, files, messages, proposals, settings) */

/* DASHBOARD */
.dash-hero { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 36px; }
.dash-hero h1 { font-family: var(--font-display); font-size: 56px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 8px; }
.dash-hero .sub { color: var(--fg-2); font-size: 15px; }
.next-card { padding: 16px 22px; min-width: 260px; display: flex; flex-direction: column; gap: 6px; }
.next-card .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-3); }
.next-card .when { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.01em; }
.next-card .what { font-size: 13px; color: var(--fg-2); }

.project-card { padding: 36px; margin-bottom: 32px; position: relative; overflow: hidden; }
.project-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 100%, rgba(255,107,53,0.10), transparent 50%), radial-gradient(circle at 100% 0%, rgba(91,107,255,0.08), transparent 50%); pointer-events: none; }
.project-card > * { position: relative; }
.project-card-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 28px; }
.project-card h2 { font-family: var(--font-display); font-size: 36px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; margin: 8px 0 4px; }
.project-card .deadline { font-size: 13px; color: var(--fg-2); }
.project-card .pct { font-family: var(--font-display); font-size: 64px; font-weight: 400; letter-spacing: -0.03em; line-height: 1; text-align: right; }
.project-card .pct .pct-num { display: inline-block; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.project-card .pct .pct-sm { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-3); display: block; margin-top: 4px; }

.bar { position: relative; height: 12px; border-radius: 999px; background: rgba(255,255,255,0.04); overflow: hidden; margin-bottom: 28px; }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--grad-brand); border-radius: 999px; width: 0; animation: barFill 1.5s 0.2s var(--ease) forwards; box-shadow: 0 0 16px rgba(255,107,53,0.4); }
.bar .fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); animation: barShine 2.5s infinite; }
@keyframes barFill { to { width: var(--pct, 72%); } }
@keyframes barShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.phase-now { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); margin-bottom: 22px; }
.phase-now .dot-live { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); position: relative; flex-shrink: 0; }
.phase-now .dot-live::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--ok); animation: pingExpand 2s ease-out infinite; }
.phase-now .info { flex: 1; }
.phase-now .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ok); margin-bottom: 4px; }
.phase-now .name { font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.phase-now .desc { font-size: 12px; color: var(--fg-2); }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-mini { padding: 16px; border-radius: 12px; background: rgba(255,255,255,0.02); border: 1px solid var(--line); }
.stat-mini .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 6px; }
.stat-mini .val { font-family: var(--font-display); font-size: 28px; letter-spacing: -0.01em; line-height: 1; }
.stat-mini .val small { font-size: 16px; color: var(--fg-3); }

.timeline-card { padding: 28px 32px; margin-bottom: 32px; }
.timeline-card .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.timeline-card h3 { font-family: var(--font-display); font-size: 22px; font-weight: 400; letter-spacing: -0.01em; }
.timeline { position: relative; display: flex; justify-content: space-between; padding: 12px 0 28px; }
.timeline::before { content: ''; position: absolute; left: 5%; right: 5%; top: 24px; height: 2px; background: rgba(255,255,255,0.06); border-radius: 2px; }
.timeline::after { content: ''; position: absolute; left: 5%; top: 24px; height: 2px; background: var(--grad-brand); width: calc(var(--progress, 60%) - 0px); border-radius: 2px; box-shadow: 0 0 12px rgba(255,107,53,0.4); }
.phase { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 1; width: 60px; }
.phase .circle { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-2); border: 2px solid rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--fg-3); transition: all .3s var(--ease); }
.phase.done .circle { background: var(--grad-brand); border-color: transparent; color: white; }
.phase.active .circle { background: var(--bg-2); border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px rgba(255,107,53,0.12), 0 0 20px rgba(255,107,53,0.4); animation: phasePulse 2s ease-in-out infinite; }
@keyframes phasePulse { 50% { box-shadow: 0 0 0 8px rgba(255,107,53,0.08), 0 0 30px rgba(255,107,53,0.5); } }
.phase .name { font-size: 12px; color: var(--fg-2); white-space: nowrap; }
.phase.done .name, .phase.active .name { color: var(--fg); }
.phase .date { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.05em; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.panel { padding: 24px; }
.panel h3 { font-family: var(--font-display); font-size: 20px; font-weight: 400; letter-spacing: -0.01em; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; }
.panel h3 .count { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.18em; }
.panel .more { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; font-size: 12px; color: var(--accent-purple); font-family: var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; transition: gap .2s; }
.panel .more:hover { gap: 8px; }

.activity-item { display: flex; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: none; }
.activity-item .av { width: 28px; height: 28px; font-size: 10px; flex-shrink: 0; }
.activity-item .content { flex: 1; min-width: 0; }
.activity-item .what { font-size: 13px; line-height: 1.4; }
.activity-item .what strong { color: var(--fg); font-weight: 500; }
.activity-item .when { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.08em; margin-top: 4px; }

.milestone-item { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.milestone-item:last-child { border-bottom: none; }
.milestone-item .date-chip { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px; text-align: center; }
.milestone-item .date-chip .d { font-family: var(--font-display); font-size: 18px; line-height: 1; }
.milestone-item .date-chip .m { font-family: var(--font-mono); font-size: 9px; color: var(--fg-3); letter-spacing: 0.15em; text-transform: uppercase; }
.milestone-item .title { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.milestone-item .desc { font-size: 12px; color: var(--fg-2); line-height: 1.4; }
.milestone-item .mini-bar { margin-top: 8px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.06); overflow: hidden; }
.milestone-item .mini-bar .f { height: 100%; background: var(--grad-brand); }

.file-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.file-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); background-size: cover; background-position: center; overflow: hidden; transition: transform .3s var(--ease), border-color .3s var(--ease); cursor: pointer; }
.file-thumb:hover { transform: scale(1.03); border-color: var(--line-2); }
.file-thumb .new { position: absolute; top: 6px; right: 6px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.15em; padding: 3px 6px; background: var(--accent); color: white; border-radius: 4px; }

.cta-banner { padding: 28px 32px; display: flex; justify-content: space-between; align-items: center; gap: 24px; background: linear-gradient(135deg, rgba(255,107,53,0.08), rgba(91,107,255,0.08)); border: 1px solid rgba(255,107,53,0.15); }
.cta-banner h3 { font-family: var(--font-display); font-size: 24px; font-weight: 400; letter-spacing: -0.01em; }
.cta-banner p { font-size: 14px; color: var(--fg-2); margin-top: 4px; }
.cta-banner .btn-primary { width: auto; padding: 12px 22px; }

/* PROJECT DETAIL */
.proj-hero { position: relative; aspect-ratio: 21/9; max-height: 360px; background-size: cover; background-position: center; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 32px; }
.proj-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(10,6,19,0.95)); }
.proj-hero-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 40px; z-index: 1; }
.proj-hero-content .eyebrow { margin-bottom: 14px; }
.proj-hero-content h1 { font-family: var(--font-display); font-size: 64px; font-weight: 400; letter-spacing: -0.025em; line-height: 1; margin-bottom: 14px; }
.proj-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.proj-tags .tag { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid var(--line); backdrop-filter: blur(10px); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; }

.proj-progress { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding: 28px 32px; margin-bottom: 32px; }
.proj-segments { display: flex; gap: 6px; margin-bottom: 14px; }
.proj-segments .seg { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.06); position: relative; overflow: hidden; }
.proj-segments .seg.done { background: var(--grad-brand); }
.proj-segments .seg.partial::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 50%); background: var(--grad-brand); }
.proj-progress .lbl { font-size: 13px; color: var(--fg-2); }

.tabs { display: flex; gap: 4px; padding: 4px; background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 28px; width: fit-content; }
.tab { padding: 8px 18px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--fg-2); transition: background .2s, color .2s; }
.tab:hover { color: var(--fg); }
.tab.active { color: var(--fg); background: rgba(255,255,255,0.06); }

.phase-acc { border-radius: 16px; background: rgba(255,255,255,0.02); border: 1px solid var(--line); margin-bottom: 10px; overflow: hidden; transition: border-color .3s var(--ease); }
.phase-acc.current { border-color: rgba(255,107,53,0.4); background: rgba(255,107,53,0.04); }
.phase-acc-head { display: flex; align-items: center; gap: 16px; padding: 18px 24px; cursor: pointer; width: 100%; text-align: left; }
.phase-acc-head .status { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: rgba(255,255,255,0.04); border: 2px solid var(--line-2); }
.phase-acc.done .status { background: var(--grad-brand); border-color: transparent; color: white; }
.phase-acc.current .status { background: rgba(255,107,53,0.15); border-color: var(--accent); color: var(--accent); animation: phasePulse 2s ease-in-out infinite; }
.phase-acc .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.phase-acc-head .info { flex: 1; }
.phase-acc-head .num { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.2em; text-transform: uppercase; }
.phase-acc-head .title { font-family: var(--font-display); font-size: 22px; font-weight: 400; letter-spacing: -0.01em; margin-top: 2px; }
.phase-acc-head .meta { font-size: 12px; color: var(--fg-2); margin-top: 4px; }
.phase-acc-head .chev { color: var(--fg-3); transition: transform .3s var(--ease); }
.phase-acc[data-open="true"] .chev { transform: rotate(180deg); }
.phase-acc-body { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.phase-acc[data-open="true"] .phase-acc-body { max-height: 800px; }
.phase-acc-content { padding: 0 24px 24px; border-top: 1px solid var(--line); }
.subtask { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 14px; }
.subtask .check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.subtask.done .check { background: var(--grad-brand); border-color: transparent; color: white; }
.subtask.done svg { width: 10px; height: 10px; }
.subtask.now .check { border-color: var(--accent); background: rgba(255,107,53,0.1); }
.subtask.now .check::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.subtask.done .label { color: var(--fg-2); text-decoration: line-through; }
.subtask.now .label { color: var(--fg); font-weight: 500; }

.fab { position: fixed; bottom: 28px; right: 28px; z-index: 30; width: 56px; height: 56px; border-radius: 50%; background: var(--grad-brand); display: flex; align-items: center; justify-content: center; color: white; box-shadow: 0 12px 32px -8px rgba(233, 30, 99, 0.5); transition: transform .3s var(--ease); }
.fab:hover { transform: scale(1.08) rotate(45deg); }
.fab svg { width: 24px; height: 24px; }

/* FILES */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.section-head h1 { font-family: var(--font-display); font-size: 44px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 6px; }
.section-head .sub { color: var(--fg-2); font-size: 14px; }

.files-toolbar { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; flex-wrap: wrap; }
.chip-group { display: flex; gap: 4px; padding: 4px; background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: 999px; }
.chip { padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--fg-2); transition: background .2s, color .2s; }
.chip:hover { color: var(--fg); }
.chip.active { background: rgba(255,255,255,0.08); color: var(--fg); }
.toolbar-spacer { flex: 1; }

.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.file-card { border-radius: 14px; background: rgba(21, 16, 31, 0.6); backdrop-filter: blur(20px); border: 1px solid var(--line); overflow: hidden; cursor: pointer; transition: transform .3s var(--ease), border-color .3s var(--ease); position: relative; }
.file-card:hover { transform: translateY(-4px); border-color: var(--accent-purple); }
.file-card .preview { aspect-ratio: 4/3; background: rgba(255,255,255,0.02); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: var(--fg-3); position: relative; }
.file-card .preview svg { width: 42px; height: 42px; }
.file-card .new { position: absolute; top: 10px; left: 10px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.18em; padding: 3px 8px; background: var(--accent); color: white; border-radius: 4px; }
.file-card .drive { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 6px; background: rgba(0,0,0,0.4); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; }
.file-card .drive svg { width: 14px; height: 14px; color: white; }
.file-card .info { padding: 14px 16px; }
.file-card .name { font-size: 14px; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-card .meta { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.05em; }

/* MESSAGES */
.msg-layout { display: grid; grid-template-columns: 320px 1fr; gap: 0; height: calc(100vh - var(--topbar-h) - 80px); border-radius: var(--radius-lg); overflow: hidden; background: rgba(21, 16, 31, 0.5); border: 1px solid var(--line); }
.conv-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; }
.conv-list .search { margin: 16px; width: auto; }
.conv-tabs { display: flex; gap: 18px; padding: 4px 18px 14px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; }
.conv-tabs button { color: var(--fg-3); padding-bottom: 4px; border-bottom: 1px solid transparent; }
.conv-tabs button.active { color: var(--fg); border-bottom-color: var(--accent); }

.conv-item { display: flex; align-items: start; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .2s; text-align: left; width: 100%; }
.conv-item:hover { background: rgba(255,255,255,0.02); }
.conv-item.active { background: rgba(255,255,255,0.04); }
.conv-item .av { flex-shrink: 0; }
.conv-item .info { flex: 1; min-width: 0; }
.conv-item .row1 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.conv-item .who { font-size: 13px; font-weight: 500; }
.conv-item .time { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); }
.conv-item .preview { font-size: 12px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item .badge { margin-left: 8px; flex-shrink: 0; background: var(--accent); color: white; font-family: var(--font-mono); font-size: 9px; font-weight: 600; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }

.chat-pane { display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.chat-head .grp { display: flex; align-items: center; gap: 14px; }
.av-stack { display: flex; }
.av-stack .av { margin-left: -10px; border: 2px solid var(--bg); }
.av-stack .av:first-child { margin-left: 0; }
.chat-head .who { font-size: 15px; font-weight: 500; }
.chat-head .status-line { font-size: 11px; color: var(--ok); display: flex; align-items: center; gap: 6px; }
.chat-head .status-line::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.chat-head .actions { display: flex; gap: 8px; }

.chat-body { flex: 1; padding: 22px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.msg-row { display: flex; gap: 10px; align-items: flex-end; }
.msg-row.me { justify-content: flex-end; }
.msg-row .av { width: 28px; height: 28px; font-size: 10px; }
.msg-bubble { max-width: 60%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; position: relative; }
.msg-row:not(.me) .msg-bubble { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-row.me .msg-bubble { background: linear-gradient(135deg, rgba(255,107,53,0.18), rgba(91,107,255,0.15)); border: 1px solid rgba(255,107,53,0.2); border-bottom-right-radius: 4px; }
.msg-row .who-tag { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); margin-bottom: 4px; letter-spacing: 0.08em; }
.msg-meta { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.msg-system { align-self: center; font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,0.02); border: 1px solid var(--line); }
.typing { display: flex; align-items: center; gap: 4px; padding: 8px 0; }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--fg-3); animation: typingBounce 1.3s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

.chat-input { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); background: rgba(255,255,255,0.02); }
.chat-input .field { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 999px; transition: border-color .25s; }
.chat-input .field:focus-within { border-color: var(--accent-purple); }
.chat-input .field input { flex: 1; background: transparent; border: none; outline: none; font-size: 14px; color: var(--fg); }
.chat-input .field input::placeholder { color: var(--fg-3); }
.chat-send { width: 40px; height: 40px; border-radius: 50%; background: var(--grad-brand); color: white; display: flex; align-items: center; justify-content: center; transition: transform .2s; }
.chat-send:hover { transform: scale(1.05); }
.chat-send svg { width: 16px; height: 16px; }

/* PROPOSALS */
.prop-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.prop-stats .stat-mini { padding: 22px; }
.prop-stats .stat-mini .val { font-size: 36px; }
.prop-list { display: flex; flex-direction: column; gap: 12px; }
.prop-card { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 24px; padding: 20px 24px; border-radius: 14px; background: rgba(21, 16, 31, 0.6); border: 1px solid var(--line); transition: border-color .3s var(--ease), transform .3s var(--ease); cursor: pointer; }
.prop-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.prop-card .status-bar { width: 4px; height: 100%; border-radius: 4px; background: var(--accent); min-height: 60px; }
.prop-card.approved .status-bar { background: var(--ok); }
.prop-card.implemented .status-bar { background: var(--accent-3); }
.prop-card.rejected .status-bar { background: var(--err); }
.prop-card.review .status-bar { background: var(--warn); }
.prop-card h4 { font-family: var(--font-display); font-size: 18px; font-weight: 400; letter-spacing: -0.01em; margin-bottom: 4px; }
.prop-card .desc { font-size: 13px; color: var(--fg-2); line-height: 1.5; margin-bottom: 10px; }
.prop-card .tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; }
.prop-card .pill { padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); color: var(--fg-2); }
.prop-card .pill.area { color: var(--accent-3); border-color: rgba(91,107,255,0.3); background: rgba(91,107,255,0.08); }
.prop-card .pill.high { color: var(--err); border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }
.prop-card .pill.med { color: var(--warn); border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.08); }
.prop-card .pill.low { color: var(--ok); border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.08); }
.prop-card .state { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-2); display: flex; align-items: center; gap: 6px; }
.prop-card.approved .state { color: var(--ok); }
.prop-card.implemented .state { color: var(--accent-3); }
.prop-card.review .state { color: var(--warn); }
.prop-card.rejected .state { color: var(--err); }

/* SETTINGS */
.settings-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.settings-tabs { display: flex; flex-direction: column; gap: 4px; }
.settings-tabs .tab { text-align: left; padding: 10px 14px; border-radius: 10px; width: 100%; }
.settings-tabs .tab.active { background: rgba(255,255,255,0.04); }
.settings-panel { padding: 32px; }
.settings-panel h2 { font-family: var(--font-display); font-size: 28px; font-weight: 400; letter-spacing: -0.01em; margin-bottom: 6px; }
.settings-panel .sub { color: var(--fg-2); font-size: 14px; margin-bottom: 28px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.input-block label { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 8px; }
.input-block input, .input-block select { width: 100%; padding: 12px 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--fg); outline: none; transition: border-color .25s; }
.input-block input:focus, .input-block select:focus { border-color: var(--accent-purple); }

.notif-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.notif-row:last-child { border-bottom: none; }
.notif-row .info .title { font-size: 14px; font-weight: 500; }
.notif-row .info .desc { font-size: 12px; color: var(--fg-2); margin-top: 2px; }

.toggle { position: relative; width: 44px; height: 24px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid var(--line); cursor: pointer; transition: background .3s var(--ease); }
.toggle::before { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--fg-2); transition: transform .3s var(--ease), background .3s; }
.toggle.on { background: var(--grad-brand); border-color: transparent; }
.toggle.on::before { transform: translateX(20px); background: white; }

/* MOBILE BOTTOM NAV */
.mobile-nav { display: none; }

/* RESPONSIVE */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 .panel:nth-child(3) { grid-column: 1 / -1; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .prop-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 64px; }
  .sidebar { padding: 18px 8px; }
  .sidebar-item .label, .sidebar-group .label, .sidebar-help, .sidebar-brand span:last-child { display: none; }
  .sidebar-item { justify-content: center; padding: 12px; }
  .sidebar-item.active::before { left: -8px; }
  .back-site-top span { display: none; }
  .back-site-top { padding: 8px; }
}
@media (max-width: 700px) {
  .app { grid-template-columns: 1fr; }
  /* Hide desktop sidebar, show bottom nav */
  .sidebar { display: none; }
  .mobile-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: var(--topbar-bg);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--line);
    padding: 8px 6px calc(8px + var(--safe-bottom));
    justify-content: space-around;
  }
  .mobile-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 6px 10px;
    min-width: 56px; min-height: 48px;
    border-radius: 12px;
    color: var(--fg-3);
    transition: color .2s var(--ease), background .2s var(--ease);
  }
  .mobile-nav-item.active { color: var(--fg); }
  .mobile-nav-item.active .mn-ico { background: rgba(255,107,53,0.12); }
  .mn-ico {
    position: relative;
    width: 38px; height: 30px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    transition: background .25s var(--ease);
  }
  .mobile-nav-item.active .mn-ico svg { color: var(--accent); }
  .mn-ico svg { width: 20px; height: 20px; }
  .mn-badge {
    position: absolute; top: -2px; right: 4px;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px;
    background: var(--accent-2); color: #fff;
    font-family: var(--font-mono); font-size: 9px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
  }
  .mn-label { font-size: 10px; font-weight: 500; }

  .main { padding-bottom: calc(72px + var(--safe-bottom)); }
  .view { padding: 24px 18px; min-height: auto; }
  .topbar { padding: 0 16px; }
  .search { display: none; }
  .back-site-top span { display: none; }
  .back-site-top { padding: 8px; }

  .dash-hero { flex-direction: column; align-items: stretch; }
  .dash-hero h1 { font-size: 38px; }
  .next-card { min-width: 0; }
  .project-card { padding: 22px; }
  .project-card-head { flex-direction: column; gap: 14px; }
  .project-card h2 { font-size: 28px; }
  .project-card .pct { text-align: left; font-size: 44px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .prop-stats { grid-template-columns: 1fr 1fr; }
  .timeline { overflow-x: auto; padding: 12px 0 28px; gap: 8px; }
  .timeline::before, .timeline::after { left: 30px; }
  .timeline::before { right: 30px; }
  .phase { min-width: 72px; }

  .proj-hero { aspect-ratio: 4/3; max-height: 260px; }
  .proj-hero-content { padding: 22px; }
  .proj-hero-content h1 { font-size: 34px; }
  .proj-progress { grid-template-columns: 1fr; gap: 16px; }
  .tabs { width: 100%; overflow-x: auto; }

  .section-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .section-head h1 { font-size: 34px; }
  .files-grid { grid-template-columns: 1fr 1fr; }
  .files-toolbar { gap: 10px; }
  .files-toolbar .search { display: flex; width: 100%; order: 3; }

  /* Messages → stack */
  .msg-layout { grid-template-columns: 1fr; height: auto; }
  .conv-list { max-height: 220px; border-right: none; border-bottom: 1px solid var(--line); }
  .chat-body { min-height: 320px; max-height: 50vh; }
  .msg-bubble { max-width: 78%; }

  .settings-layout { grid-template-columns: 1fr; }
  .settings-tabs { flex-direction: row; overflow-x: auto; }
  .settings-tabs .tab { white-space: nowrap; }
  .settings-panel { padding: 24px 20px; }
  .field-row { grid-template-columns: 1fr; }

  .fab { bottom: calc(80px + var(--safe-bottom)); right: 18px; }

  /* Modals → bottom sheets */
  .sheet-modal {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .sheet-modal > .glass {
    max-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    padding: 28px 22px calc(28px + var(--safe-bottom)) !important;
    animation: sheetUp .35s var(--ease);
    max-height: 90vh; overflow-y: auto;
  }
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }

@media (max-width: 420px) {
  .files-grid { grid-template-columns: 1fr; }
  .stats-row, .prop-stats { grid-template-columns: 1fr; }
}
