/* ============================================================================
   ManagementHub.css — Complete styling for the Management Hub component
   LINGO Speech Therapy Management System
   Brand Colours:
     Primary (Coral): #ec5f59
     Secondary (Teal): #97c1bc
     Text (Navy): #372562
     Purple (Accent): #7c3aed
     Gold (Accent): #fdc758
     Darker Coral: #D4605A
   ============================================================================ */

/* ---- Container & Header ---- */

.mhub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    color: #372562;
    font-family: inherit;
}

.mhub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.mhub-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mhub-back-btn {
    background: none;
    border: none;
    color: #7c3aed;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.mhub-back-btn:hover {
    background: rgba(124, 58, 237, 0.08);
    color: #5b21b6;
}

.mhub-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #372562;
}

/* ---- Tab Navigation ---- */

.mhub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.mhub-tab {
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}

.mhub-tab:hover {
    color: #ec5f59;
}

.mhub-tab.active {
    color: #ec5f59;
    border-bottom-color: #ec5f59;
    font-weight: 600;
}

/* ---- Tab Content ---- */

.mhub-tab-content {
    animation: mhub-fadeIn 0.2s ease;
}

@keyframes mhub-fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Messages ---- */

.mhub-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.mhub-success {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.mhub-dismiss-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 0 0.25rem;
    line-height: 1;
}

.mhub-dismiss-btn:hover {
    opacity: 1;
}

/* ---- Loading & Spinner ---- */

.mhub-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: #6b7280;
    font-size: 0.95rem;
}

.mhub-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top-color: #ec5f59;
    border-radius: 50%;
    animation: mhub-spin 0.7s linear infinite;
}

@keyframes mhub-spin {
    to { transform: rotate(360deg); }
}

/* ---- Section & Section Headers ---- */

.mhub-section {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(45, 36, 86, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.mhub-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.mhub-section-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #372562;
}

.mhub-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ---- List Items ---- */

.mhub-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mhub-list-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.mhub-list-item:hover {
    background: #f9fafb;
    border-color: #ec5f59;
    box-shadow: 0 2px 6px rgba(232, 114, 106, 0.12);
}

.mhub-list-item-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mhub-list-item-sub {
    font-size: 0.85rem;
    color: #6b7280;
}

.mhub-list-date {
    font-weight: 600;
    color: #372562;
    font-size: 0.95rem;
}

.mhub-list-name {
    font-weight: 600;
    color: #372562;
    font-size: 0.95rem;
}

/* ---- Status Badges ---- */

.mhub-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.mhub-badge-agenda {
    background: #dbeafe;
    color: #1e40af;
}

.mhub-badge-minutes {
    background: #dcfce7;
    color: #166534;
}

.mhub-badge-draft {
    background: #fef3c7;
    color: #92400e;
}

.mhub-badge-completed {
    background: #dcfce7;
    color: #166534;
}

.mhub-badge-shared {
    background: #ede9fe;
    color: #5b21b6;
}

.mhub-badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.mhub-badge-in_progress {
    background: #dbeafe;
    color: #1e40af;
}

/* ---- Forms ---- */

.mhub-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mhub-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mhub-form-row > label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #372562;
}

.mhub-input {
    padding: 0.55rem 0.75rem;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #372562;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    max-width: 400px;
}

.mhub-input:focus {
    outline: none;
    border-color: #ec5f59;
    box-shadow: 0 0 0 3px rgba(232, 114, 106, 0.15);
}

.mhub-input:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.mhub-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* ---- Rich Text Editor ---- */

.mhub-editor {
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    min-height: 300px;
    padding: 1rem;
    font-size: 0.95rem;
    color: #372562;
    line-height: 1.6;
    background: #fff;
    overflow-y: auto;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mhub-editor:focus {
    outline: none;
    border-color: #ec5f59;
    box-shadow: 0 0 0 3px rgba(232, 114, 106, 0.15);
}

.mhub-editor[contenteditable="false"] {
    background: #f9fafb;
    cursor: default;
}

.mhub-editor h2,
.mhub-editor h3 {
    color: #372562;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.mhub-editor p {
    margin: 0.4rem 0;
}

.mhub-editor ul,
.mhub-editor ol {
    padding-left: 1.5rem;
    margin: 0.4rem 0;
}

/* ---- Attendee Checklist ---- */

.mhub-attendee-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    padding: 0.5rem 0;
}

