/* ===========================================
   Client Portal - AI Virtual Assistant
   =========================================== */

#ssp-portal {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
}

/* Header */
.ssp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: #fff;
    border-radius: 12px 12px 0 0;
}

.ssp-header h1 {
    margin: 0;
    font-size: 22px;
}

.ssp-header p {
    margin: 0;
    opacity: 0.8;
    font-size: 13px;
}

.ssp-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ssp-user-badge {
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.ssp-alert-badge {
    background: #dc3545;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ssp-logout {
    color: #fff;
    opacity: 0.8;
    text-decoration: none;
    font-size: 13px;
}

.ssp-logout:hover {
    opacity: 1;
}

/* Main Layout */
.ssp-main {
    display: flex;
    background: #f5f7fa;
    /* Fill the viewport below the header so the chat column and task list
       each scroll internally — no page-level second scrollbar, no dead
       space under the input area. */
    height: calc(100vh - 180px);
    min-height: 520px;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

/* Tasks Panel */
.ssp-tasks-panel {
    width: 280px;
    background: #fff;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ssp-tab-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.ssp-tasks-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ssp-tasks-header h2 {
    margin: 0;
    font-size: 16px;
}

.ssp-task-count {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 3px 10px;
    border-radius: 12px;
}

.ssp-task-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.ssp-task-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.ssp-task-item:hover {
    background: #f0f4f8;
}

.ssp-task-item.overdue {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.ssp-task-item.today {
    background: #e3f2fd;
    border-left-color: #1e88e5;
}

.ssp-task-item.priority-high {
    border-left-color: #dc3545;
}

.ssp-task-check {
    flex-shrink: 0;
}

.ssp-complete-btn {
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #ccc;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ssp-complete-btn:hover {
    border-color: #28a745;
    color: #28a745;
    background: #e8f5e9;
}

.ssp-task-content {
    flex: 1;
    min-width: 0;
}

.ssp-task-title {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
}

.ssp-task-icon {
    margin-right: 5px;
}

.ssp-task-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    line-height: 1.4;
}

.ssp-task-meta {
    font-size: 11px;
}

.ssp-task-date {
    color: #666;
}

.ssp-task-date.overdue {
    color: #dc3545;
    font-weight: 600;
}

.ssp-no-tasks {
    text-align: center;
    padding: 40px 20px;
    color: #28a745;
}

.ssp-no-tasks p {
    font-size: 18px;
    margin: 0 0 5px;
}

.ssp-no-tasks small {
    color: #666;
}

/* Chat Container */
.ssp-chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #eee;
}

/* Messages */
.ssp-messages {
    flex: 1;
    min-height: 0;
    padding: 20px;
    overflow-y: auto;
}

.ssp-message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

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

.ssp-message.ssp-user {
    flex-direction: row-reverse;
}

.ssp-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.ssp-ai .ssp-avatar {
    background: #e3f2fd;
}

.ssp-user .ssp-avatar {
    background: #e8f5e9;
}

.ssp-admin .ssp-avatar {
    background: #fff3e0;
}

.ssp-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
}

.ssp-ai .ssp-bubble {
    background: #f0f4f8;
    border-bottom-left-radius: 4px;
}

.ssp-user .ssp-bubble {
    background: #1e88e5;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ssp-admin .ssp-bubble {
    background: #fff3e0;
    border-left: 3px solid #ff9800;
    border-bottom-left-radius: 4px;
}

.ssp-sender {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #e65100;
}

.ssp-bubble p {
    margin: 0 0 8px;
}

.ssp-bubble p:last-child {
    margin-bottom: 0;
}

.ssp-bubble ul, .ssp-bubble ol {
    margin: 8px 0;
    padding-left: 20px;
}

.ssp-bubble li {
    margin-bottom: 4px;
}

/* Quick Actions */
.ssp-quick-actions {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    border-top: 1px solid #eee;
    background: #fafafa;
    flex-wrap: wrap;
    justify-content: center;
}

.ssp-quick-btn {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.3;
}

.ssp-quick-btn:hover {
    background: #e8f0fe;
    color: #0B1D3A;
    border-color: #1258C2;
    box-shadow: 0 2px 6px rgba(18,88,194,0.15);
}

/* Input Area */
.ssp-input-area {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

#ssp-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    outline: none;
}

#ssp-input:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30,136,229,0.1);
}

#ssp-send {
    padding: 12px 24px;
    background: #1e88e5;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#ssp-send:hover {
    background: #1565c0;
}

#ssp-send:disabled {
    background: #bbb;
    cursor: not-allowed;
}

/* Side Panel */
.ssp-side-panel {
    width: 350px;
    max-width: 90vw;
    background: #fff;
    padding: 20px;
    overflow-y: auto;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.25s ease, visibility 0.25s;
    visibility: hidden;
}
.ssp-side-panel.ssp-panel-open {
    transform: translateX(0);
    visibility: visible;
}
.ssp-panel-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 9998;
}
.ssp-panel-backdrop.active {
    display: block;
}

