/* ========================================
   Speaking Opportunities Manager - Dashboard Styles
   All styles are scoped to .som-* classes
   ======================================== */

.som-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 100%;
    padding: 20px 0;
    color: #1e1e1e;
}

/* Header */
.som-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.som-dashboard-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #1e1e1e;
}

.som-dashboard-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.som-button {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f0;
    color: #1e1e1e;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.som-button:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.som-button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.som-button-primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

.som-button-small {
    padding: 4px 10px;
    font-size: 12px;
}

.som-button-danger {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

.som-button-danger:hover {
    background: #b71c1c;
    border-color: #b71c1c;
    color: #fff;
}

/* KPI Cards */
.som-kpi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.som-kpi-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.som-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.som-kpi-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1.2;
}

.som-kpi-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

.som-kpi-warning .som-kpi-value {
    color: #d63638;
}

.som-kpi-action .som-kpi-value {
    color: #2271b1;
}

/* Dashboard Controls */
.som-dashboard-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    align-items: center;
}

/* Search */
.som-search {
    display: flex;
    flex: 1 1 250px;
    min-width: 200px;
}

.som-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    min-width: 100px;
}

.som-search-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.som-search-button {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* Filters */
.som-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 2 1 400px;
}

.som-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    min-width: 150px;
    flex: 1 1 auto;
}