.mhub-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #372562;
    cursor: pointer;
}

.mhub-checkbox-label input[type="checkbox"] {
    accent-color: #ec5f59;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.mhub-readonly-attendees {
    font-size: 0.9rem;
    color: #372562;
    line-height: 1.7;
}

.mhub-readonly-attendees strong {
    color: #372562;
}

/* ---- Tasks ---- */

.mhub-task-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mhub-task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    flex-wrap: wrap;
}

.mhub-task-desc {
    flex: 1;
    min-width: 150px;
    font-size: 0.9rem;
    color: #372562;
}

.mhub-task-assignee {
    font-size: 0.85rem;
    color: #7c3aed;
    font-weight: 500;
}

.mhub-task-deadline {
    font-size: 0.85rem;
    color: #6b7280;
}

.mhub-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f0fdf4;
    border: 1px dashed #86efac;
    border-radius: 6px;
    align-items: flex-end;
}

.mhub-inline-form .mhub-input {
    flex: 1;
    min-width: 140px;
    max-width: none;
}

.mhub-inline-actions {
    display: flex;
    gap: 0.4rem;
}

/* ---- Shared Task List ---- */

.mhub-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.mhub-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mhub-filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
}

.mhub-filter-group select {
    padding: 0.45rem 0.6rem;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #372562;
    background: #fff;
    min-width: 160px;
    transition: border-color 0.2s;
}

.mhub-filter-group select:focus {
    outline: none;
    border-color: #ec5f59;
}

.mhub-table-wrap {
    overflow-x: auto;
}

.mhub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.mhub-table thead th {
    text-align: left;
    padding: 0.65rem 0.75rem;
}

.mhub-table thead th.mhub-sortable {
    cursor: pointer;
    user-select: none;
}

.mhub-table thead th.mhub-sortable:hover {
    background: #eef2ff;
}

.mhub-table thead th.mhub-sortable span {
    font-size: 0.7rem;
    margin-left: 0.25rem;
    color: #7c3aed;
}
    background: #f3f4f6;
    color: #372562;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid #e5e7eb;
}

.mhub-table tbody td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: #372562;
    vertical-align: middle;
}

.mhub-table tbody tr:hover {
    background: #fafafa;
}

.mhub-status-select {
    padding: 0.3rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.85rem;
    color: #372562;
    background: #fff;
    cursor: pointer;
}

.mhub-status-select:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.mhub-completed-row {
    opacity: 0.55;
}

.mhub-completed-row td {
    text-decoration: line-through;
    color: #9ca3af;
}

.mhub-completed-row .mhub-status-select {
    text-decoration: none;
}

/* ---- Source badge (Task List tab) ---- */

.mhub-source-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 10px;
    margin-right: 0.5rem;
    color: #372562;
}

.mhub-source-management_meeting {
    background: #fde2de;  /* pastel coral tint */
    border: 1px solid #f4a79f;
}

.mhub-source-peer_meeting {
    background: #e3ddf6;  /* pastel purple tint */
    border: 1px solid #b9a9e6;
}

.mhub-source-standalone {
    background: #fdf2d0;  /* pastel gold tint */
    border: 1px solid #fdc758;
}

.mhub-source-secondary_meeting {
    background: #d4edda;  /* pastel green tint */
    border: 1px solid #97c1bc;
}

.mhub-source-date {
    color: #6b7280;
    font-size: 0.8rem;
}

/* Inline standalone-task form on the Task List tab */
.mhub-standalone-task-form {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #faf5ff;  /* very pale purple */
    border: 1px solid #e3ddf6;
    border-radius: 8px;
}

/* ---- Cadence Info ---- */

.mhub-cadence-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #372562;
}