.ssp-panel-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

.ssp-panel-close:hover {
    background: #e0e0e0;
}

.ssp-panel-content h3 {
    margin: 0 0 20px;
    font-size: 18px;
}

/* Upload Type Selection */
.ssp-upload-type {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.ssp-radio-card {
    flex: 1;
    display: block;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.ssp-radio-card input {
    display: none;
}

.ssp-radio-card span {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.ssp-radio-card small {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.ssp-radio-card:has(input:checked) {
    border-color: #1e88e5;
    background: #e3f2fd;
}

/* Form Fields */
.ssp-field {
    margin-bottom: 15px;
}

.ssp-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.ssp-field input,
.ssp-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.ssp-field input:focus,
.ssp-field select:focus {
    outline: none;
    border-color: #1e88e5;
}

.ssp-doc-type {
    display: flex;
    gap: 20px;
}

.ssp-doc-type label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
}

/* Dropzone */
.ssp-dropzone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.2s;
}

.ssp-dropzone:hover,
.ssp-dropzone.dragover {
    border-color: #1e88e5;
    background: #e3f2fd;
}

.ssp-dropzone p {
    margin: 0;
    color: #666;
}

#ssp-file-preview {
    margin-bottom: 15px;
}

.ssp-file-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 13px;
}

.ssp-file-item .name {
    flex: 1;
}

.ssp-file-item .remove {
    color: #e53935;
    cursor: pointer;
    padding: 0 5px;
}

/* Buttons */
.ssp-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ssp-btn-primary {
    background: #1e88e5;
    color: #fff;
}

.ssp-btn-primary:hover {
    background: #1565c0;
}

.ssp-btn-primary:disabled {
    background: #bbb;
    cursor: not-allowed;
}

.ssp-btn-success {
    background: #43a047;
    color: #fff;
}

.ssp-btn-success:hover {
    background: #388e3c;
}

/* Loading */
.ssp-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #1e88e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .ssp-main {
        flex-direction: column;
    }
    
    .ssp-tasks-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        max-height: 250px;
    }
    
    .ssp-side-panel {
        width: 100%;
        max-width: 100vw;
    }
    
    .ssp-bubble {
        max-width: 85%;
    }
    
    .ssp-quick-actions {
        flex-wrap: wrap;
    }
}

/* Cloud Storage Upload */
.ssp-cloud-upload {
    margin: 15px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.ssp-cloud-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    padding: 12px 15px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
}

.ssp-cloud-embed {
    padding: 15px;
    background: #fff;
    min-height: 200px;
}

.ssp-cloud-embed iframe {
    width: 100%;
    min-height: 300px;
    border: none;
}

/* WP Cloud Plugins Styling Adjustments */
.ssp-cloud-embed .wpcp-upload-container,
.ssp-cloud-embed .OutoftheBox,
.ssp-cloud-embed .UseyourDrive,
.ssp-cloud-embed .LetsShare {
    border: none !important;
    box-shadow: none !important;
}

.ssp-cloud-embed .upload-btn {
    background: #1e88e5 !important;
    border-color: #1e88e5 !important;
}

/* Agent Tool Execution Summary */
.ssp-tools-summary {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.ssp-tools-summary small {
    color: #888;
    font-size: 11px;
    line-height: 1.6;
}

/* Enhanced AI Bubble for Agent Actions */
.ssp-bubble .ssp-action-result {
    background: #e8f5e9;
    border-left: 3px solid #4caf50;
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    margin: 8px 0;
    font-size: 13px;
}

.ssp-bubble .ssp-action-result.error {
    background: #fbe9e7;
    border-left-color: #e53935;
}

/* Thinking/Working indicator */
.ssp-bubble .ssp-working {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 13px;
}

.ssp-bubble .ssp-working .ssp-loading {
    width: 14px;
    height: 14px;
}

/* ===== PANEL TABS ===== */
.ssp-panel-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 12px;
    padding: 0 5px;
}
.ssp-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}
.ssp-tab:hover { color: #0B1D3A; background: #f0f4f8; }
.ssp-tab.active {
    color: #fff;
    background: #1258C2;
    border-bottom-color: #1258C2;
    border-radius: 6px 6px 0 0;
}

/* ===== CALENDAR ===== */
.ssp-cal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 5px 10px;
}
.ssp-cal-title {
    flex: 1;
    font-weight: 700;
    font-size: 15px;
    color: #0B1D3A;
    text-align: center;
}
.ssp-cal-nav {
    width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.15s;
}
.ssp-cal-nav:hover { background: #f1f5f9; color: #0B1D3A; }
.ssp-cal-today {
    padding: 4px 10px;
    border: 1px solid #1258C2;
    border-radius: 6px;
    background: #fff;
    color: #1258C2;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.ssp-cal-today:hover { background: #1258C2; color: #fff; }

.ssp-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 0 2px;
}
.ssp-cal-day-header {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    padding: 4px 0;
}
.ssp-cal-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.15s;
    min-height: 34px;
}
.ssp-cal-cell.empty { cursor: default; }
.ssp-cal-cell:not(.empty):hover { background: #f1f5f9; }
.ssp-cal-cell.today .ssp-cal-num {
    background: #1258C2;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ssp-cal-cell.selected {
    background: #EBF5FF;
    box-shadow: inset 0 0 0 2px #1258C2;
}
.ssp-cal-cell.has-overdue .ssp-cal-num { color: #E74C3C; font-weight: 700; }
.ssp-cal-num {
    font-size: 12px;
    font-weight: 500;
    color: #334155;
    line-height: 1;
}
.ssp-cal-dots {
    display: flex;
    gap: 2px;
    margin-top: 2px;
    position: absolute;
    bottom: 3px;
}
.ssp-cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: block;
}
.ssp-cal-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: #94a3b8;
    font-size: 13px;
}