.som-filter-clear {
    padding: 8px 16px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.som-filter-clear:hover {
    background: #e0e0e0;
}

/* View Toggle */
.som-dashboard-view-controls {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.som-view-toggle {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.som-view-toggle.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.som-view-toggle:hover:not(.active) {
    background: #f0f0f0;
}

/* Table View */
.som-table-view {
    overflow-x: auto;
    margin-bottom: 20px;
}

.som-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.som-table thead {
    background: #f8f9fa;
}

.som-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #1e1e1e;
    border-bottom: 2px solid #e5e5e5;
    white-space: nowrap;
}

.som-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.som-table tbody tr:hover {
    background: #f8f9fa;
}

.som-table .som-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Status Colors */
.som-status-researching {
    background: #e8f0fe;
    color: #1967d2;
}

.som-status-proposal-drafting {
    background: #fef3e8;
    color: #d9800e;
}

.som-status-submitted {
    background: #e3f7e5;
    color: #1e7e34;
}

.som-status-under-review {
    background: #fff4e5;
    color: #b8600a;
}

.som-status-accepted {
    background: #d4edda;
    color: #155724;
}

.som-status-declined {
    background: #f8d7da;
    color: #721c24;
}

.som-status-postponed {
    background: #fff3cd;
    color: #856404;
}

.som-status-cancelled {
    background: #e2e3e5;
    color: #383d41;
}

/* Badges */
.som-badge-priority {
    display: inline-block;
    padding: 2px 8px;
    background: #fff3cd;
    color: #856404;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 5px;
}

.som-badge-action {
    display: inline-block;
    padding: 2px 8px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 5px;
}

.som-badge-deadline {
    display: inline-block;
    padding: 2px 8px;
    background: #d1ecf1;
    color: #0c5460;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 5px;
}

.som-badge-followup {
    display: inline-block;
    padding: 2px 8px;
    background: #e8f0fe;
    color: #1967d2;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 5px;
}

/* Deadline Indicators */
.som-deadline {
    position: relative;
}

.som-deadline-indicator {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
}

.som-deadline-overdue {
    background: #f8d7da;
    color: #721c24;
}

.som-deadline-critical {
    background: #fff3cd;
    color: #856404;
}

.som-deadline-warning {
    background: #d1ecf1;
    color: #0c5460;
}

.som-deadline-normal {
    background: #d4edda;
    color: #155724;
}

/* Action Buttons */
.som-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.som-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.som-action-btn:hover {
    background: #f0f0f0;
}

.som-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Destructive Actions - Security Styling */
.som-action-delete-permanent {
    color: #d63638 !important;
    font-weight: 700;
}

.som-action-delete-permanent:hover {
    background: #fce4ec !important;
    color: #b71c1c !important;
}

.som-action-trash {
    color: #d9800e !important;
}

.som-action-trash:hover {
    background: #fff3cd !important;
}

/* Card View */
.som-card-view {
    margin-bottom: 20px;
}

.som-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.som-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
}

.som-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.som-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.som-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.som-card-header h3 a {
    color: #1e1e1e;
    text-decoration: none;
}

.som-card-header h3 a:hover {
    color: #2271b1;
}

.som-card-priority {
    font-size: 18px;
    margin-left: 8px;
}

.som-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.som-card-field {
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.som-card-label {
    font-weight: 500;
    color: #666;
    min-width: 80px;
}

.som-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

/* Pagination */
.som-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid #e5e5e5;
}

.som-pagination-info {
    color: #666;
    font-size: 14px;
}

.som-pagination-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.som-pagination-links a {
    color: #2271b1;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.som-pagination-links a:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.som-pagination-current {
    padding: 6px 12px;
    font-size: 14px;
    color: #1e1e1e;
}

/* Error Messages */
.som-error {
    padding: 15px 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

/* ========================================
   ENTRY VIEW - Single Opportunity View
   ======================================== */

.som-entry-view-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Entry Selector */
.som-entry-selector {
    background: #f8f9fa;
    padding: 15px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 20px;
}

.som-entry-select-form {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.som-entry-select-form label {
    font-weight: 600;
    font-size: 14px;
}

.som-entry-select-form select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 300px;
    max-width: 100%;
    font-size: 14px;
    background: #fff;
}

/* Entry Header */
.som-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
    flex-wrap: wrap;
    gap: 15px;
}

.som-entry-title-area h1 {
    margin: 0 0 8px 0;
    font-size: 26px;
    font-weight: 600;
    color: #1e1e1e;
}

.som-entry-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.som-entry-type {
    background: #e8f0fe;
    color: #1967d2;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.som-entry-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Entry Sections */
.som-entry-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.som-entry-section-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e1e1e;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* Entry Fields Grid - 2 column layout */
.som-entry-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.som-entry-field {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
    border-bottom: 1px solid #f8f9fa;
}

.som-entry-field-full {
    grid-column: 1 / -1;
}

.som-entry-field-label {
    font-weight: 600;
    font-size: 13px;
    color: #666;
    margin-bottom: 2px;
}

.som-entry-field-value {
    font-size: 14px;
    color: #1e1e1e;
    word-break: break-word;
}

.som-entry-field-value a {
    color: #2271b1;
    text-decoration: none;
}

.som-entry-field-value a:hover {
    text-decoration: underline;
}

/* Notes */
.som-notes-list {
    max-height: 400px;
    overflow-y: auto;
}

.som-note {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.som-note:last-child {
    border-bottom: none;
}

.som-note-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.som-note-author {
    font-weight: 500;
    color: #1e1e1e;
}

.som-note-content {
    font-size: 14px;
    line-height: 1.5;
}

/* Activity */
.som-activity-item {
    padding: 6px 0;
    border-bottom: 1px solid #f8f9fa;
    font-size: 14px;
}

.som-activity-item:last-child {
    border-bottom: none;
}

.som-activity-time {
    color: #666;
    font-size: 12px;
    margin-right: 10px;
}

/* Info message */
.som-info {
    padding: 20px;
    background: #f0f8ff;
    border: 1px solid #b8d4e8;
    border-radius: 4px;
    text-align: center;
    color: #004466;
}

/* ========================================
   EDITOR STYLES
   ======================================== */

.som-editor-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Editor Styles (existing) */
.som-editor {
    max-width: 100%;
    padding: 20px 0;
}

.som-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
}

.som-editor-header h1 {
    margin: 0;
    font-size: 24px;
}

.som-editor-actions {
    display: flex;
    gap: 10px;
}

.som-editor-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.som-editor-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 25px;
}

.som-editor-section h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #1e1e1e;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.som-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.som-editor-field-full {
    grid-column: 1 / -1;
}

.som-editor-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.som-editor-field label {
    font-weight: 500;
    font-size: 14px;
    color: #1e1e1e;
}