.mhub-cadence-item {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.mhub-cadence-label {
    font-weight: 600;
    color: #372562;
}

.mhub-cadence-overdue {
    background: #fef3c7;
    color: #92400e;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid #fbbf24;
}

.mhub-cadence-none {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #6b7280;
    font-style: italic;
}

/* ---- Documents: Breadcrumbs ---- */

.mhub-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.mhub-breadcrumb {
    color: #7c3aed;
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    transition: background 0.15s;
}

.mhub-breadcrumb:hover {
    background: rgba(124, 58, 237, 0.08);
}

.mhub-breadcrumb-sep {
    color: #9ca3af;
    margin: 0 0.15rem;
    cursor: default;
}

/* ---- Documents: Folder Grid ---- */

.mhub-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.mhub-folder-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.mhub-folder-item:hover {
    background: #f0fdfa;
    border-color: #97c1bc;
    box-shadow: 0 2px 6px rgba(143, 188, 176, 0.15);
}

.mhub-folder-icon {
    font-size: 1.3rem;
}

.mhub-folder-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #372562;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Documents: Doc Title (clickable) ---- */

.mhub-doc-title {
    color: #7c3aed;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.15s;
}

.mhub-doc-title:hover {
    color: #5b21b6;
    text-decoration: underline;
}

/* ---- Buttons ---- */

.mhub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    white-space: nowrap;
}

.mhub-btn:active {
    transform: scale(0.97);
}

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

.mhub-btn-primary {
    background: linear-gradient(135deg, #ec5f59 0%, #D4605A 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(232, 114, 106, 0.25);
}

.mhub-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #D4605A 0%, #c0524b 100%);
    box-shadow: 0 3px 10px rgba(232, 114, 106, 0.35);
}

.mhub-btn-secondary {
    background: #f3f4f6;
    color: #372562;
    border: 1px solid #d1d5db;
}

.mhub-btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.mhub-btn-accent {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25);
}

.mhub-btn-accent:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    box-shadow: 0 3px 10px rgba(124, 58, 237, 0.35);
}

.mhub-btn-danger {
    background: #ef4444;
    color: #fff;
}

.mhub-btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.mhub-btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    border-radius: 5px;
}

/* ---- Modals ---- */

.mhub-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45, 36, 86, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: mhub-fadeIn 0.15s ease;
}

.mhub-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(45, 36, 86, 0.18);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mhub-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #ec5f59 0%, #D4605A 100%);
    color: #fff;
}

.mhub-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.mhub-modal-header-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.mhub-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
    color: #372562;
    font-size: 0.95rem;
    line-height: 1.5;
}

.mhub-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.mhub-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0.8;
    padding: 0;
    line-height: 1;
    transition: opacity 0.15s;
}

.mhub-modal-close:hover {
    opacity: 1;
}

/* ---- Empty States ---- */

.mhub-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #9ca3af;
    font-size: 0.95rem;
}