/* Calendar Events Panel */
.ssp-cal-events {
    margin-top: 10px;
    padding: 0 2px;
    max-height: 280px;
    overflow-y: auto;
}
.ssp-cal-day-label {
    font-size: 12px;
    font-weight: 700;
    color: #0B1D3A;
    padding: 6px 4px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 6px;
}
.ssp-cal-hint, .ssp-cal-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 15px 0;
}
.ssp-cal-event {
    padding: 8px 10px;
    margin-bottom: 6px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 12px;
}
.ssp-cal-event[data-source="internal"] {
    background: #f3f0ff;
    border-left: 3px solid #9B59B6 !important;
}
.ssp-cal-event[data-source="public"] {
    background: #fff5f0;
    border-left: 3px solid #FF6B35 !important;
}
.ssp-cal-source-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: auto;
    flex-shrink: 0;
}
.ssp-cal-source-tag.internal {
    background: #ede9fe;
    color: #6d28d9;
}
.ssp-cal-source-tag.public {
    background: #ffedd5;
    color: #c2410c;
}
.ssp-cal-ev-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    opacity: 0;
    transition: opacity 0.15s;
    flex-shrink: 0;
    border-radius: 4px;
}
.ssp-cal-event:hover .ssp-cal-ev-delete {
    opacity: 0.6;
}
.ssp-cal-ev-delete:hover {
    opacity: 1 !important;
    background: #fee2e2;
}
.ssp-cal-ev-header {
    display: flex;
    align-items: center;
    gap: 5px;
}
.ssp-cal-ev-icon { font-size: 13px; }
.ssp-cal-ev-title {
    font-weight: 600;
    color: #1e293b;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ssp-cal-badge {
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.ssp-cal-badge.done { background: #d1fae5; color: #065f46; }
.ssp-cal-badge.urgent { background: #fee2e2; color: #991b1b; }
.ssp-cal-ev-time {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
}
.ssp-cal-ev-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}
.ssp-cal-ev-desc {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 3px;
    line-height: 1.4;
}

/* ===== ADD BUTTONS ===== */
.ssp-add-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #1258C2;
    background: #fff;
    color: #1258C2;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    line-height: 1;
    padding: 0;
    margin-left: auto;
}
.ssp-add-btn:hover { background: #1258C2; color: #fff; }

.ssp-cal-add {
    min-width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #1258C2;
    background: #fff;
    color: #1258C2;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0 8px;
    line-height: 1;
    white-space: nowrap;
}
.ssp-cal-add:hover { background: #1258C2; color: #fff; }
.ssp-cal-add[style*="border-color:#2ECC71"]:hover { background: #2ECC71; color: #fff; }

.ssp-cal-add-btns {
    display: flex;
    gap: 6px;
    padding: 6px 0;
}
.ssp-cal-add-btn {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.ssp-cal-add-btn:hover {
    background: #EBF5FF;
    border-color: #1258C2;
    color: #1258C2;
}

/* ===== MODAL ===== */
.ssp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ssp-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: ssp-modal-in 0.15s ease-out;
}
@keyframes ssp-modal-in {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.ssp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}
.ssp-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0B1D3A;
}
.ssp-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.ssp-modal-close:hover { background: #f1f5f9; color: #0B1D3A; }
.ssp-modal-body {
    padding: 16px 20px;
}
.ssp-modal-body .ssp-field {
    margin-bottom: 12px;
}
.ssp-modal-body .ssp-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}
.ssp-modal-body .ssp-field label .required {
    color: #E74C3C;
}
.ssp-modal-body .ssp-field input[type="text"],
.ssp-modal-body .ssp-field input[type="date"],
.ssp-modal-body .ssp-field input[type="time"],
.ssp-modal-body .ssp-field textarea,
.ssp-modal-body .ssp-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.ssp-modal-body .ssp-field input:focus,
.ssp-modal-body .ssp-field textarea:focus,
.ssp-modal-body .ssp-field select:focus {
    outline: none;
    border-color: #1258C2;
    box-shadow: 0 0 0 3px rgba(18, 88, 194, 0.1);
}
.ssp-field-row {
    display: flex;
    gap: 10px;
}
.ssp-field-row .ssp-field {
    flex: 1;
}
.ssp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}
.ssp-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}
.ssp-btn-primary {
    background: #1258C2;
    color: #fff;
    border-color: #1258C2;
}
.ssp-btn-primary:hover { background: #0e4a9e; }
.ssp-btn-primary:disabled { background: #94a3b8; border-color: #94a3b8; cursor: not-allowed; }
.ssp-btn-secondary {
    background: #fff;
    color: #475569;
    border-color: #d1d5db;
}
.ssp-btn-secondary:hover { background: #f1f5f9; color: #0B1D3A; border-color: #94a3b8; }

/* Tasks header flex fix */
.ssp-tasks-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===========================================
   v6.7.0 - Enhanced Modals & Toggles
   =========================================== */

/* Wider modal for enhanced forms */
.ssp-modal.ssp-modal-wide {
    max-width: 600px;
}

/* Make ALL modal text bigger and darker for accessibility */
.ssp-modal-body .ssp-field label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #0B1D3A;
    margin-bottom: 6px;
}
.ssp-modal-body .ssp-field label small {
    font-weight: 400;
    color: #64748b;
    font-size: 12px;
}
.ssp-modal-body .ssp-field input[type="text"],
.ssp-modal-body .ssp-field input[type="url"],
.ssp-modal-body .ssp-field input[type="date"],
.ssp-modal-body .ssp-field input[type="time"],
.ssp-modal-body .ssp-field input[type="datetime-local"],
.ssp-modal-body .ssp-field textarea,
.ssp-modal-body .ssp-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #0f172a;
    transition: border-color 0.15s;
    box-sizing: border-box;
    background: #fff;
}
.ssp-modal-body .ssp-field input:hover,
.ssp-modal-body .ssp-field textarea:hover,
.ssp-modal-body .ssp-field select:hover {
    border-color: #94a3b8;
}
.ssp-modal-body .ssp-field input:focus,
.ssp-modal-body .ssp-field textarea:focus,
.ssp-modal-body .ssp-field select:focus {
    outline: none;
    border-color: #1258C2;
    box-shadow: 0 0 0 3px rgba(18, 88, 194, 0.15);
}
.ssp-modal-body .ssp-field input::placeholder,
.ssp-modal-body .ssp-field textarea::placeholder {
    color: #94a3b8;
}
.ssp-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0B1D3A;
}
.ssp-modal-footer .ssp-btn {
    padding: 10px 20px;
    font-size: 14px;
}
.ssp-btn-primary {
    background: #1258C2;
    color: #fff;
    border-color: #1258C2;
}
.ssp-btn-primary:hover { background: #0e4a9e; }

/* Toggle Switch */
.ssp-toggle-group {
    margin: 15px 0 5px 0;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}
.ssp-toggle {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    flex-wrap: wrap;
}
.ssp-toggle input[type="checkbox"] {
    display: none;
}
.ssp-toggle-slider {
    width: 40px;
    min-width: 40px;
    height: 22px;
    background: #cbd5e1;
    border-radius: 11px;
    position: relative;
    transition: background 0.2s;
    margin-top: 1px;
}
.ssp-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.ssp-toggle input:checked + .ssp-toggle-slider {
    background: #1258C2;
}
.ssp-toggle input:checked + .ssp-toggle-slider::after {
    transform: translateX(18px);
}
.ssp-toggle-label {
    font-weight: 600;
    font-size: 14px;
    color: #0B1D3A;
    line-height: 22px;
}
.ssp-toggle small {
    display: block;
    width: 100%;
    padding-left: 50px;
    font-size: 12px;
    color: #64748b;
    margin-top: -2px;
}

/* Info Boxes */
.ssp-info-box {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 14px;
}
.ssp-info-box strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}
.ssp-info-blue {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a5f;
}
.ssp-info-green {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #14532d;
}
.ssp-info-amber {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #78350f;
}
.ssp-info-red {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #7f1d1d;
}

/* Agenda Preview */
.ssp-agenda-preview-box {
    margin-top: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #fafafa;
}
.ssp-agenda-preview-box h4 {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status badges in meeting selector */
.ssp-meeting-option-status {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 5px;
}
.ssp-status-needs-agenda { background: #fef3c7; color: #92400e; }
.ssp-status-draft { background: #dbeafe; color: #1e40af; }
.ssp-status-published { background: #dcfce7; color: #166534; }

/* Emergency alert button */
.ssp-quick-btn.ssp-btn-alert {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}
.ssp-quick-btn.ssp-btn-alert:hover {
    background: #fee2e2;
    color: #991b1b;
    border-color: #dc2626;
    box-shadow: 0 2px 6px rgba(220,38,38,0.15);
}

/* ===========================================
   v6.8.0 - Grandma-proof UI improvements
   =========================================== */

/* Better button tooltips */
.ssp-quick-btn {
    position: relative;
}
.ssp-quick-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: normal;
    max-width: 220px;
    text-align: center;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    pointer-events: none;
    line-height: 1.4;
}
.ssp-quick-btn[title]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
    z-index: 10001;
    pointer-events: none;
}

/* Active/selected button state */
.ssp-quick-btn:active {
    transform: scale(0.97);
}

/* Side panel slide-in header */
.ssp-side-panel .ssp-panel-content h3 {
    font-size: 18px;
    color: #0B1D3A;
    font-weight: 700;
    margin: 0 0 20px;
    padding-right: 40px;
}

/* Side panel fields bigger text */
.ssp-side-panel .ssp-field label {
    font-size: 14px;
    font-weight: 600;
    color: #0B1D3A;
    margin-bottom: 6px;
    display: block;
}
.ssp-side-panel .ssp-field input,
.ssp-side-panel .ssp-field select,
.ssp-side-panel .ssp-field textarea {
    font-size: 15px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}
.ssp-side-panel .ssp-field input:focus,
.ssp-side-panel .ssp-field select:focus,
.ssp-side-panel .ssp-field textarea:focus {
    border-color: #1258C2;
    box-shadow: 0 0 0 3px rgba(18, 88, 194, 0.15);
    outline: none;
}

/* Upload type cards - bigger and clearer */
.ssp-radio-card {
    padding: 14px !important;
}
.ssp-radio-card span {
    font-size: 15px !important;
    color: #0B1D3A !important;
    font-weight: 600 !important;
}
.ssp-radio-card small {
    font-size: 12px !important;
    color: #64748b !important;
}

/* Doc type radio buttons bigger */
.ssp-doc-type label {
    font-size: 15px;
    color: #0B1D3A;
    padding: 6px 0;
}

/* Submit buttons in panel - bigger */
.ssp-side-panel .ssp-btn-primary {
    padding: 12px 24px;
    font-size: 15px;
    width: 100%;
    border-radius: 8px;
    margin-top: 10px;
}

/* Panel close button - bigger and clearer */
.ssp-panel-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    z-index: 1;
}
.ssp-panel-close:hover {
    background: #0B1D3A;
    color: #fff;
}

/* Dropzone bigger and clearer */
.ssp-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    margin: 12px 0;
    transition: all 0.2s;
    background: #f8fafc;
}
.ssp-dropzone:hover {
    border-color: #1258C2;
    background: #eff6ff;
}
.ssp-dropzone p {
    font-size: 15px;
    color: #475569;
    margin: 0;
    font-weight: 500;
}

/* ===========================================
   v6.12.2 — SVG icons, compact task cards,
   edit form, acknowledged state.
   Scoped to #ssp-portal so municipal theme
   button/link styles cannot bleed in.
   =========================================== */

.ssp-tab-content[style*="display:none"],
.ssp-tab-content[style*="display: none"] {
    display: none !important;
}

#ssp-portal .ssp-icon {
    display: inline-block;
    vertical-align: -2px;
    flex-shrink: 0;
}