.som-editor-field input,
.som-editor-field select,
.som-editor-field textarea {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.som-editor-field input:focus,
.som-editor-field select:focus,
.som-editor-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.som-editor-field textarea {
    resize: vertical;
    min-height: 80px;
}

.som-required {
    color: #d63638;
    font-weight: 700;
}

.som-editor-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e5e5e5;
    display: flex;
    gap: 10px;
}

.som-editor-notes-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.som-notes-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 10px;
}

.som-note {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.som-note:last-child {
    border-bottom: none;
}

.som-note-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.som-note-author {
    font-weight: 500;
    color: #1e1e1e;
}

.som-note-content {
    font-size: 14px;
    line-height: 1.5;
}

.som-add-note {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.som-add-note textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 80px;
    font-family: inherit;
    resize: vertical;
}

/* Notifications */
.som-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 15px 20px;
    border-radius: 4px;
    color: #fff;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.som-notification-show {
    transform: translateX(0);
}

.som-notification-success {
    background: #1e7e34;
}

.som-notification-error {
    background: #d63638;
}

.som-notification-warning {
    background: #d9800e;
}

/* Inline editing */
.som-inline-edit-wrapper {
    display: flex;
    gap: 4px;
    align-items: center;
}

.som-inline-edit-input {
    padding: 4px 8px;
    border: 2px solid #2271b1;
    border-radius: 3px;
    font-size: 14px;
    width: 100%;
    min-width: 80px;
}

.som-inline-edit-input:focus {
    outline: none;
}

.som-inline-save-btn,
.som-inline-cancel-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 14px;
}

.som-inline-save-btn {
    color: #1e7e34;
}

.som-inline-save-btn:hover {
    background: #e8f5e9;
}

.som-inline-cancel-btn {
    color: #d63638;
}

.som-inline-cancel-btn:hover {
    background: #fce4ec;
}

/* Confirmation Dialog */
.som-confirm-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    z-index: 10000;
    max-width: 400px;
    width: 90%;
}

.som-confirm-dialog h3 {
    margin-top: 0;
    color: #d63638;
}

.som-confirm-dialog .som-confirm-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.som-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

/* ========================================
   EXPORT UI STYLES
   ======================================== */

.som-export-ui {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.som-export-ui h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.som-export-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.som-export-format {
    display: flex;
    align-items: center;
    gap: 15px;
}

.som-export-format label {
    font-weight: 600;
    min-width: 80px;
}

.som-export-format select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

.som-export-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.som-export-fields label {
    font-weight: 600;
}

.som-export-field-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fafafa;
}

.som-export-field-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
}

.som-export-field-checkboxes label:hover {
    background: #f0f0f0;
}

.som-export-field-checkboxes input[type="checkbox"] {
    margin: 0;
}

.som-export-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.som-export-actions .som-button {
    padding: 10px 24px;
}

/* ========================================
   REPORTS STYLES - COMPLETE FIXED VERSION
   ======================================== */

.som-reporting-dashboard {
    max-width: 100%;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.som-reporting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.som-reporting-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #1e1e1e;
}

.som-reporting-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.som-report-period {
    padding: 8px 16px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.som-report-period:hover {
    background: #e0e0e0;
}

.som-report-period.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

/* Summary Cards */
.som-report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.som-report-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.som-report-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1.2;
}

.som-report-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 6px;
}

.som-report-success .som-report-number {
    color: #1e7e34;
}

.som-report-warning .som-report-number {
    color: #d9800e;
}

/* ========================================
   CHARTS - FIXED SIZING
   ======================================== */

.som-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.som-chart-container {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
    min-height: 320px;
}

.som-chart-container h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e1e1e;
}

/* Chart canvas sizing */
.som-chart-container canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 300px;
    min-height: 250px;
}

/* Chart.js wrapper */
.som-chart-container .chartjs-size-monitor {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
}

.som-chart-container .chartjs-render-monitor {
    min-height: 250px;
    max-height: 300px;
    width: 100% !important;
}

/* Chart.js tooltip fix */
.som-chart-container .chartjs-tooltip {
    z-index: 999;
}

/* Doughnut chart container - needs special handling */
.som-chart-container canvas[data-chart-type="doughnut"] {
    max-height: 280px;
    min-height: 220px;
}

/* ========================================
   REPORT DETAILS TABLES
   ======================================== */

