/* ============================================================
   VLS Mail Page Styles
   Add this to your existing themes.css or as a separate mail.css
   ============================================================ */

/* === LAYOUT === */
.mail-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.mail-layout {
    display: grid;
    grid-template-columns: 260px 1fr 240px;
    flex: 1;
    overflow: hidden;
    margin-top: 56px; /* top bar height */
}

/* === TOP BAR (extends existing) === */
.mail-page .top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    height: 56px;
}

.mail-page .top-bar .back-to-dash {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.8;
    margin-right: 1rem;
    transition: opacity 0.2s;
}

.mail-page .top-bar .back-to-dash:hover {
    opacity: 1;
}

/* === LEFT SIDEBAR === */
.mail-sidebar-left {
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1rem 0;
}

.compose-btn {
    margin: 0 1rem 1rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.compose-btn:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transform: translateY(-1px);
}

/* Folder section */
.folder-section {
    padding: 0 0.5rem;
}

.folder-section h4,
.custom-folders-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    padding: 0.5rem 0.75rem;
    margin: 0;
}

.folder-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0 24px 24px 0;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.9rem;
    color: #333;
}

.folder-item:hover {
    background: #eaeaea;
}

.folder-item.active {
    font-weight: 600;
}

.folder-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.folder-name {
    flex: 1;
}

.folder-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    color: white;
    min-width: 20px;
    text-align: center;
}

.folder-badge-gray {
    font-size: 0.75rem;
    color: #888;
}

.add-folder-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    text-align: left;
    transition: color 0.15s;
}

.add-folder-btn:hover {
    color: #333;
}

/* Course summary */
.course-summary-section {
    margin-top: 1rem;
    padding: 0 0.5rem;
    border-top: 1px solid #e0e0e0;
}

.course-summary-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    padding: 0.75rem 0.75rem 0.25rem;
    margin: 0;
}

.summary-total {
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

/* === CENTRE CONTENT === */
.mail-content {
    overflow-y: auto;
    background: #fff;
}

/* --- Message List --- */
.message-list-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.message-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.message-list-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.search-bar input {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    width: 280px;
    outline: none;
    transition: border-color 0.2s;
}

.search-bar input:focus {
    border-color: #888;
}

.message-list {
    flex: 1;
    overflow-y: auto;
}

.message-row {
    display: grid;
    grid-template-columns: 30px 160px 1fr 100px 80px;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 0.9rem;
}

.message-row:hover {
    background: #f5f7fa;
}

.message-row.unread {
    background: #f0f4ff;
    font-weight: 600;
}

.message-row.unread:hover {
    background: #e8eeff;
}

.message-star {
    font-size: 1.1rem;
    cursor: pointer;
    color: #ccc;
    transition: color 0.15s;
    text-align: center;
}

.message-row.starred .message-star,
.message-star:hover {
    color: #f5a623;
}

.message-sender-col {
    font-size: 0.9rem;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    background: #e8e8e8;
    color: #666;
    margin-left: 0.25rem;
    font-weight: 600;
    vertical-align: middle;
}

.message-subject-col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 0.5rem;
    color: #555;
}

.subject-text {
    color: #333;
}

.message-row.unread .subject-text {
    color: #111;
}

.attachment-icon {
    margin-left: 0.25rem;
    font-size: 0.85rem;
}

.message-date-col {
    font-size: 0.8rem;
    color: #888;
    text-align: right;
}

.message-status-col {
    text-align: center;
}

.unread-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
}

.read-status {
    font-size: 0.75rem;
    color: #aaa;
}

/* Empty & Loading states */
.empty-state, .loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #999;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
}

.pagination button {
    padding: 0.4rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}

.pagination span {
    font-size: 0.85rem;
    color: #666;
}

/* --- Conversation View --- */
.conversation-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.conversation-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.conversation-header h3 {
    flex: 1;
    margin: 0;
    font-size: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.back-btn {
    background: none;
    border: none;
    color: #555;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}

.back-btn:hover {
    background: #eee;
}

.conversation-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: #555;
    transition: all 0.15s;
}

.action-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

/* === Conversation thread (email-style cards, full-width) === */
.conversation-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: #f5f6f8;
}