#ssp-portal .ssp-task-icon .ssp-icon {
    color: #1258C2;
}

/* Overflow guards — cards must never force horizontal scroll */
#ssp-portal .ssp-task-list {
    overflow-x: hidden;
}
#ssp-portal .ssp-task-item {
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
#ssp-portal .ssp-task-content {
    flex: 1;
    min-width: 0;
}
#ssp-portal .ssp-task-title,
#ssp-portal .ssp-task-desc {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Title row: title left, icon actions right */
#ssp-portal .ssp-task-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
}
#ssp-portal .ssp-task-top .ssp-task-title {
    flex: 1;
    min-width: 0;
}

/* Complete button — fixed circle, immune to theme padding */
#ssp-portal .ssp-complete-btn {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #4B5563;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    box-shadow: none;
    cursor: pointer;
    line-height: 1;
}
#ssp-portal .ssp-complete-btn:hover,
#ssp-portal .ssp-complete-btn:focus {
    background: #0B1D3A;
    color: #ffffff;
    border-color: #0B1D3A;
    outline: 2px solid #1258C2;
    outline-offset: 2px;
}
#ssp-portal .ssp-complete-btn:active {
    background: #08152b;
    color: #ffffff;
    border-color: #08152b;
}
#ssp-portal .ssp-complete-btn .ssp-icon {
    display: block;
    color: inherit;
}

