@import url('https://fonts.bunny.net/css?family=manrope:400,500,600,700,800&display=swap');

/* Carregado diretamente para permitir atualizações por FTP sem recompilar a imagem. */
:root {
    color-scheme: light;
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #edf2f7;
    --text: #172033;
    --muted: #69758a;
    --border: #dce3ed;
    --primary: #356df3;
    --primary-hover: #2459db;
    --primary-soft: #eaf0ff;
    --green: #1ba672;
    --amber: #d58b18;
    --red: #dc4c64;
    --violet: #8b5cf6;
    --shadow: 0 15px 45px rgba(32, 47, 78, .08);
    --radius: 16px;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b0f17;
    --surface: #111824;
    --surface-2: #161f2e;
    --surface-3: #1d2839;
    --text: #edf3ff;
    --muted: #8c9ab0;
    --border: #253248;
    --primary: #5b83ff;
    --primary-hover: #7294ff;
    --primary-soft: #17254d;
    --green: #35c992;
    --amber: #f1ac3f;
    --red: #f06d81;
    --violet: #a98bff;
    --shadow: 0 18px 55px rgba(0, 0, 0, .27);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 14px;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    border-radius: 10px;
    padding: 11px 13px;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, select:focus, textarea:focus, .rich-editor:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
    background: var(--surface);
}
textarea { resize: vertical; }

.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 20;
    width: 260px; display: flex; flex-direction: column;
    padding: 24px 18px; background: var(--surface);
    border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.brand-mark {
    width: 38px; height: 38px; display: grid; place-items: center;
    color: white; background: linear-gradient(145deg, #6591ff, #285ce5);
    border-radius: 11px; font-weight: 800; font-size: 19px;
    box-shadow: 0 8px 20px rgba(53, 109, 243, .28);
}
.brand-mark.large { width: 50px; height: 50px; border-radius: 14px; font-size: 24px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.nav-list { display: grid; gap: 5px; }
.nav-list a {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 12px; color: var(--muted); font-weight: 600;
    border-radius: 10px; transition: .2s;
}
.nav-list a:hover { color: var(--text); background: var(--surface-2); }
.nav-list a.active { color: var(--primary); background: var(--primary-soft); }
.nav-icon { width: 21px; text-align: center; font-size: 18px; }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }
.theme-toggle {
    border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
    padding: 10px 12px; border-radius: 10px; display: flex; gap: 10px; align-items: center;
}
.user-card { border-top: 1px solid var(--border); padding-top: 16px; display: flex; align-items: center; gap: 10px; }
.user-card > span:nth-child(2) { min-width: 0; flex: 1; }
.user-card strong, .user-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card strong { font-size: 12px; }
.user-card small { font-size: 10px; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.main-area { grid-column: 2; min-width: 0; }
.topbar {
    position: sticky; top: 0; z-index: 10; min-height: 74px;
    display: flex; align-items: center; gap: 18px; padding: 14px 34px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    border-bottom: 1px solid var(--border); backdrop-filter: blur(15px);
}
.global-search {
    max-width: 610px; flex: 1; display: flex; align-items: center; gap: 10px;
    border: 1px solid var(--border); border-radius: 11px; padding: 0 13px;
    background: var(--surface-2); color: var(--muted);
}
.global-search input { border: 0; box-shadow: none; background: transparent; padding-inline: 0; }
.global-search input:focus { box-shadow: none; background: transparent; }
kbd { border: 1px solid var(--border); background: var(--surface); border-radius: 5px; padding: 2px 6px; font-size: 10px; }
.content { max-width: 1500px; margin: 0 auto; padding: 34px; }
.mobile-menu { display: none !important; }
.sidebar-backdrop { display: none; }

.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 27px; }
.page-heading h1, .project-hero h1 { margin: 4px 0 6px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.04em; }
.page-heading p, .project-hero p { margin: 0; color: var(--muted); max-width: 700px; }
.eyebrow { color: var(--primary); text-transform: uppercase; letter-spacing: .13em; font-weight: 800; font-size: 10px; }
.button {
    width: auto; min-height: 40px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; border: 1px solid transparent; padding: 9px 15px; font-weight: 700;
    transition: transform .2s, background .2s, border-color .2s;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--primary); color: white; box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 25%, transparent); }
