/* NodePost Styles */

body.nodepost-page {
    margin: 0;
    height: 100dvh;
    padding-bottom: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.nodepost-page .banner {
    flex: 0 0 auto;
    position: relative;
    z-index: 20;
}

.nodepost-container {
    --np-accent: #2b9eff;
    --np-accent-strong: #1b7de5;
    --np-accent-soft: rgba(43, 158, 255, 0.14);
    --np-success: #25b87f;
    --np-danger: #f15f66;
    --np-surface-1: rgba(12, 16, 30, 0.7);
    --np-surface-2: rgba(20, 28, 46, 0.78);
    --np-border: rgba(140, 163, 194, 0.26);
    --np-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);

    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.9rem 1.15rem 1.05rem;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(60, 107, 255, 0.25), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(37, 184, 127, 0.14), transparent 64%),
        linear-gradient(165deg, rgba(10, 13, 25, 0.96) 0%, rgba(16, 21, 35, 0.98) 100%);
}

.nodepost-container > * {
    position: relative;
    z-index: 1;
}

.nodepost-title {
    margin: 0;
    font-family: Bahnschrift, "Trebuchet MS", "Segoe UI", sans-serif;
    letter-spacing: 0.02em;
    font-size: 1.28rem;
    font-weight: 700;
}

.nodepost-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--np-border);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(26, 34, 54, 0.9), rgba(15, 20, 36, 0.9));
    box-shadow: var(--np-shadow);
    backdrop-filter: blur(12px);
}

.nodepost-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nodepost-toolbar-actions .np-toolbar-compose {
    margin-left: auto;
}

.np-btn {
    appearance: none;
    border: 1px solid rgba(159, 186, 222, 0.4);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(44, 58, 88, 0.88), rgba(28, 37, 63, 0.88));
    color: var(--text-color, #e7edf8);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    padding: 0.62rem 1.05rem;
    text-decoration: none;
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.np-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(186, 209, 239, 0.7);
    background: linear-gradient(180deg, rgba(52, 68, 101, 0.94), rgba(33, 44, 75, 0.94));
}

.np-btn:active {
    transform: translateY(0);
}

.np-btn:focus-visible,
.np-input:focus-visible,
.np-textarea:focus-visible,
.np-modal-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(7, 12, 25, 0.75), 0 0 0 4px rgba(63, 163, 255, 0.52);
}

.np-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.np-btn-primary {
    border-color: rgba(93, 201, 255, 0.75);
    color: #f5fbff;
    background: linear-gradient(180deg, #3fb7ff 0%, #1d8ef0 100%);
    box-shadow: 0 10px 24px rgba(21, 116, 205, 0.45);
}

.np-btn-primary:hover {
    background: linear-gradient(180deg, #56c2ff 0%, #2298ff 100%);
    border-color: rgba(137, 221, 255, 0.95);
}

.np-btn-sm {
    padding: 0.48rem 0.86rem;
    font-size: 0.79rem;
}

.np-badge {
    min-width: 1.45rem;
    text-align: center;
    background: linear-gradient(180deg, #ff7f71 0%, #ef5b63 100%);
    color: #fff;
    border-radius: 999px;
    padding: 0.2rem 0.46rem;
    font-size: 0.74rem;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(239, 91, 99, 0.45);
}

.nodepost-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 0.85rem;
    overflow: hidden;
}

.nodepost-sidebar,
.nodepost-detail,
.np-conversation-view,
.np-compose-form,
.np-settings-panel {
    border: 1px solid var(--np-border);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(21, 29, 47, 0.82) 0%, rgba(15, 21, 36, 0.86) 100%);
    box-shadow: var(--np-shadow);
    backdrop-filter: blur(14px);
}

.nodepost-sidebar {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.nodepost-search-box {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid rgba(145, 168, 199, 0.2);
}

.np-conversation-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.6rem;
}

.np-conversation-item {
    position: relative;
    border: 1px solid rgba(138, 160, 189, 0.26);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(35, 44, 67, 0.84), rgba(26, 33, 52, 0.84));
    padding: 0.72rem 0.78rem;
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.np-conversation-item + .np-conversation-item {
    margin-top: 0.56rem;
}

.np-conversation-item:hover {
    transform: translateY(-1px);
    border-color: rgba(159, 199, 248, 0.65);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
    background: linear-gradient(180deg, rgba(45, 56, 84, 0.92), rgba(32, 41, 64, 0.92));
}

.np-conversation-item.active {
    border-color: rgba(94, 184, 255, 0.95);
    background: linear-gradient(180deg, rgba(43, 102, 172, 0.26), rgba(30, 66, 112, 0.26));
    box-shadow: 0 0 0 1px rgba(67, 169, 255, 0.42), 0 10px 22px rgba(13, 39, 80, 0.46);
}

.np-conversation-item.unread {
    border-left: 3px solid #52b4ff;
    box-shadow: 0 0 0 1px rgba(93, 179, 255, 0.34), 0 11px 22px rgba(12, 35, 68, 0.34);
}

.np-conversation-item.unread::after {
    content: '';
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    background: #ff6167;
    box-shadow: 0 0 0 3px rgba(255, 97, 103, 0.2);
}

.np-conv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.3rem;
}