/* Icon-only card actions — compact 24px squares in the corner */
#ssp-portal .ssp-task-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
#ssp-portal .ssp-task-action {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    background: #ffffff;
    color: #4B5563;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: none;
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
#ssp-portal .ssp-task-action:hover,
#ssp-portal .ssp-task-action:focus {
    background: #0B1D3A;
    color: #ffffff;
    border-color: #0B1D3A;
    outline: 2px solid #1258C2;
    outline-offset: 2px;
}
#ssp-portal .ssp-task-action:active {
    background: #08152b;
    color: #ffffff;
    border-color: #08152b;
}
#ssp-portal .ssp-task-action:disabled {
    background: #e5e7eb;
    color: #6b7280;
    border-color: #e5e7eb;
    cursor: not-allowed;
}
#ssp-portal .ssp-task-action .ssp-icon {
    display: block;
    color: inherit;
}

/* Acknowledged task state — calm the alarm styling */
#ssp-portal .ssp-task-item.acknowledged {
    background: #f8f9fa;
    border-left-color: #94a3b8;
    opacity: 0.85;
}
#ssp-portal .ssp-task-item.acknowledged .ssp-task-date.overdue {
    color: #6b7280;
}
#ssp-portal .ssp-ack-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 8px;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    background: #e6f4ea;
    color: #1b5e20;
    white-space: nowrap;
}