.button-primary:hover { background: var(--primary-hover); }
.button-secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.button-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.button-compact { min-height: 42px; white-space: nowrap; }
.button-full { width: 100%; }
.icon-button {
    width: 34px; height: 34px; display: inline-grid; place-items: center; flex: none;
    border: 0; border-radius: 9px; color: var(--muted); background: transparent;
}
.icon-button:hover { color: var(--text); background: var(--surface-3); }
.alert { border-radius: 11px; padding: 13px 15px; margin: 0 0 18px; border: 1px solid; }
.alert.success { color: var(--green); background: color-mix(in srgb, var(--green) 10%, var(--surface)); border-color: color-mix(in srgb, var(--green) 35%, var(--border)); }
.alert.danger { color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--surface)); border-color: color-mix(in srgb, var(--red) 30%, var(--border)); }
.alert ul { margin: 5px 0 0; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 34px; }
.metric-card {
    min-height: 145px; position: relative; overflow: hidden; display: grid; align-content: center;
    padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
    box-shadow: var(--shadow);
}
.metric-card::after { content: ""; position: absolute; width: 100px; height: 100px; border-radius: 50%; right: -45px; top: -45px; background: currentColor; opacity: .07; }
.metric-card small { color: var(--muted); font-weight: 600; }
.metric-card strong { font-size: 30px; letter-spacing: -.04em; margin-top: 7px; }
.metric-card em { color: var(--muted); font-size: 10px; font-style: normal; margin-top: 2px; }
.metric-icon { position: absolute; right: 18px; bottom: 18px; font-size: 24px; opacity: .55; }
.accent-blue { color: var(--primary); }.accent-blue small,.accent-blue em { color: var(--muted); }
.accent-amber { color: var(--amber); }.accent-amber small,.accent-amber em { color: var(--muted); }
.accent-green { color: var(--green); }.accent-green small,.accent-green em { color: var(--muted); }
.accent-violet { color: var(--violet); }.accent-violet small,.accent-violet em { color: var(--muted); }
.section-heading, .panel-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 0 0 17px; }
.section-heading h2, .panel-heading h2 { margin: 0; font-size: 19px; }
.section-heading p, .panel-heading p { color: var(--muted); margin: 4px 0 0; font-size: 12px; }
.section-heading > a { color: var(--primary); font-weight: 700; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project-card {
    min-height: 260px; padding: 20px; border: 1px solid var(--border);
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform .2s, border-color .2s;
}
.project-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); }
.project-card-top { display: flex; align-items: center; justify-content: space-between; }
.project-monogram {
    width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px;
    color: var(--primary); background: var(--primary-soft); font-weight: 800; font-size: 12px;
}
.project-monogram.small { width: 34px; height: 34px; border-radius: 9px; }
.project-monogram.large { width: 58px; height: 58px; border-radius: 16px; font-size: 16px; }
.project-card h3 { margin: 20px 0 4px; font-size: 17px; }
.project-card > p { margin: 0; color: var(--muted); font-size: 12px; }
.status, .priority { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.status { color: var(--primary); background: var(--primary-soft); }
.status-completed { color: var(--green); background: color-mix(in srgb, var(--green) 12%, var(--surface)); }
.status-paused { color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, var(--surface)); }
.status-archived { color: var(--muted); background: var(--surface-3); }
.priority { background: var(--surface-3); color: var(--muted); }
.priority-high, .priority-critical { color: var(--red); background: color-mix(in srgb, var(--red) 11%, var(--surface)); }
.priority-medium { color: var(--amber); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 27px; margin-top: 16px; }
.tag-list span { background: var(--surface-3); color: var(--muted); border-radius: 6px; padding: 4px 7px; font-size: 9px; font-weight: 700; }
.tag-list span.muted { background: transparent; border: 1px solid var(--border); }
.tag-list.roomy { margin: 15px 0 22px; }
.progress-row { display: flex; align-items: center; gap: 9px; margin-top: 19px; }
.progress-row > span, .table-progress > span, .wide-progress { flex: 1; height: 5px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.progress-row i, .table-progress i, .wide-progress i { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.progress-row small { color: var(--muted); font-size: 9px; }
.project-card footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.project-card footer b { color: var(--primary); font-size: 15px; }
.empty-state { grid-column: 1/-1; text-align: center; padding: 65px 20px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface); }
.empty-state > span { display: block; color: var(--primary); font-size: 30px; }
.empty-state h3 { margin: 12px 0 4px; }
.empty-state p { color: var(--muted); margin: 0 0 17px; }
.empty-state.compact { padding: 35px; }
.empty-inline { color: var(--muted); padding: 13px 2px; margin: 0; text-align: center; }

.table-card, .form-card, .description-card {
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); background: var(--surface-2); text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
th, td { padding: 14px 17px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--primary) 3%, var(--surface)); }
.project-cell { display: flex; align-items: center; gap: 10px; }
.project-cell strong, .project-cell small { display: block; }
.project-cell small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.table-progress { min-width: 120px; display: flex; align-items: center; gap: 8px; }
.table-progress small { color: var(--muted); font-size: 9px; }