.som-report-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.som-report-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.som-report-section h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e1e1e;
}

.som-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.som-report-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #e5e5e5;
    font-weight: 600;
    color: #1e1e1e;
    background: #f8f9fa;
}

.som-report-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.som-report-table tr:last-child td {
    border-bottom: none;
}

.som-report-table tr:hover td {
    background: #f8f9fa;
}

/* ========================================
   REPORTS RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .som-charts-grid,
    .som-report-details {
        grid-template-columns: 1fr;
    }
    
    .som-chart-container {
        min-height: 300px;
    }
    
    .som-chart-container canvas {
        max-height: 280px;
        min-height: 220px;
    }
}

@media (max-width: 768px) {
    .som-reporting-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .som-report-summary {
        grid-template-columns: 1fr 1fr;
    }
    
    .som-report-number {
        font-size: 28px;
    }
    
    .som-chart-container {
        min-height: 280px;
        padding: 15px;
    }
    
    .som-chart-container canvas {
        max-height: 240px;
        min-height: 180px;
    }
    
    .som-chart-container .chartjs-render-monitor {
        min-height: 180px;
        max-height: 240px;
    }
}

@media (max-width: 480px) {
    .som-report-summary {
        grid-template-columns: 1fr;
    }
    
    .som-report-number {
        font-size: 24px;
    }
    
    .som-chart-container {
        min-height: 240px;
    }
    
    .som-chart-container canvas {
        max-height: 200px;
        min-height: 150px;
    }
    
    .som-chart-container .chartjs-render-monitor {
        min-height: 150px;
        max-height: 200px;
    }
}

/* ========================================
   NOTICE STYLES
   ======================================== */

.som-notice {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.som-notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.som-notice-success a {
    color: #155724;
    font-weight: 600;
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .som-charts-grid,
    .som-report-details {
        grid-template-columns: 1fr;
    }
    
    .som-entry-fields-grid {
        grid-template-columns: 1fr;
    }
    
    .som-editor-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .som-dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .som-dashboard-actions {
        justify-content: stretch;
    }
    
    .som-dashboard-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .som-dashboard-view-controls {
        margin-left: 0;
    }
    
    .som-kpi-cards {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .som-kpi-card {
        padding: 10px;
    }
    
    .som-kpi-value {
        font-size: 22px;
    }
    
    .som-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .som-table th,
    .som-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .som-filters {
        flex-direction: column;
    }
    
    .som-filters select {
        min-width: 100%;
    }
    
    .som-pagination {
        flex-direction: column;
        align-items: center;
    }
    
    .som-editor-grid {
        grid-template-columns: 1fr;
    }
    
    .som-editor-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .som-editor-actions {
        justify-content: stretch;
    }
    
    .som-editor-section {
        padding: 15px;
    }
    
    .som-entry-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .som-entry-actions {
        justify-content: stretch;
    }
    
    .som-entry-select-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .som-entry-select-form select {
        min-width: 100%;
    }
    
    .som-reporting-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .som-report-summary {
        grid-template-columns: 1fr 1fr;
    }
    
    .som-report-number {
        font-size: 28px;
    }
    
    .som-chart-container {
        padding: 15px;
    }
    
    .som-export-field-checkboxes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .som-table th,
    .som-table td {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .som-action-btn {
        padding: 6px 10px;
        font-size: 18px;
    }
    
    .som-report-summary {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .som-entry-selector,
    .som-entry-actions,
    .som-dashboard-actions,
    .som-dashboard-controls,
    .som-pagination,
    .som-view-toggle,
    .som-kpi-cards,
    .som-search,
    .som-filters,
    .som-reporting-actions,
    .som-report-summary,
    .som-charts-grid,
    .som-report-details,
    .som-actions,
    .som-add-note,
    .som-editor-actions,
    .som-editor-footer {
        display: none !important;
    }
    
    .som-entry-section {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    .som-entry-fields-grid {
        display: block !important;
    }
    
    .som-entry-field {
        padding: 3px 0 !important;
        border-bottom: none !important;
        display: flex !important;
        flex-direction: row !important;
    }
    
    .som-entry-field-label {
        min-width: 150px !important;
    }
}