.thread-message {
    /* explicit column flow so header always stacks above body, regardless of leftover/inherited rules */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: none;
    align-self: stretch;
    background: #fff;
    color: #1f2330;
    border: 1px solid #e6e8ef;
    border-left: 3px solid var(--mail-accent, #4a90e2);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(20,25,40,.04);
    overflow: hidden;
}

.thread-message.sent {
    background: #f8f9fa;
}

.message-card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1.1rem;
    border-bottom: 1px solid #eef0f5;
    width: 100%;
    box-sizing: border-box;
}

.message-card-identity {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.message-card-name-block {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.message-sender {
    font-weight: 600;
    color: #1f2330;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-on-behalf {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.1rem;
}

.message-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6b7280;
    font-size: 0.82rem;
    white-space: nowrap;
}

.message-date {
    color: #6b7280;
}

.important-flag {
    color: #b71c1c;
    font-weight: 600;
    font-size: 0.74rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.message-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.message-avatar-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    user-select: none;
}

.message-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-card-body {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 1rem 1.1rem;
}

.message-body {
    color: #1f2330;
    font-size: 0.95rem;
    line-height: 1.55;
    word-wrap: break-word;
}

.message-body p { margin: 0 0 0.6rem; }
.message-body p:last-child { margin-bottom: 0; }
.message-body a { color: var(--mail-accent, #2563eb); }

.message-attachments {
    margin-top: 0.85rem;
    padding-top: 0.6rem;
    border-top: 1px solid #eef0f5;
}

.attachment-link {
    display: inline-block;
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    text-decoration: none;
    color: #374151;
    margin: 0.25rem 0.35rem 0 0;
    transition: background .15s ease, border-color .15s ease;
}

.attachment-link:hover {
    background: #eef0f5;
    border-color: #d1d5db;
}

/* --- Compose View --- */
.compose-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.compose-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.compose-header h3 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #888;
    padding: 0.25rem 0.5rem;
}

.compose-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
    overflow-y: auto;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-row label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
    min-width: 60px;
}

.form-row input[type="text"] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
}

.form-row input[type="text"]:focus {
    border-color: #888;
}

.recipient-dropdown {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    margin-left: 68px;
}

.recipient-option {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.recipient-option:hover {
    background: #f0f4ff;
}

.recipient-course {
    font-size: 0.8rem;
    color: #888;
}

.selected-recipients {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-left: 68px;
}

.recipient-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 16px;
    font-size: 0.85rem;
    color: white;
}

.recipient-tag button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.7;
    padding: 0;
}

.recipient-tag button:hover {
    opacity: 1;
}

.compose-options {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: 68px;
}

.option-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #555;
}

.bulk-select {
    padding: 0.35rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

.compose-body {
    flex: 1;
}

.compose-body textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    outline: none;
}

.compose-body textarea:focus {
    border-color: #888;
}

.compose-actions {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid #e0e0e0;
}

.send-btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.send-btn:hover {
    opacity: 0.9;
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.cancel-btn {
    padding: 0.6rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    color: #555;
}

.cancel-btn:hover {
    background: #f5f5f5;
}

/* === RIGHT SIDEBAR === */
.mail-sidebar-right {
    background: #f8f9fa;
    border-left: 1px solid #e0e0e0;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-section {
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.sidebar-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin: 0 0 0.5rem;
}

.quick-action {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
}

.quick-action:hover {
    background: #eaeaea;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #555;
    padding: 0.25rem 0;
    cursor: pointer;
}

.participant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.85rem;
}

.participant-name {
    color: #333;
    font-weight: 500;
}

.participant-role {
    font-size: 0.75rem;
    color: #888;
}