/* Inline task edit form */
#ssp-portal .ssp-task-item.editing {
    display: block;
    background: #ffffff;
    border: 1px solid #1258C2;
    border-left-width: 3px;
}
#ssp-portal .ssp-task-edit-form label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #0B1D3A;
    margin-bottom: 8px;
}
#ssp-portal .ssp-task-edit-form input,
#ssp-portal .ssp-task-edit-form textarea,
#ssp-portal .ssp-task-edit-form select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 3px;
    padding: 6px 8px;
    font-size: 13px;
    font-weight: 400;
    font-family: inherit;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: none;
}
#ssp-portal .ssp-task-edit-form input:focus,
#ssp-portal .ssp-task-edit-form textarea:focus,
#ssp-portal .ssp-task-edit-form select:focus {
    border-color: #1258C2;
    outline: 2px solid #1258C2;
    outline-offset: 1px;
}
#ssp-portal .ssp-task-edit-form .ssp-input-error {
    border-color: #b91c1c;
    outline: 2px solid #b91c1c;
}
#ssp-portal .ssp-edit-row {
    display: flex;
    gap: 8px;
}
#ssp-portal .ssp-edit-row label {
    flex: 1;
    min-width: 0;
}
#ssp-portal .ssp-edit-btns {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
#ssp-portal .ssp-btn-save-task {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    border: 1px solid #0B1D3A;
    border-radius: 6px;
    box-shadow: none;
    cursor: pointer;
    background: #0B1D3A;
    color: #ffffff;
}
#ssp-portal .ssp-btn-save-task:hover,
#ssp-portal .ssp-btn-save-task:focus {
    background: #1258C2;
    color: #ffffff;
    border-color: #1258C2;
    outline: 2px solid #0B1D3A;
    outline-offset: 2px;
}
#ssp-portal .ssp-btn-save-task:active {
    background: #08152b;
    color: #ffffff;
    border-color: #08152b;
}
#ssp-portal .ssp-btn-save-task:disabled {
    background: #e5e7eb;
    color: #6b7280;
    border-color: #e5e7eb;
    cursor: not-allowed;
}
#ssp-portal .ssp-btn-cancel-task {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: none;
    cursor: pointer;
    background: #ffffff;
    color: #0B1D3A;
}
#ssp-portal .ssp-btn-cancel-task:hover,
#ssp-portal .ssp-btn-cancel-task:focus {
    background: #0B1D3A;
    color: #ffffff;
    border-color: #0B1D3A;
    outline: 2px solid #1258C2;
    outline-offset: 2px;
}
#ssp-portal .ssp-btn-cancel-task:active {
    background: #08152b;
    color: #ffffff;
    border-color: #08152b;
}

/* Small screens: fall back to natural page flow */
@media (max-width: 768px) {
    .ssp-main {
        height: auto;
        min-height: 0;
    }
    .ssp-messages {
        max-height: 55vh;
    }
    #ssp-portal .ssp-task-list {
        max-height: 45vh;
    }
}

/* ===========================================
   v6.13.1 — Spacing polish, labeled task
   actions, clickable overdue badge, agenda
   modal hints
   =========================================== */

/* Wider task panel: room for labeled buttons */
#ssp-portal .ssp-tasks-panel {
    width: 320px;
}

/* Card breathing room */
#ssp-portal .ssp-task-item {
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 10px;
    gap: 0;
}
#ssp-portal .ssp-task-title {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 2px;
}
#ssp-portal .ssp-task-desc {
    font-size: 12px;
    line-height: 1.45;
    color: #4B5563;
    margin: 4px 0 2px;
}
#ssp-portal .ssp-task-meta {
    margin-top: 6px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

/* Labeled footer actions: Complete primary, Edit/Acknowledge quiet */
#ssp-portal .ssp-task-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(11, 29, 58, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
#ssp-portal .ssp-task-action {
    width: auto;
    height: auto;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
#ssp-portal .ssp-task-action .ssp-icon {
    display: inline-block;
}
#ssp-portal .ssp-task-action.ssp-action-primary {
    background: #0B1D3A;
    color: #ffffff;
    border-color: #0B1D3A;
}
#ssp-portal .ssp-task-action.ssp-action-primary:hover,
#ssp-portal .ssp-task-action.ssp-action-primary:focus {
    background: #1258C2;
    color: #ffffff;
    border-color: #1258C2;
    outline: 2px solid #0B1D3A;
    outline-offset: 2px;
}
#ssp-portal .ssp-task-action.ssp-action-primary:active {
    background: #08152b;
    color: #ffffff;
    border-color: #08152b;
}