.mhub-empty-small {
    text-align: center;
    padding: 0.75rem;
    color: #9ca3af;
    font-size: 0.85rem;
    font-style: italic;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .mhub-container {
        padding: 1rem;
    }

    .mhub-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .mhub-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .mhub-tabs {
        gap: 0;
    }

    .mhub-tab {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    .mhub-section {
        padding: 1rem;
    }

    .mhub-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mhub-header-actions {
        width: 100%;
    }

    .mhub-header-actions .mhub-btn {
        flex: 1;
    }

    .mhub-form-actions {
        flex-direction: column;
    }

    .mhub-form-actions .mhub-btn {
        width: 100%;
    }

    .mhub-input {
        max-width: none;
    }

    .mhub-filters {
        flex-direction: column;
    }

    .mhub-filter-group {
        width: 100%;
    }

    .mhub-filter-group select {
        width: 100%;
        min-width: auto;
    }

    .mhub-table {
        font-size: 0.82rem;
    }

    .mhub-table thead th,
    .mhub-table tbody td {
        padding: 0.5rem;
    }

    .mhub-folder-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .mhub-modal {
        width: 95%;
        max-width: none;
    }

    .mhub-cadence-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .mhub-inline-form {
        flex-direction: column;
    }

    .mhub-inline-form .mhub-input {
        min-width: auto;
    }

    .mhub-task-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .mhub-list-item-main {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .mhub-title {
        font-size: 1.3rem;
    }

    .mhub-tab {
        padding: 0.5rem 0.6rem;
        font-size: 0.78rem;
    }

    .mhub-btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.82rem;
    }

    .mhub-editor {
        min-height: 200px;
    }
}


/* ---- Agenda Number & Section-based Meeting Form ---- */

.mhub-agenda-number {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.2rem 0.6rem;
    background: #fdc758;
    color: #372562;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    vertical-align: middle;
}

.mhub-list-agenda-num {
    display: inline-block;
    margin-right: 0.5rem;
    padding: 0.15rem 0.5rem;
    background: #fdc758;
    color: #372562;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.mhub-agenda-heading {
    padding: 1rem 1.25rem;
    background: rgba(143, 188, 176, 0.08);
    border: 1px solid rgba(143, 188, 176, 0.35);
    border-radius: 10px;
}

.mhub-agenda-heading h2 {
    margin: 0 0 0.5rem 0;
    color: #372562;
    font-size: 1.3rem;
}

.mhub-agenda-meta {
    font-size: 0.95rem;
    color: #372562;
}

.mhub-agenda-meta div {
    margin-bottom: 0.15rem;
}

.mhub-sections {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mhub-section-block {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    background: white;
}

.mhub-section-title {
    margin: 0 0 0.75rem 0;
    color: #372562;
    font-size: 1.05rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #97c1bc;
}

.mhub-section-editor {
    min-height: 70px;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fbfbff;
    color: #372562;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.mhub-section-editor:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

/* Placeholder text for empty contenteditable section editors */
.mhub-section-editor:empty::before,
.mhub-section-editor p:only-child:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    font-style: italic;
    pointer-events: none;
}

/* ---- Structured Actions Panel ---- */

.mhub-actions-panel {
    margin-top: 0.75rem;
    padding: 0.75rem 0.9rem;
    background: rgba(232, 184, 75, 0.08);
    border: 1px dashed rgba(232, 184, 75, 0.45);
    border-radius: 8px;
}

.mhub-actions-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #372562;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.mhub-action-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mhub-action-item:last-child {
    border-bottom: none;
}

.mhub-action-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ec5f59;
}

.mhub-action-text {
    flex: 1;
    color: #372562;
    font-size: 0.92rem;
}

.mhub-action-done {
    text-decoration: line-through;
    color: #6b7280;
}

.mhub-action-desc {
    font-weight: 500;
}

.mhub-action-who {
    color: #7c3aed;
    margin-left: 0.4rem;
    font-size: 0.9rem;
}

.mhub-action-when {
    color: #6b7280;
    margin-left: 0.4rem;
    font-size: 0.85rem;
    font-style: italic;
}

.mhub-action-form {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr auto;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.6rem;
    padding: 0.6rem;
    background: white;
    border: 1px solid #fdc758;
    border-radius: 6px;
}

.mhub-action-desc-input,
.mhub-action-who-input,
.mhub-action-when-input {
    padding: 0.4rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

.mhub-action-form-buttons {
    display: flex;
    gap: 0.35rem;
}

.mhub-add-action-btn {
    margin-top: 0.5rem;
}

.mhub-action-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
}

@media (max-width: 768px) {
    .mhub-action-form {
        grid-template-columns: 1fr;
    }
}


/* ---- Simplified Document List (icon + name + actions) ---- */

.mhub-doc-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 1rem;
}

.mhub-doc-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: background 0.15s, border-color 0.15s;
}

.mhub-doc-row:hover {
    background: #fbfaff;
    border-color: #7c3aed33;
}

.mhub-doc-icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
}

.mhub-doc-name {
    flex: 1;
    color: #7c3aed;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mhub-doc-name:hover {
    text-decoration: underline;
    color: #5b21b6;
}

.mhub-doc-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}