.form-card { padding: 4px 28px 24px; max-width: 1050px; }
.account-card { max-width: 760px; }
.form-section { padding: 25px 0; border-bottom: 1px solid var(--border); }
.form-section-title { display: flex; gap: 13px; margin-bottom: 20px; }
.form-section-title > span { width: 31px; height: 31px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); border-radius: 8px; font-size: 9px; font-weight: 800; }
.form-section-title h2 { margin: 0; font-size: 16px; }
.form-section-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.field { display: grid; gap: 7px; }
.field > span { color: var(--muted); font-weight: 700; font-size: 10px; }
.field.full { grid-column: 1/-1; }
.check-row { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.check-row input { width: 16px; height: 16px; accent-color: var(--primary); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 22px; }

.project-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.project-title { display: flex; align-items: center; gap: 17px; }
.project-hero h1 { margin-top: 7px; }
.title-meta { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; }
.hero-actions { display: flex; gap: 9px; }
.project-summary {
    display: grid; grid-template-columns: 2fr repeat(3, 1fr);
    margin: 25px 0 15px; border: 1px solid var(--border); background: var(--surface);
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.project-summary > div { padding: 17px 19px; border-right: 1px solid var(--border); display: grid; gap: 7px; align-content: center; }
.project-summary > div:last-child { border-right: 0; }
.project-summary small { color: var(--muted); font-size: 9px; }
.project-summary strong { font-size: 13px; }
.wide-progress { width: 100%; }
.description-card { padding: 15px 18px; color: var(--muted); line-height: 1.7; }
.section-tabs { display: flex; overflow-x: auto; gap: 5px; border-bottom: 1px solid var(--border); margin-top: 26px; }
.section-tabs button {
    border: 0; background: transparent; color: var(--muted); padding: 13px 15px;
    font-weight: 700; white-space: nowrap; border-bottom: 2px solid transparent;
}
.section-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.section-tabs b { min-width: 19px; display: inline-grid; place-items: center; margin-left: 5px; padding: 2px 5px; border-radius: 99px; background: var(--surface-3); font-size: 8px; }
.tab-panel { display: none; padding-top: 25px; }
.tab-panel.active { display: block; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.phase-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 390px)); gap: 15px; align-items: start; }
.phase-board-card {
    position: relative; min-width: 0; padding: 17px; overflow: hidden;
    border: 1px solid var(--border); border-left: 3px solid var(--border);
    border-radius: 14px; background: var(--surface); box-shadow: var(--shadow);
}
.phase-board-card.phase-status-active { border-left-color: var(--primary); }
.phase-board-card.phase-status-completed { border-left-color: var(--green); }
.phase-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.phase-card-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.phase-card-title > div { min-width: 0; }
.phase-card-title small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.phase-card-title h3 { margin: 0; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.phase-number { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-size: 9px; font-weight: 800; }
.phase-status-form { flex: none; }
.phase-status-pill { width: auto; max-width: 125px; padding: 6px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; }
.phase-description { margin: 12px 0 0; min-height: 32px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.phase-progress { margin-top: 17px; }
.phase-progress > div { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 9px; }
.phase-progress strong { color: var(--text); }
.phase-progress-track { display: block; width: 100%; height: 4px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.phase-progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.phase-status-completed .phase-progress-track i { background: var(--green); }
.phase-deadline { display: flex; align-items: center; gap: 5px; margin-top: 10px; color: var(--muted); font-size: 9px; }
.phase-deadline.overdue { color: var(--red); font-weight: 700; }
.phase-timeline { position: relative; display: grid; gap: 0; margin-top: 17px; padding-top: 2px; }
.timeline-task { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 9px; min-height: 42px; padding-bottom: 10px; }
.timeline-task:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: -1px; width: 2px; background: var(--border); }
.timeline-task.done:not(:last-child)::before { background: color-mix(in srgb, var(--green) 65%, var(--border)); }
.timeline-task form { position: relative; z-index: 1; }
.timeline-marker {
    width: 22px; height: 22px; display: grid; place-items: center; padding: 0;
    border: 2px solid var(--border); border-radius: 50%; background: var(--surface);
    color: white; font-size: 8px; line-height: 1;
}
.timeline-task.done .timeline-marker { border-color: var(--green); background: var(--green); }
.timeline-task.current .timeline-marker { border-color: color-mix(in srgb, var(--primary) 35%, transparent); background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.timeline-copy { min-width: 0; padding-top: 2px; }
.timeline-copy strong, .timeline-copy small { display: block; overflow-wrap: anywhere; }
.timeline-copy strong { font-size: 10px; line-height: 1.45; }
.timeline-copy small { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.timeline-task.done .timeline-copy strong { color: var(--muted); text-decoration: line-through; }
.timeline-task.current .timeline-copy strong { color: var(--primary); }
.task-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.task-meta span, .task-meta time { padding: 3px 6px; border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: 7px; font-weight: 700; }
.task-meta .current-label { color: var(--primary); background: var(--primary-soft); }
.phase-empty { margin: 0; padding: 11px 0; color: var(--muted); font-size: 9px; text-align: center; }
.phase-task-add { margin-top: 8px; border-top: 1px solid var(--border); }
.phase-task-add summary { padding-top: 12px; color: var(--primary); font-size: 9px; font-weight: 800; cursor: pointer; list-style: none; }
.phase-task-add summary::-webkit-details-marker { display: none; }
.phase-task-add form { display: grid; grid-template-columns: 1fr 120px auto; gap: 7px; margin-top: 10px; }
.phase-task-add input { padding: 8px 9px; font-size: 9px; }
.phase-task-add .button { min-height: 34px; padding: 7px 10px; font-size: 9px; }
.security-callout { display: flex; gap: 13px; align-items: center; padding: 14px 16px; margin-bottom: 15px; background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border)); border-radius: 11px; color: var(--primary); }
.security-callout p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.technical-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.technical-card, .note-card { border: 1px solid var(--border); background: var(--surface); border-radius: 13px; padding: 16px; }
.technical-card header, .note-card header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.technical-card header > span { color: var(--primary); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.technical-card h3 { margin: 10px 0 12px; font-size: 13px; }
.technical-card pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; line-height: 1.6; }
.secret-value { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; background: var(--surface-2); border-radius: 8px; }
.secret-value code { overflow-wrap: anywhere; min-width: 0; }
.secret-value button { border: 0; color: var(--primary); background: transparent; font-size: 9px; font-weight: 800; }
.notes-list { display: grid; gap: 13px; }
.note-card header { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.note-card h3 { margin: 0; }
.note-card small { color: var(--muted); font-size: 9px; }
.note-actions { display: flex; align-items: center; gap: 5px; }
.note-actions form { margin: 0; }
.button-mini { min-height: 31px; padding: 6px 9px; font-size: 9px; }
.button-danger-soft { color: var(--red); background: color-mix(in srgb, var(--red) 9%, var(--surface)); border-color: color-mix(in srgb, var(--red) 25%, var(--border)); }
.button-danger-soft:hover { background: color-mix(in srgb, var(--red) 15%, var(--surface)); }
.rich-content { color: var(--muted); line-height: 1.75; padding-top: 12px; }
.rich-content h2, .rich-content h3 { color: var(--text); }
.rich-content blockquote { border-left: 3px solid var(--primary); padding-left: 13px; margin-left: 0; }
.rich-content code, .rich-content pre { background: var(--surface-2); border-radius: 6px; padding: 2px 5px; }
.upload-box { position: relative; display: flex; align-items: center; gap: 14px; padding: 23px; border: 1px dashed var(--border); border-radius: 13px; background: var(--surface); }
.upload-box > span { font-size: 24px; color: var(--primary); }
.upload-box strong, .upload-box small { display: block; }
.upload-box small { color: var(--muted); margin-top: 3px; }
.upload-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-list { display: grid; gap: 8px; margin-top: 13px; }
.file-row { display: flex; align-items: center; gap: 11px; border: 1px solid var(--border); background: var(--surface); padding: 11px; border-radius: 10px; }
.file-row > div { flex: 1; }
.file-row a, .file-row small { display: block; }
.file-row a { font-weight: 700; }
.file-row small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.file-icon { width: 34px; height: 34px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); border-radius: 8px; font-size: 8px; font-weight: 800; }

.assistant-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.assistant-heading h1 { margin: 5px 0 7px; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.045em; }
.assistant-heading p { margin: 0; color: var(--muted); }
.assistant-security { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--green) 22%, var(--border)); border-radius: 11px; background: color-mix(in srgb, var(--green) 7%, var(--surface)); }
.assistant-security > span { color: var(--green); }
.assistant-security p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.assistant-security strong { color: var(--text); }
.assistant-setup { min-height: 450px; display: grid; place-items: center; align-content: center; gap: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); text-align: center; }
.assistant-setup h2, .assistant-setup p { margin: 0; }
.assistant-setup p { max-width: 520px; color: var(--muted); line-height: 1.6; }
.assistant-orb { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; color: white; background: linear-gradient(145deg, #6388ff, #6e54db); box-shadow: 0 10px 35px rgba(86, 119, 255, .3); font-size: 24px; }
.assistant-orb.small { width: 36px; height: 36px; flex: none; border-radius: 11px; font-size: 15px; }
.assistant-shell { min-height: calc(100vh - 245px); display: grid; grid-template-columns: 230px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.assistant-history { padding: 14px; border-right: 1px solid var(--border); background: var(--surface-2); }
.assistant-history > form .button { width: 100%; }
.assistant-history-list { display: grid; gap: 5px; margin-top: 13px; }
.assistant-history-list > p { color: var(--muted); font-size: 10px; text-align: center; }
.assistant-history-list a { display: grid; gap: 3px; min-width: 0; padding: 10px; border-radius: 9px; color: var(--muted); }
.assistant-history-list a:hover, .assistant-history-list a.active { color: var(--text); background: var(--surface-3); }
.assistant-history-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.assistant-history-list small { font-size: 8px; }
.assistant-chat { min-width: 0; display: grid; grid-template-rows: auto minmax(330px, 1fr) auto; }
.assistant-chat > header { display: flex; align-items: center; gap: 10px; padding: 13px 17px; border-bottom: 1px solid var(--border); }
.assistant-chat > header strong, .assistant-chat > header small { display: block; }
.assistant-chat > header small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.assistant-messages { max-height: calc(100vh - 410px); overflow-y: auto; padding: 24px; }
.assistant-welcome { min-height: 100%; display: grid; place-items: center; align-content: center; text-align: center; }
.assistant-welcome h2 { margin: 0 0 7px; }
.assistant-welcome > p { margin: 0; color: var(--muted); }
.assistant-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.assistant-suggestions button { padding: 9px 12px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: 9px; }
.assistant-suggestions button:hover { border-color: var(--primary); color: var(--primary); }
.assistant-message { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; max-width: 850px; margin: 0 auto 20px; }
.assistant-message > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-3); color: var(--muted); font-size: 10px; font-weight: 800; }
.assistant-message.model > span { color: white; background: linear-gradient(145deg, #6388ff, #6e54db); }
.assistant-message strong { font-size: 9px; }
.assistant-message p { margin: 5px 0 0; padding: 12px 14px; border-radius: 4px 13px 13px 13px; background: var(--surface-2); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.assistant-message.user p { background: var(--primary-soft); }
.assistant-attachment-preview { width: min(390px, 100%); display: flex; align-items: center; gap: 10px; margin-top: 7px; padding: 9px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); }
.assistant-attachment-preview:hover { border-color: var(--primary); }
.assistant-attachment-preview > img { width: 72px; height: 55px; object-fit: cover; border-radius: 7px; }
.assistant-attachment-preview > span:first-child { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 18px; }
.assistant-attachment-preview > span:last-child { min-width: 0; }
.assistant-attachment-preview strong, .assistant-attachment-preview small { display: block; }
.assistant-attachment-preview strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assistant-attachment-preview small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.assistant-composer { margin: 0 20px 20px; padding: 10px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); }
.assistant-composer textarea { min-height: 62px; resize: vertical; padding: 5px; border: 0; background: transparent; box-shadow: none; }
.assistant-composer > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.assistant-composer small { flex: 1; color: var(--muted); font-size: 8px; text-align: right; }
.assistant-attach { max-width: 260px; display: flex; align-items: center; gap: 5px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 9px; }
.assistant-attach:hover { border-color: var(--primary); color: var(--primary); }
.assistant-attach input { display: none; }
.assistant-attach span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standalone-mobile-menu { position: fixed; z-index: 12; top: 12px; left: 12px; background: var(--surface); box-shadow: var(--shadow); }

.modal {
    width: min(560px, calc(100vw - 30px)); max-height: calc(100vh - 40px); overflow: auto;
    border: 1px solid var(--border); border-radius: 16px; color: var(--text);
    background: var(--surface); padding: 0; box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.modal.wide { width: min(760px, calc(100vw - 30px)); }
.modal::backdrop { background: rgba(2, 6, 15, .72); backdrop-filter: blur(4px); }
.modal > form { padding: 22px; display: grid; gap: 16px; }
.modal header, .modal footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.modal h2 { margin: 3px 0 0; }
.modal footer { justify-content: flex-end; padding-top: 6px; }
.modal-copy { margin: 0; color: var(--muted); line-height: 1.65; }
.secret-error { min-height: 18px; color: var(--red); font-size: 10px; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 7px; border: 1px solid var(--border); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--surface-2); }
.editor-toolbar button { border: 0; background: transparent; color: var(--muted); border-radius: 6px; padding: 5px 8px; font-size: 10px; }
.editor-toolbar button:hover { background: var(--surface-3); color: var(--text); }
.rich-editor { min-height: 220px; max-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: 0 0 10px 10px; padding: 13px; outline: 0; line-height: 1.7; }

.auth-page { display: grid; grid-template-columns: minmax(400px, 1.05fr) minmax(430px, .95fr); background: var(--surface); }
.auth-panel { position: relative; min-height: 100vh; overflow: hidden; padding: 50px; display: flex; flex-direction: column; background: #0c1423; color: white; }
.auth-panel::before { content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(78, 126, 255, .27), transparent 68%); right: -170px; bottom: -100px; }
.auth-brand { position: relative; display: flex; align-items: center; gap: 13px; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand strong { font-size: 16px; }.auth-brand span { color: #8fa0b9; font-size: 11px; margin-top: 3px; }
.auth-copy { position: relative; z-index: 2; max-width: 580px; margin: auto 0; }
.auth-copy h1 { font-size: clamp(38px, 5vw, 64px); letter-spacing: -.055em; line-height: 1.06; margin: 14px 0 20px; }
.auth-copy p { color: #9cabc0; font-size: 15px; line-height: 1.7; max-width: 510px; }
.auth-orbit { position: absolute; right: -170px; bottom: -170px; width: 520px; height: 520px; border: 1px solid rgba(110, 151, 255, .25); border-radius: 50%; }
.auth-orbit i { position: absolute; inset: 70px; border: 1px solid rgba(110, 151, 255, .18); border-radius: 50%; }
.auth-orbit i:nth-child(2) { inset: 145px; }.auth-orbit i:nth-child(3) { inset: 215px; background: #4f7ef9; box-shadow: 0 0 70px rgba(79, 126, 249, .65); }
.login-wrap { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 35px; background: var(--surface); }
.login-card { width: min(410px, 100%); display: grid; gap: 17px; }
.login-card h2 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.login-card > p { margin: -10px 0 5px; color: var(--muted); }
.secure-note { text-align: center; color: var(--muted); font-size: 9px; }
.theme-float { position: absolute; top: 25px; right: 25px; width: 39px; height: 39px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--muted); }

@media (max-width: 1100px) {
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .project-grid, .technical-grid { grid-template-columns: repeat(2, 1fr); }
    .project-summary { grid-template-columns: repeat(2, 1fr); }
    .project-summary > div:nth-child(2) { border-right: 0; }
    .project-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
    .auth-page { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
    .app-shell { display: block; }
    .sidebar { transform: translateX(-102%); transition: transform .25s; box-shadow: var(--shadow); }
    body.menu-open .sidebar { transform: translateX(0); }
    body.menu-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,.55); }
    .main-area { width: 100%; }
    .topbar { padding: 12px 18px; }
    .mobile-menu { display: inline-grid !important; }
    .global-search kbd { display: none; }
    .content { padding: 25px 18px; }
    .page-heading, .project-hero { align-items: flex-start; flex-direction: column; }
    .project-grid, .technical-grid { grid-template-columns: 1fr; }
    .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
    .form-card { padding-inline: 18px; }
    .project-summary { grid-template-columns: 1fr 1fr; }
    .project-title { align-items: flex-start; }
    .hero-actions { flex-wrap: wrap; }
    .auth-page { display: block; }
    .auth-panel { display: none; }
    .login-wrap { min-height: 100vh; }
    .assistant-heading { align-items: flex-start; flex-direction: column; }
    .assistant-shell { grid-template-columns: 1fr; }
    .assistant-history { border-right: 0; border-bottom: 1px solid var(--border); }
    .assistant-history-list { display: flex; overflow-x: auto; }
    .assistant-history-list a { min-width: 150px; }
    .assistant-messages { max-height: none; }
}
@media (max-width: 540px) {
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .metric-card { min-height: 125px; padding: 15px; }
    .metric-card strong { font-size: 25px; }
    .topbar .button { display: none; }
    .page-heading > .button { width: 100%; }
    .project-summary { grid-template-columns: 1fr; }
    .project-summary > div { border-right: 0; border-bottom: 1px solid var(--border); }
    .project-summary > div:last-child { border-bottom: 0; }
    .inline-add { flex-wrap: wrap; }
    .inline-add input:first-child { flex-basis: 100%; }
    .phase-task-add form { grid-template-columns: 1fr; }
    .phase-card > header { align-items: flex-start; }
    .section-tabs { margin-inline: -18px; padding-inline: 18px; }
    .assistant-composer { margin: 0 10px 10px; }
    .assistant-composer > div { align-items: flex-end; flex-wrap: wrap; }
    .assistant-composer small { min-width: 150px; max-width: 190px; }
}