/* Overdue badge: real button, readable label */
#ssp-portal .ssp-alert-badge {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #991b1b; /* 8.3:1 with white — AAA */
    color: #ffffff;
    border: 1px solid #991b1b;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
}
#ssp-portal .ssp-alert-badge:hover,
#ssp-portal .ssp-alert-badge:focus {
    background: #7f1d1d; /* 10.0:1 with white — AAA */
    color: #ffffff;
    border-color: #7f1d1d;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}
#ssp-portal .ssp-alert-badge:active {
    background: #641717;
    color: #ffffff;
    border-color: #641717;
}

/* Chat area breathing room */
#ssp-portal .ssp-messages {
    padding: 24px;
}
#ssp-portal .ssp-message {
    margin-bottom: 18px;
}
#ssp-portal .ssp-bubble {
    max-width: 78%;
    line-height: 1.55;
    padding: 12px 16px;
}

/* Quick actions: clearer separation, comfier targets */
#ssp-portal .ssp-quick-actions {
    padding: 14px 20px;
    gap: 8px;
    row-gap: 8px;
}

/* Task list + header spacing */
#ssp-portal .ssp-task-list {
    padding: 12px;
}
#ssp-portal .ssp-tasks-header {
    padding: 12px 14px;
}

/* Agenda modal field hints */
#ssp-portal .ssp-field-hint,
.ssp-modal .ssp-field-hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.45;
    color: #4B5563;
}

@media (max-width: 768px) {
    #ssp-portal .ssp-tasks-panel {
        width: 100%;
    }
}

/* ===========================================
   v6.13.2 — ADA text contrast pass (AAA),
   panel spacing, overdue badge jump highlight
   =========================================== */

/* Clear separation: tabs -> count header -> cards */
#ssp-portal .ssp-tasks-header {
    padding: 14px 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}
#ssp-portal .ssp-task-list {
    padding: 14px 16px 18px;
}
#ssp-portal .ssp-task-item {
    margin-bottom: 12px;
}

/* AAA text colors — near-black on light card backgrounds */
#ssp-portal .ssp-task-title {
    color: #111827; /* 16.9:1 on #f8f9fa */
    font-weight: 700;
}
#ssp-portal .ssp-task-desc {
    color: #1f2937; /* 13.4:1 on #f8f9fa */
}
#ssp-portal .ssp-task-meta,
#ssp-portal .ssp-task-date {
    color: #374151; /* 9.6:1 on #f8f9fa */
    font-weight: 600;
}
#ssp-portal .ssp-task-date.overdue {
    color: #7f1d1d; /* 8.6:1 on #fff3cd */
    font-weight: 700;
}
#ssp-portal .ssp-task-item.overdue .ssp-task-title,
#ssp-portal .ssp-task-item.overdue .ssp-task-desc {
    color: #111827; /* on #fff3cd: 14.9:1 */
}
#ssp-portal .ssp-task-count {
    color: #1f2937;
    background: #e5e7eb; /* 11.2:1 */
    font-weight: 700;
}
#ssp-portal .ssp-no-tasks {
    color: #1b5e20; /* 6.9:1 on #fff */
}
#ssp-portal .ssp-no-tasks small {
    color: #374151;
}
#ssp-portal .ssp-bubble {
    color: #111827; /* readable chat text on #f0f4f8: 15.6:1 */
}
#ssp-portal .ssp-cal-hint,
#ssp-portal .ssp-cal-ev-meta,
#ssp-portal .ssp-cal-ev-time {
    color: #374151;
}
#ssp-portal .ssp-input-footer,
#ssp-portal .ssp-help-text {
    color: #374151;
}
#ssp-portal .ssp-ack-chip {
    background: #d7ecdb;
    color: #143d18; /* 9.4:1 */
}

/* Overdue jump: brief highlight so the eye lands on the right card */
@keyframes sspFlash {
    0%   { box-shadow: 0 0 0 3px #1258C2; }
    100% { box-shadow: 0 0 0 3px rgba(18, 88, 194, 0); }
}
#ssp-portal .ssp-task-item.ssp-flash {
    animation: sspFlash 1.6s ease-out 2;
}

/* ===========================================
   v6.13.3 — Darker text everywhere (black),
   gap between top banner and content
   =========================================== */

/* Breathing room under the dark header banner */
#ssp-portal .ssp-header {
    border-radius: 12px;
    margin-bottom: 14px;
}
#ssp-portal .ssp-main {
    border-radius: 12px;
    border-top: 1px solid #e2e8f0;
}

/* Task cards: black text */
#ssp-portal .ssp-task-title {
    color: #000000;
}
#ssp-portal .ssp-task-desc {
    color: #111827;
}
#ssp-portal .ssp-task-meta,
#ssp-portal .ssp-task-date {
    color: #1f2937;
}
#ssp-portal .ssp-task-item.overdue .ssp-task-title {
    color: #000000;
}
#ssp-portal .ssp-task-count {
    color: #111827;
}

