* {
    box-sizing: border-box;
}

:root {
    --accent-gold: #d6b15f;
    --accent-gold-soft: rgba(214, 177, 95, 0.2);
    --accent-gold-strong: rgba(214, 177, 95, 0.38);
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: #dbe4ff;
    background:
        radial-gradient(circle at 20% 10%, rgba(0, 220, 255, 0.15), transparent 35%),
        radial-gradient(circle at 80% 20%, rgba(255, 153, 0, 0.12), transparent 35%),
        linear-gradient(145deg, #0b1220, #101b33 50%, #1b1f2f);
    min-height: 100dvh;
    height: 100dvh;
    padding: max(0px, var(--safe-area-top)) max(0px, var(--safe-area-right)) max(8px, var(--safe-area-bottom)) max(0px, var(--safe-area-left));
    overflow: hidden;
}

.shell {
    position: relative;
    display: grid;
    grid-template-columns: 330px 1fr;
    height: 100%;
    overflow: hidden;
}

.shell::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 330px;
    width: 2px;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(180deg, rgba(242, 209, 136, 0.05), rgba(214, 177, 95, 0.95) 18%, rgba(214, 177, 95, 0.95) 82%, rgba(242, 209, 136, 0.05));
}

.shell-home {
    grid-template-columns: 320px minmax(0, 1fr);
}

.shell-home::before {
    left: 320px;
}