.np-conv-sender {
    font-size: 0.87rem;
    font-weight: 700;
}

.np-conv-time {
    color: var(--text-muted, #92a2bd);
    font-size: 0.73rem;
    white-space: nowrap;
}

.np-conv-subject {
    font-weight: 600;
    font-size: 0.83rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.np-conv-preview {
    color: var(--text-muted, #8ea0be);
    font-size: 0.78rem;
    line-height: 1.35;
    max-height: 2.2em;
    overflow: hidden;
}

.np-conv-meta {
    margin-top: 0.38rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.34rem;
}

.np-conv-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(150, 180, 220, 0.44);
    border-radius: 999px;
    padding: 0.08rem 0.42rem;
    font-size: 0.66rem;
    font-weight: 700;
    color: #bad8fb;
    background: rgba(64, 90, 130, 0.44);
}

.np-conv-chip-reply {
    color: #8fe4be;
    border-color: rgba(103, 222, 175, 0.44);
    background: rgba(48, 114, 83, 0.4);
}

.np-conv-unread {
    margin-top: 0.3rem;
    display: inline-flex;
    align-items: center;
    padding: 0.14rem 0.4rem;
    border-radius: 999px;
    background: rgba(82, 180, 255, 0.18);
    color: #8fd4ff;
    font-size: 0.69rem;
    font-weight: 700;
}

.nodepost-detail,
.np-conversation-view {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.np-empty-state {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #8b9ab4);
    text-align: center;
    padding: 1.2rem;
}

.np-conversation-detail {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.np-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.84rem 1rem;
    border-bottom: 1px solid rgba(145, 168, 199, 0.2);
    background: linear-gradient(180deg, rgba(34, 44, 67, 0.64), rgba(23, 31, 50, 0.64));
}

.np-detail-subject {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.np-detail-actions {
    display: flex;
    gap: 0.45rem;
}

.np-messages-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
}

.np-message-card {
    border: 1px solid rgba(131, 154, 184, 0.24);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(39, 49, 74, 0.86), rgba(27, 35, 55, 0.86));
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
    padding: 0.9rem;
    margin-bottom: 0.78rem;
}

.np-message-card.sent {
    border-left: 4px solid var(--np-success);
}

.np-message-card.received {
    border-left: 4px solid var(--np-accent);
}

.np-message-card.np-message-new {
    border-color: rgba(255, 95, 104, 0.88);
    box-shadow: 0 0 0 1px rgba(255, 88, 98, 0.36), 0 11px 24px rgba(132, 18, 26, 0.3);
}

.np-msg-header {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.42rem;
    font-size: 0.82rem;
}

.np-msg-sender {
    font-weight: 700;
}

.np-msg-time,
.np-msg-recipients {
    color: var(--text-muted, #92a2bd);
}

.np-msg-recipients {
    font-size: 0.77rem;
    margin-bottom: 0.45rem;
}

.np-msg-body {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
    font-size: 0.9rem;
}

.np-msg-attachments {
    margin-top: 0.72rem;
    padding-top: 0.55rem;
    border-top: 1px dashed rgba(143, 168, 200, 0.28);
    display: flex;
    flex-wrap: wrap;
    gap: 0.44rem;
}

.np-msg-attachments a {
    text-decoration: none;
    font-size: 0.77rem;
    padding: 0.36rem 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(136, 165, 204, 0.42);
    background: rgba(43, 61, 93, 0.7);
    color: var(--text-color, #e7edf8);
}

.np-download-icon {
    display: inline-block;
    margin-right: 0.15rem;
    font-size: 0.88rem;
    line-height: 1;
    transform: translateY(1px);
    color: #9ed0ff;
}

.np-msg-direct-action {
    margin-top: 0.62rem;
    display: flex;
    justify-content: flex-end;
}

.np-compose-form {
    flex: 1;
    min-height: 0;
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.np-form-group {
    margin-bottom: 1.02rem;
}

.np-form-label {
    display: block;
    margin-bottom: 0.44rem;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted, #98a8c5);
    font-weight: 700;
}

.np-input,
.np-textarea {
    width: 100%;
    border: 1px solid rgba(146, 171, 205, 0.35);
    border-radius: 11px;
    background: rgba(16, 22, 38, 0.82);
    color: var(--text-color, #eaf1ff);
    font-size: 0.9rem;
    padding: 0.62rem 0.75rem;
    box-sizing: border-box;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.np-input:hover,
.np-textarea:hover {
    border-color: rgba(182, 207, 239, 0.55);
}

.np-textarea {
    resize: vertical;
    min-height: 180px;
}

.nodepost-compose-page .np-form-group:nth-child(3) {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.nodepost-compose-page #np-body {
    flex: 1;
    min-height: 240px;
}

.np-form-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    padding-top: 0.2rem;
}

.np-recipient-area {
    position: relative;
    border: 1px solid rgba(149, 176, 210, 0.36);
    border-radius: 12px;
    background: rgba(12, 18, 33, 0.78);
    overflow: visible;
}

.np-recipient-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.62rem 0.72rem 0.52rem;
    border-bottom: 1px dashed rgba(154, 180, 212, 0.31);
    min-height: 44px;
    align-items: center;
}

.np-recipient-placeholder {
    font-size: 0.82rem;
    color: var(--text-muted, #8ea0be);
}

.np-recipient-search-row {
    padding: 0.46rem 0.72rem 0.55rem;
}

.np-recipient-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.26rem;
    border-radius: 999px;
    font-size: 0.79rem;
    font-weight: 700;
    background: linear-gradient(180deg, #53b8ff, #2a8eed);
    color: #fff;
    padding: 0.3rem 0.62rem;
    box-shadow: 0 7px 16px rgba(31, 125, 219, 0.32);
}

.np-recipient-tag button {
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 0.96rem;
    line-height: 1;
    padding: 0;
}

.np-recipient-search-row input {
    border: none;
    background: transparent;
    color: var(--text-color, #eaf1ff);
    width: 100%;
    padding: 0.12rem 0;
    font-size: 0.9rem;
}

.np-recipient-search-row input:focus {
    outline: none;
}

.np-dropdown {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    border: 1px solid rgba(138, 167, 203, 0.42);
    border-radius: 12px;
    background: rgba(17, 24, 42, 0.96);
    max-height: 220px;
    overflow-y: auto;
    z-index: 60;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
}

.np-dropdown-item {
    padding: 0.56rem 0.74rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.np-dropdown-item + .np-dropdown-item {
    border-top: 1px solid rgba(132, 154, 183, 0.2);
}

.np-dropdown-item:hover {
    background: rgba(50, 88, 139, 0.4);
}

.np-attachment-area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.np-attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.44rem;
}

.np-attachment-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 999px;
    border: 1px solid rgba(150, 178, 214, 0.36);
    background: rgba(35, 49, 75, 0.76);
    font-size: 0.77rem;
    padding: 0.3rem 0.57rem;
}

.np-attachment-uploading {
    border-style: dashed;
    color: #a9c7e8;
    background: rgba(52, 74, 110, 0.72);
}

.np-attachment-tag button {
    border: none;
    background: transparent;
    color: #ff7f85;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
}

.np-file-label {
    cursor: pointer;
}

.np-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 17, 0.66);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
    box-sizing: border-box;
}

.np-modal {
    width: min(760px, 100%);
    border-radius: 16px;
    border: 1px solid rgba(150, 178, 214, 0.33);
    background: linear-gradient(180deg, rgba(28, 38, 60, 0.98) 0%, rgba(19, 27, 45, 0.98) 100%);
    box-shadow: 0 28px 48px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.np-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(150, 178, 214, 0.2);
}

.np-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-family: Bahnschrift, "Trebuchet MS", "Segoe UI", sans-serif;
}

.np-modal-close {
    border: none;
    background: transparent;
    color: var(--text-color, #eaf1ff);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
}

.np-modal-body {
    padding: 1rem;
}

.np-modal-meta {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #a9c5e7;
    background: rgba(43, 126, 212, 0.2);
    border: 1px solid rgba(98, 166, 236, 0.42);
    border-radius: 10px;
    padding: 0.62rem 0.72rem;
    margin-bottom: 0.76rem;
}

.np-reply-textarea {
    min-height: 160px;
}

.np-reply-attachments {
    margin: 0.8rem 0 0.2rem;
}

.np-modal-body .np-status {
    display: block;
    margin: 0.45rem 0 0;
}

.np-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.84rem 1rem 1rem;
    border-top: 1px solid rgba(150, 178, 214, 0.2);
}

body.np-modal-open {
    overflow: hidden;
}

.np-settings-panel {
    flex: 1;
    min-height: 0;
    width: min(1100px, 100%);
    margin: 0 auto;
    padding: 1rem;
    overflow: auto;
}

.np-settings-section {
    border: 1px solid rgba(146, 173, 210, 0.28);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(31, 42, 65, 0.84), rgba(24, 33, 53, 0.84));
    padding: 1rem;
    margin-bottom: 0.9rem;
}

.np-settings-section h3 {
    margin: 0 0 0.48rem;
    font-family: Bahnschrift, "Trebuchet MS", "Segoe UI", sans-serif;
}

.np-help-text {
    color: var(--text-muted, #8ea0be);
    font-size: 0.83rem;
    margin-bottom: 0.8rem;
}

.np-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.np-key-display {
    border: 1px solid rgba(255, 118, 122, 0.58);
    border-radius: 12px;
    background: rgba(41, 22, 28, 0.78);
    padding: 0.72rem;
    margin: 0.72rem 0;
}

.np-key-display code {
    display: block;
    word-break: break-all;
    color: #71f2be;
    margin-top: 0.4rem;
}

.np-warning {
    color: #ff8f96;
    margin: 0;
    font-size: 0.82rem;
}

.np-keys-list {
    margin-top: 0.6rem;
}

.np-key-item {
    border: 1px solid rgba(138, 166, 204, 0.28);
    border-radius: 11px;
    padding: 0.58rem 0.68rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.46rem;
    background: rgba(28, 38, 58, 0.76);
    font-size: 0.83rem;
}

.np-key-item .np-key-info {
    flex: 1;
    min-width: 0;
}

.np-key-item .np-key-label {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.np-key-item .np-key-date {
    color: var(--text-muted, #8ea0be);
    font-size: 0.75rem;
}

.np-key-item .np-key-status {
    border-radius: 999px;
    padding: 0.14rem 0.42rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.np-key-item .np-key-status.active {
    background: rgba(37, 184, 127, 0.22);
    color: #8df4ca;
}

.np-key-item .np-key-status.inactive {
    background: rgba(158, 171, 189, 0.25);
    color: #d6dce6;
}

.np-status {
    font-size: 0.82rem;
    margin-left: 0.5rem;
}

.np-status.success {
    color: #8ff6cc;
}

.np-status.error {
    color: #ff8f96;
}

.np-loading,
.np-empty {
    text-align: center;
    color: var(--text-muted, #8ea0be);
    padding: 2rem 1rem;
}

.np-conversation-list::-webkit-scrollbar,
.np-messages-container::-webkit-scrollbar,
.np-compose-form::-webkit-scrollbar,
.np-settings-panel::-webkit-scrollbar,
.np-dropdown::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

.np-conversation-list::-webkit-scrollbar-thumb,
.np-messages-container::-webkit-scrollbar-thumb,
.np-compose-form::-webkit-scrollbar-thumb,
.np-settings-panel::-webkit-scrollbar-thumb,
.np-dropdown::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
    background-color: rgba(153, 178, 210, 0.45);
}

.np-conversation-list::-webkit-scrollbar-track,
.np-messages-container::-webkit-scrollbar-track,
.np-compose-form::-webkit-scrollbar-track,
.np-settings-panel::-webkit-scrollbar-track,
.np-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

:root.light .nodepost-container {
    --np-surface-1: rgba(255, 255, 255, 0.7);
    --np-surface-2: rgba(245, 248, 255, 0.9);
    --np-border: rgba(114, 142, 181, 0.32);
    --np-shadow: 0 14px 28px rgba(23, 44, 85, 0.12);

    background:
        radial-gradient(1100px 520px at 4% -20%, rgba(120, 185, 255, 0.3), transparent 60%),
        radial-gradient(900px 480px at 110% -10%, rgba(107, 218, 188, 0.22), transparent 62%),
        linear-gradient(180deg, #eef4ff 0%, #e8eef9 100%);
}

:root.light .nodepost-toolbar,
:root.light .nodepost-sidebar,
:root.light .nodepost-detail,
:root.light .np-conversation-view,
:root.light .np-compose-form,
:root.light .np-settings-panel,
:root.light .np-modal {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(243, 247, 255, 0.94));
}

:root.light .np-btn {
    color: #1a2f52;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(233, 240, 252, 0.95));
    border-color: rgba(121, 154, 200, 0.5);
}

:root.light .np-btn-primary {
    color: #fff;
}

:root.light .np-conversation-item,
:root.light .np-message-card,
:root.light .np-settings-section,
:root.light .np-key-item,
:root.light .np-attachment-tag,
:root.light .np-msg-attachments a {
    background: rgba(255, 255, 255, 0.85);
}

:root.light .np-conversation-item.unread {
    box-shadow: 0 0 0 1px rgba(93, 160, 230, 0.35), 0 8px 18px rgba(72, 114, 173, 0.2);
}

:root.light .np-message-card.np-message-new {
    box-shadow: 0 0 0 1px rgba(229, 78, 90, 0.42), 0 10px 20px rgba(178, 75, 88, 0.23);
}

:root.light .np-download-icon {
    color: #2f6ea8;
}

:root.light .np-attachment-uploading {
    background: rgba(235, 242, 252, 0.95);
    color: #416489;
}

:root.light .np-conv-chip {
    color: #406793;
    border-color: rgba(97, 133, 180, 0.46);
    background: rgba(216, 231, 250, 0.8);
}

:root.light .np-conv-chip-reply {
    color: #1c7a56;
    border-color: rgba(87, 180, 142, 0.42);
    background: rgba(205, 241, 225, 0.9);
}

:root.light .np-input,
:root.light .np-textarea,
:root.light .np-recipient-area,
:root.light .np-dropdown {
    background: rgba(255, 255, 255, 0.95);
}

:root.light .np-modal-meta {
    color: #365f90;
    background: rgba(91, 164, 239, 0.15);
}

@media (max-width: 1040px) {
    .nodepost-layout {
        grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    }

    .nodepost-toolbar {
        padding: 0.75rem 0.82rem;
    }
}

@media (max-width: 860px) {
    .nodepost-container {
        padding: 0.72rem;
        gap: 0.72rem;
    }

    .nodepost-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(220px, 36vh) minmax(0, 1fr);
        gap: 0.72rem;
    }

    .nodepost-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .nodepost-toolbar-actions {
        justify-content: flex-start;
    }

    .np-messages-container {
        padding: 0.72rem;
    }

    .np-compose-form,
    .np-settings-panel {
        width: 100%;
        padding: 0.82rem;
    }

    .np-form-actions {
        position: sticky;
        bottom: 0;
        background: linear-gradient(180deg, rgba(21, 29, 47, 0.1), rgba(21, 29, 47, 0.88));
        padding-top: 0.55rem;
        padding-bottom: 0.2rem;
    }

    :root.light .np-form-actions {
        background: linear-gradient(180deg, rgba(238, 244, 255, 0.1), rgba(238, 244, 255, 0.9));
    }
}

@media (max-width: 560px) {
    .np-btn {
        width: 100%;
    }

    .nodepost-toolbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nodepost-toolbar-actions .np-badge {
        justify-self: start;
    }

    .np-modal {
        max-height: calc(100vh - 1.3rem);
        overflow-y: auto;
    }
}