/* Calendar: black-forward text throughout */
#ssp-portal .ssp-cal-title {
    color: #000000;
}
#ssp-portal .ssp-cal-day-header {
    color: #1f2937; /* was #94a3b8 (3.0:1 fail) — now 14.7:1 */
}
#ssp-portal .ssp-cal-num,
#ssp-portal .ssp-cal-cell {
    color: #111827;
}
#ssp-portal .ssp-cal-day-label {
    color: #000000;
    font-weight: 700;
}
#ssp-portal .ssp-cal-ev-title {
    color: #000000;
}
#ssp-portal .ssp-cal-ev-time,
#ssp-portal .ssp-cal-ev-meta {
    color: #1f2937;
}
#ssp-portal .ssp-cal-ev-desc {
    color: #1f2937; /* was #94a3b8 — now 13.4:1 on card bg */
}
#ssp-portal .ssp-cal-empty,
#ssp-portal .ssp-cal-hint,
#ssp-portal .ssp-cal-loading {
    color: #374151;
}

/* Chat greeting/messages: full black */
#ssp-portal .ssp-bubble {
    color: #000000;
}

/* ===========================================
   v6.13.4 — Today's date white on AAA blue,
   agenda modal validation message
   =========================================== */

/* Restore + upgrade the today circle: the v6.13.3 ID-scoped
   .ssp-cal-num color override was outranking the .today rule */
#ssp-portal .ssp-cal-cell.today .ssp-cal-num {
    background: #1d4289; /* white on #1d4289 = 8.4:1 AAA */
    color: #ffffff;
    border-radius: 50%;
    font-weight: 700;
}
#ssp-portal .ssp-cal-cell.selected .ssp-cal-num {
    color: #111827;
}
#ssp-portal .ssp-cal-cell.selected.today .ssp-cal-num {
    color: #ffffff;
}

/* v6.13.5 — visible feedback when jumping to the calendar */
@keyframes sspFlashPanel {
    0%   { box-shadow: inset 0 0 0 3px #1d4289; }
    100% { box-shadow: inset 0 0 0 3px rgba(29, 66, 137, 0); }
}
#ssp-portal .ssp-tab-content.ssp-flash-panel {
    animation: sspFlashPanel 1.6s ease-out 2;
    border-radius: 8px;
}

/* ===========================================
   v6.13.7 — Professional quick action buttons.
   Scoped + every state declares bg AND text,
   so no theme colors can bleed in.
   =========================================== */

#ssp-portal .ssp-quick-actions {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 16px 20px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    row-gap: 8px;
}

#ssp-portal .ssp-quick-btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: #ffffff;
    color: #0B1D3A;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(11, 29, 58, 0.06);
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
#ssp-portal .ssp-quick-btn .ssp-icon {
    color: #1d4289;
}
#ssp-portal .ssp-quick-btn:hover {
    background: #0B1D3A;
    color: #ffffff;
    border-color: #0B1D3A;
    box-shadow: 0 2px 6px rgba(11, 29, 58, 0.25);
}
#ssp-portal .ssp-quick-btn:focus {
    background: #0B1D3A;
    color: #ffffff;
    border-color: #0B1D3A;
    outline: 2px solid #1258C2;
    outline-offset: 2px;
}
#ssp-portal .ssp-quick-btn:hover .ssp-icon,
#ssp-portal .ssp-quick-btn:focus .ssp-icon {
    color: #ffffff;
}
#ssp-portal .ssp-quick-btn:active {
    background: #08152b;
    color: #ffffff;
    border-color: #08152b;
}
#ssp-portal .ssp-quick-btn:disabled {
    background: #e5e7eb;
    color: #6b7280;
    border-color: #e5e7eb;
    cursor: not-allowed;
    box-shadow: none;
}

/* Post Alert: the one intentionally red action */
#ssp-portal .ssp-quick-btn.ssp-btn-alert {
    background: #ffffff;
    color: #991b1b; /* 7.7:1 on white — AAA */
    border-color: #991b1b;
}
#ssp-portal .ssp-quick-btn.ssp-btn-alert .ssp-icon {
    color: #991b1b;
}
#ssp-portal .ssp-quick-btn.ssp-btn-alert:hover,
#ssp-portal .ssp-quick-btn.ssp-btn-alert:focus {
    background: #991b1b;
    color: #ffffff;
    border-color: #991b1b;
    outline-color: #7f1d1d;
}
#ssp-portal .ssp-quick-btn.ssp-btn-alert:hover .ssp-icon,
#ssp-portal .ssp-quick-btn.ssp-btn-alert:focus .ssp-icon {
    color: #ffffff;
}
#ssp-portal .ssp-quick-btn.ssp-btn-alert:active {
    background: #7f1d1d;
    color: #ffffff;
    border-color: #7f1d1d;
}