.left-rail {
    position: relative;
    border-right: none;
    backdrop-filter: blur(10px);
    background: rgba(9, 14, 27, 0.72);
    padding: 18px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.left-rail::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.left-rail::after {
    content: none;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.brand-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.brand-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.brand h1 {
    margin: 0;
    font-size: 1.1rem;
}

.brand p {
    margin: 0;
    font-size: 0.82rem;
    opacity: 0.8;
}

.panel {
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.section-head h2 {
    margin: 0;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.85;
    color: #f2d188;
}

.mini-btn,
.main-btn,
.action-link {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(24, 71, 182, 0.55);
    color: #f2f6ff;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    white-space: nowrap;
}

.main-btn {
    border-color: var(--accent-gold-strong);
    box-shadow: inset 0 0 0 1px rgba(214, 177, 95, 0.16);
}

.mini-btn {
    width: 32px;
    height: 32px;
    padding: 0;
}

.main-btn:hover,
.mini-btn:hover,
.action-link:hover {
    background: linear-gradient(120deg, rgba(53, 110, 247, 0.75), rgba(214, 177, 95, 0.38));
    border-color: rgba(214, 177, 95, 0.45);
}

.entity-list,
.nested-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nested-list {
    margin: 4px 0 10px 14px;
    border-left: 1px dashed rgba(255, 255, 255, 0.2);
    padding-left: 8px;
}

.entity-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.entity-item.active {
    border-color: #58d0ff;
    box-shadow: 0 0 0 1px rgba(88, 208, 255, 0.6) inset;
}

.entity-item small {
    grid-column: 1 / -1;
    opacity: 0.65;
}

.dots {
    border: none;
    background: transparent;
    color: #dbe4ff;
    font-weight: 800;
    cursor: pointer;
}

.rail-actions {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.rail-actions-stack {
    display: grid;
    gap: 10px;
}

.main-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 22px;
    min-height: 0;
    overflow: hidden;
}

.main-panel-home {
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
}

.topbar-home {
    border-bottom: none;
    padding-bottom: 0;
}

.home-rail {
    display: grid;
    align-content: start;
    gap: 14px;
}

.panel-compact {
    padding: 14px;
}

.module-list {
    display: grid;
    gap: 8px;
}

.module-link,
.module-link:visited,
.module-link:hover,
.module-link:active {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #dbe4ff;
    text-decoration: none;
    font-weight: 600;
}

.left-rail .module-list > a.module-link,
.left-rail .module-list > a.module-link:visited,
.left-rail .module-list > a.module-link:hover,
.left-rail .module-list > a.module-link:active {
    display: block !important;
    width: 100% !important;
    color: #dbe4ff !important;
    text-decoration: none !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.module-link:hover {
    background: rgba(76, 132, 255, 0.18);
}

.module-link.active {
    border-color: var(--accent-gold-strong);
    box-shadow: 0 0 0 1px var(--accent-gold-soft) inset;
    background: linear-gradient(120deg, rgba(88, 208, 255, 0.1), rgba(214, 177, 95, 0.16));
}

.left-rail .module-list > a.module-link.active {
    color: #f6edd2;
}

.file-explorer {
    display: grid;
    gap: 12px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.file-section {
    display: grid;
    gap: 8px;
}

.file-section h3 {
    margin: 0;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.8;
}

.file-group {
    display: grid;
    gap: 6px;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.file-group h4 {
    margin: 0;
    font-size: 0.82rem;
}

.file-group h4 small {
    opacity: 0.65;
    font-weight: 400;
}

.file-link {
    display: block;
    color: #9fddff;
    text-decoration: none;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-link:hover {
    text-decoration: underline;
}

.home-metrics {
    display: grid;
    gap: 10px;
}

.metric-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-card strong {
    flex: 0 0 auto;
    font-size: 1rem;
    color: #ffffff;
}

.metric-card span {
    margin-left: auto;
    font-size: 0.82rem;
    opacity: 0.75;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-content: start;
    overflow-y: auto;
    padding-right: 4px;
}

.home-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-card-primary {
    background:
        radial-gradient(circle at top right, rgba(88, 208, 255, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(24, 71, 182, 0.2), rgba(255, 255, 255, 0.03));
}

.home-card h3 {
    margin: 0 0 8px;
    font-size: 1.35rem;
}

.home-card p {
    margin: 0;
    line-height: 1.5;
    opacity: 0.82;
}

.eyebrow {
    margin-bottom: 10px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f2d188;
}

.home-card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.home-card-wide {
    grid-column: 1 / -1;
}

.activity-head h3 {
    margin-top: 0;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.activity-section {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.activity-section h4 {
    margin: 0;
    font-size: 1rem;
}

.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.activity-list li {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.activity-title {
    font-weight: 600;
}

.activity-meta {
    font-size: 0.8rem;
    opacity: 0.75;
}

.main-btn-muted {
    opacity: 0.6;
    cursor: not-allowed;
}

.main-btn:disabled,
.mini-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 10px;
}

.topbar h2 {
    margin: 0 0 6px;
}

.topbar p {
    margin: 0;
    opacity: 0.75;
    font-size: 0.9rem;
}

.messages {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.15);
    min-height: 0;
}

.chat-dropzone {
    border: 1px dashed rgba(88, 208, 255, 0.45);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.88rem;
    opacity: 0.85;
    background: rgba(88, 208, 255, 0.06);
}

.chat-dropzone.drag-active {
    background: rgba(88, 208, 255, 0.14);
    border-color: rgba(88, 208, 255, 0.75);
}

.dropzone-link {
    border: none;
    background: transparent;
    color: #9fddff;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    padding: 0 2px;
}

.pending-attachments {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
}

.pending-attachments h3 {
    margin: 0 0 8px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.8;
}

.pending-attachments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pending-attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

.pending-attachment-main {
    display: grid;
    gap: 4px;
    min-width: 200px;
}

.pending-attachment-main small {
    opacity: 0.75;
    font-size: 0.72rem;
}

.pending-attachment-progress-wrap {
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.pending-attachment-progress {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #58d0ff, #2d79ff);
    transition: width 120ms ease-out;
}

.pending-attachment-progress.error {
    background: linear-gradient(90deg, #ff8b8b, #ff4d4d);
}

.pending-attachment-remove {
    border: none;
    background: transparent;
    color: #ffb7b7;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
}

.pending-attachment-remove:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.message-attachments {
    margin-top: 8px;
    display: grid;
    gap: 6px;
}

.message-attachment-link {
    color: #9fddff;
    text-decoration: none;
    font-size: 0.82rem;
}

.message-attachment-link:hover {
    text-decoration: underline;
}

.memory-panel {
    border: 1px solid rgba(88, 208, 255, 0.35);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(14, 27, 51, 0.55);
}

.memory-panel h3 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #9fddff;
}

.memory-list {
    display: grid;
    gap: 8px;
}

.memory-hit-item {
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    line-height: 1.35;
    opacity: 0.92;
}

.tasks-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 16px;
    min-height: 0;
    overflow: hidden;
}

.task-form-panel,
.tasks-board-panel {
    min-height: 0;
}

.task-form {
    display: grid;
    gap: 12px;
}

.task-form textarea,
.menu-textarea {
    min-height: 120px;
    resize: vertical;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(4, 10, 24, 0.7);
    color: #dbe4ff;
    border-radius: 10px;
    padding: 10px;
    font-family: inherit;
}

.task-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.task-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.task-toolbar select,
.task-form input,
.task-form select {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(4, 10, 24, 0.7);
    color: #dbe4ff;
    border-radius: 10px;
    padding: 10px;
}

.task-toolbar select,
.task-form select,
.files-toolbar select,
.composer select {
    color: #000;
    background: #fff;
}

.task-toolbar select option,
.task-form select option,
.files-toolbar select option,
.composer select option {
    color: #000;
    background: #fff;
}

.tasks-board {
    display: grid;
    gap: 12px;
    overflow-y: auto;
    padding-right: 4px;
}

.task-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.task-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.task-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.task-card p {
    margin: 0;
    opacity: 0.82;
    line-height: 1.45;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.task-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    opacity: 0.9;
}

.priority-high {
    color: #ffd0d0;
    border-color: rgba(255, 108, 108, 0.3);
}

.priority-medium {
    color: #ffe7b0;
    border-color: rgba(255, 196, 87, 0.28);
}

.priority-low {
    color: #b8ffe3;
    border-color: rgba(86, 214, 162, 0.28);
}

.task-actions-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.task-inline-btn {
    padding: 7px 10px;
    font-size: 0.82rem;
}

.files-module-panel {
    display: grid;
    gap: 12px;
    min-height: 0;
}

.files-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(145px, 1fr)) auto auto;
    gap: 10px;
    align-items: stretch;
}

.files-toolbar input,
.files-toolbar select {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(4, 10, 24, 0.7);
    color: #dbe4ff;
    border-radius: 10px;
    padding: 10px;
}

.files-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.files-actions .main-btn {
    white-space: nowrap;
}

.files-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    opacity: 0.85;
}

.files-select-all input {
    accent-color: #58d0ff;
}

.files-summary {
    margin-left: auto;
    font-size: 0.88rem;
    opacity: 0.78;
    min-width: 180px;
    text-align: right;
}

.rail-actions.rail-actions-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.rail-actions.rail-actions-stack > .action-link,
.rail-actions.rail-actions-stack > a.action-link,
.left-rail .rail-actions.rail-actions-stack > a.action-link:visited {
    width: 100%;
    min-width: 0;
    color: #f2f6ff;
    text-decoration: none;
}

.left-rail .rail-actions > a.action-link,
.left-rail .rail-actions > a.action-link:visited,
.left-rail .rail-actions > a.action-link:hover,
.left-rail .rail-actions > a.action-link:active {
    width: 100% !important;
    min-width: 0;
    color: #f2f6ff !important;
    text-decoration: none !important;
    display: inline-flex !important;
}

.files-list {
    display: grid;
    gap: 10px;
    overflow-y: auto;
    padding-right: 4px;
    min-height: 0;
}

.file-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.file-row-check {
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-row-check input {
    accent-color: #58d0ff;
}

.file-row-main {
    min-width: 0;
}

.file-row-main h3 {
    margin: 0 0 7px;
    font-size: 0.98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    opacity: 0.82;
}

.file-row-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
}

.file-row-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#deleteSelectedBtn {
    background: linear-gradient(120deg, rgba(149, 67, 19, 0.75), rgba(214, 177, 95, 0.72));
    border-color: rgba(214, 177, 95, 0.55);
}

#restoreSelectedBtn {
    background: linear-gradient(120deg, rgba(25, 120, 96, 0.7), rgba(214, 177, 95, 0.38));
    border-color: rgba(214, 177, 95, 0.45);
}

@media (max-width: 1360px) {
    .files-toolbar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .files-toolbar input,
    .files-toolbar select,
    .files-toolbar .main-btn {
        min-width: 0;
    }
}

.bubble {
    max-width: 75%;
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.bubble.user {
    margin-left: auto;
    background: rgba(17, 130, 255, 0.6);
}

.bubble.assistant {
    margin-right: auto;
    background: rgba(49, 62, 86, 0.78);
}

.bubble.pending {
    opacity: 0.72;
}

.message-status {
    margin-top: 8px;
    font-size: 0.76rem;
    opacity: 0.75;
}

.placeholder {
    opacity: 0.7;
    margin: 0;
}

.composer {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 10px;
}

.composer select,
.composer input,
.settings input {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(4, 10, 24, 0.7);
    color: #dbe4ff;
    border-radius: 10px;
    padding: 10px;
}

.settings {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.settings h3 {
    margin-top: 0;
}

.settings .hint {
    margin-top: 0;
    opacity: 0.75;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.settings label {
    display: flex;
    flex-direction: column;
    font-size: 0.86rem;
    gap: 6px;
}

.menu-pop {
    position: absolute;
    z-index: 2000;
    background: #0e1629;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    min-width: 220px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: menuIn 120ms ease-out;
}

.menu-title {
    padding: 10px 12px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.78;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
    font-weight: 600;
}

.menu-back {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #dbe4ff;
    cursor: pointer;
}

.menu-back:hover {
    background: rgba(255, 255, 255, 0.12);
}

.menu-input {
    width: calc(100% - 20px);
    margin: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
    color: #dbe4ff;
}

.menu-hint {
    margin: 8px 10px;
    font-size: 0.82rem;
    opacity: 0.75;
}

.menu-pop button {
    width: 100%;
    text-align: left;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: #dbe4ff;
    padding: 10px 12px;
    cursor: pointer;
}

.menu-pop button:last-child {
    border-bottom: none;
}

.menu-pop button:hover {
    background: rgba(76, 132, 255, 0.24);
}

.menu-pop button.danger {
    color: #ffb7b7;
}

.menu-pop button.danger:hover {
    background: rgba(179, 43, 43, 0.22);
}

@keyframes menuIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .shell {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(180px, 40vh) minmax(0, 1fr);
    }

    .left-rail {
        border-right: none;
        border-bottom: none;
        max-height: none;
        min-height: 0;
    }

    .shell::before {
        top: auto;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, rgba(242, 209, 136, 0.05), rgba(214, 177, 95, 0.95) 18%, rgba(214, 177, 95, 0.95) 82%, rgba(242, 209, 136, 0.05));
    }

    .main-panel {
        grid-template-rows: auto auto minmax(0, 1fr) auto;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .composer {
        grid-template-columns: 1fr;
    }

    .home-grid {
        grid-template-columns: 1fr;
    }

    .activity-grid {
        grid-template-columns: 1fr;
    }

    .tasks-layout {
        grid-template-columns: 1fr;
    }

    .task-form-grid {
        grid-template-columns: 1fr;
    }

    .files-toolbar {
        grid-template-columns: 1fr;
    }

    .files-summary {
        margin-left: 0;
        min-width: 0;
        text-align: left;
        flex-basis: 100%;
    }

    .rail-actions.rail-actions-stack > .action-link,
    .rail-actions.rail-actions-stack > a.action-link {
        width: 100%;
    }

    .file-row {
        grid-template-columns: 34px 1fr;
    }

    .file-row-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}