/* === NDA THEME (Teal) === */
.mail-page.theme-nda .top-bar {
    background: linear-gradient(135deg, #0d6eaa, #0a8a8a);
}

.theme-nda .folder-item.active { background: #e8edf5; color: #0b3b85; }

.theme-nda .compose-btn { background: #0b3b85; color: white; }

.theme-nda .folder-badge { background: #0d6b9f; }
.theme-nda .unread-badge { background: #0d6b9f; }

.theme-nda .thread-message { --mail-accent: #0b3b85; }

.theme-nda .recipient-tag { background: #0b3b85; }

.theme-nda .send-btn { background: #0b3b85; }

.theme-nda .message-row.unread { border-left: 3px solid #0d6b9f; }

/* === NMA THEME (Dark) === */
.mail-page.theme-nma .top-bar {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.theme-nma .folder-item.active {
    background: #e8eaf6;
    color: #1a1a2e;
}

.theme-nma .compose-btn {
    background: #c62828;
    color: white;
}

.theme-nma .folder-badge,
.theme-nma .unread-badge {
    background: #c62828;
}

.theme-nma .thread-message { --mail-accent: #c62828; }

.theme-nma .recipient-tag {
    background: #c62828;
}

.theme-nma .send-btn {
    background: #c62828;
}

.theme-nma .message-row.unread {
    border-left: 3px solid #c62828;
}

/* === BOM THEME (Light/Red) === */
.mail-page.theme-bom .top-bar {
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
}

.theme-bom .folder-item.active {
    background: #fce4ec;
    color: #b71c1c;
}

.theme-bom .compose-btn {
    background: #b71c1c;
    color: white;
}

.theme-bom .folder-badge,
.theme-bom .unread-badge {
    background: #b71c1c;
}

.theme-bom .thread-message { --mail-accent: #b71c1c; }

.theme-bom .recipient-tag {
    background: #b71c1c;
}

.theme-bom .send-btn {
    background: #b71c1c;
}

.theme-bom .message-row.unread {
    border-left: 3px solid #b71c1c;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .mail-layout {
        grid-template-columns: 220px 1fr 200px;
    }
}

@media (max-width: 768px) {
    .mail-layout {
        grid-template-columns: 1fr;
    }

    .mail-sidebar-left,
    .mail-sidebar-right {
        display: none;
    }
}

/* Theme overrides for top bar */
.mail-page.theme-nda .top-bar { background: linear-gradient(135deg, #0d6eaa, #0a8a8a) !important; }
.mail-page.theme-nma .top-bar { background: linear-gradient(135deg, #1a1a2e, #16213e) !important; }
.mail-page.theme-bom .top-bar { background: linear-gradient(135deg, #b71c1c, #d32f2f) !important; }

/* === CORRECTED THEME OVERRIDES === */
.mail-page.theme-nda .top-bar { background: linear-gradient(to right, #151f6d, #0d6b9f) !important; }
.mail-page.theme-nda .compose-btn { background: #0b3b85; color: white; }
.mail-page.theme-nda .folder-badge, .mail-page.theme-nda .unread-badge { background: #0d6b9f; }
.mail-page.theme-nda .folder-item.active { background: #e8edf5; color: #0b3b85; }
.mail-page.theme-nda .thread-message { --mail-accent: #0b3b85; }
.mail-page.theme-nda .recipient-tag { background: #0b3b85; }
.mail-page.theme-nda .send-btn { background: #0b3b85; }
.mail-page.theme-nda .message-row.unread { border-left: 3px solid #0d6b9f; }

.mail-page.theme-nma .top-bar { background: linear-gradient(to right, #2d3748, #4a5568) !important; }
.mail-page.theme-nma .compose-btn { background: #ff4757; color: white; }
.mail-page.theme-nma .folder-badge, .mail-page.theme-nma .unread-badge { background: #ff4757; }
.mail-page.theme-nma .folder-item.active { background: #ffe8ea; color: #ff4757; }
.mail-page.theme-nma .thread-message { --mail-accent: #c62828; }
.mail-page.theme-nma .recipient-tag { background: #ff4757; }
.mail-page.theme-nma .send-btn { background: #ff4757; }
.mail-page.theme-nma .message-row.unread { border-left: 3px solid #ff4757; }

.mail-page.theme-bom .top-bar { background: #f5f5f5 !important; border-bottom: 1px solid #e0e0e0; }
.mail-page.theme-bom .compose-btn { background: #e53e3e; color: white; }
.mail-page.theme-bom .folder-badge, .mail-page.theme-bom .unread-badge { background: #e53e3e; }
.mail-page.theme-bom .folder-item.active { background: #fce4ec; color: #e53e3e; }
.mail-page.theme-bom .thread-message { --mail-accent: #b71c1c; }
.mail-page.theme-bom .recipient-tag { background: #e53e3e; }
.mail-page.theme-bom .send-btn { background: #e53e3e; }
.mail-page.theme-bom .message-row.unread { border-left: 3px solid #e53e3e; }

/* Top bar text/logo visibility */
.mail-page .top-bar-logo { color: white; }
.mail-page .top-bar-user { color: rgba(255,255,255,0.9); }
.mail-page .top-bar-img { height: 45px; max-height: 45px; }
.mail-page .hamburger-btn { color: white; }

/* BOM light background needs dark text */
.mail-page.theme-bom .top-bar-logo { color: #333; }
.mail-page.theme-bom .top-bar-user { color: #555; }
.mail-page.theme-bom .hamburger-btn { color: #333; }
.mail-page.theme-bom .back-to-dash { color: #333; }

/* Attachment zone */
.attachment-zone {
    padding: 0.5rem 0;
}
.attachment-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border: 1px dashed #ccc;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
}
.attachment-btn:hover {
    border-color: #888;
    background: #f9f9f9;
}
.pending-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.attachment-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    background: #e8f0fe;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #333;
}
.attachment-tag button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
}
.attachment-tag button:hover {
    color: #333;
}

/* Course tag in inbox */
.course-tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    background: #e8f0fe;
    color: #1a56db;
    margin-left: 0.4rem;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
.course-filter {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Draft button */
.draft-btn {
    padding: 0.5rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}
.draft-btn:hover { background: #e9ecef; }

.delete-draft-btn {
    padding: 0.5rem 1.2rem;
    border: 1px solid #e53e3e;
    border-radius: 4px;
    background: white;
    color: #e53e3e;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}
.delete-draft-btn:hover { background: #fff0f0; }

/* ---- Signature Settings ---- */
.sig-settings-btn {
    width: 100%;
    padding: 0.5rem 0.8rem;
    margin-top: 0.4rem;
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555;
    text-align: left;
    transition: all 0.15s;
}
.sig-settings-btn:hover { background: #f0f0f0; border-color: #ccc; }

.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}
.signature-modal {
    background: #fff; border-radius: 12px; width: 600px; max-height: 80vh;
    display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.signature-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.25rem; border-bottom: 1px solid #e0e0e0;
}
.signature-modal-header h3 { margin: 0; font-size: 1.1rem; }
.signature-modal-body {
    padding: 1.25rem; overflow-y: auto; flex: 1;
}
.signature-modal-body label {
    display: block; font-weight: 600; font-size: 0.85rem;
    margin-bottom: 0.4rem; margin-top: 1rem; color: #333;
}
.signature-modal-body label:first-child { margin-top: 0; }
.sig-input {
    width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #ddd;
    border-radius: 6px; font-size: 0.9rem; box-sizing: border-box;
}
.sig-input:focus { outline: none; border-color: #2A9D8F; }
.sig-hint { font-size: 0.78rem; color: #888; margin-top: 0.3rem; }
.booking-link-section { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #eee; }
.sig-toggle { margin-top: 1rem; }
.signature-modal-footer {
    display: flex; justify-content: flex-end; gap: 0.5rem;
    padding: 1rem 1.25rem; border-top: 1px solid #e0e0e0;
}


/* Claim pills for shared mailbox conversations */
.claim-pill {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    vertical-align: middle;
}

.claim-unclaimed {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.claim-mine {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.claim-theirs {
    background-color: #e5e7eb;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

/* Filter dropdown in message list header */
.filter-dropdown {
    margin-left: 12px;
}

.filter-select {
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: white;
    font-size: 0.85rem;
    cursor: pointer;
}

.filter-select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -1px;
}

/* Folder move dropdown in conversation header */
.folder-move-select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: white;
    font-size: 0.85rem;
    cursor: pointer;
}