/* CX Download Frontend Styles */

/* ==================== */
/* Flatpickr Customization */
/* ==================== */

.flatpickr-calendar {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    z-index: 100001 !important; /* Above modals (100000) */
}

/* Prevent scroll issues in modals - calendar uses fixed positioning */
.flatpickr-calendar.static {
    position: absolute !important;
}

.flatpickr-calendar.open {
    z-index: 100001 !important;
}

.flatpickr-months {
    background: #f8fafc;
    border-radius: 8px 8px 0 0;
    padding: 8px 0;
}

.flatpickr-months .flatpickr-month {
    color: #1f2937;
    fill: #1f2937;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 600;
}

.flatpickr-weekdays {
    background: #f8fafc;
}

.flatpickr-weekday {
    color: #6b7280;
    font-weight: 600;
    font-size: 12px;
}

.flatpickr-day {
    border-radius: 6px;
    color: #374151;
}

.flatpickr-day:hover {
    background: #e5e7eb;
    border-color: #e5e7eb;
}

.flatpickr-day.today {
    border-color: #3b82f6;
    background: transparent;
    color: #3b82f6;
    font-weight: 600;
}

.flatpickr-day.today:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #9ca3af;
}

.flatpickr-time {
    border-top: 1px solid #e5e7eb;
    padding: 10px 0;
}

.flatpickr-time input {
    font-size: 16px;
    font-weight: 500;
}

/* Input styling when using altInput */
input.flatpickr-input,
.flatpickr-input[readonly] {
    cursor: pointer;
}

/* ==================== */
/* Base Layout */
/* ==================== */

.cxd-goals,
.cxd-meetings,
.cxd-dashboard {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.cxd-goals-stats,
.cxd-meetings-stats {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.cxd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.cxd-header h2 {
    margin: 0;
    font-size: 14px;
    color: #1a202c;
}

.cxd-header-actions {
    display: flex;
    gap: 10px;
}

/* ==================== */
/* Buttons */
/* ==================== */

.cxd-btn {
    padding: 10px 18px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    background: white;
    color: #374151;
    line-height: 1;
    box-sizing: border-box;
}

a.cxd-btn {
    text-decoration: none;
}

.cxd-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.cxd-btn-primary {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: white;
}

.cxd-btn-primary:hover {
    background: #152a45;
    color: white;
}

a.cxd-btn-primary,
a.cxd-btn-primary:link,
a.cxd-btn-primary:hover,
a.cxd-btn-primary:visited,
a.cxd-btn-primary:active,
a.cxd-btn-primary:focus {
    color: white !important;
    text-decoration: none;
}

.cxd-btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.cxd-btn-secondary:hover {
    background: #f3f4f6;
}

.cxd-btn-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.cxd-btn-danger:hover {
    background: #fecaca;
}

.cxd-btn-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.cxd-btn-warning:hover {
    background: #fde68a;
}

.cxd-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
}

.cxd-btn-xs {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 5px;
}

.cxd-btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* ==================== */
/* Badges - Outline Style with Border */
/* ==================== */

.cxd-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    border: 1px solid;
}

.cxd-badge-outline {
    background: transparent;
}

.cxd-badge-sm {
    padding: 2px 8px;
    font-size: 11px;
}

.cxd-badge-xs {
    padding: 1px 6px;
    font-size: 10px;
}

/* Status badges - light bg, colored text and border */
.cxd-badge-not_started {
    background: #f9fafb;
    color: #6b7280;
    border-color: #d1d5db;
}

.cxd-badge-in_progress {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.cxd-badge-on_hold {
    background: #fffbeb;
    color: #b45309;
    border-color: #fcd34d;
}

.cxd-badge-completed {
    background: #f0fdf4;
    color: #15803d;
    border-color: #86efac;
}

.cxd-badge-cancelled {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.cxd-badge-pending {
    background: #f9fafb;
    color: #6b7280;
    border-color: #d1d5db;
}

.cxd-badge-diverted {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}

.cxd-badge-abandoned {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
}

/* Priority badges */
.cxd-badge-priority-low {
    background: #f9fafb;
    color: #6b7280;
    border-color: #d1d5db;
}

.cxd-badge-priority-medium {
    background: #fffbeb;
    color: #b45309;
    border-color: #fcd34d;
}

.cxd-badge-priority-high {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
}

/* Entry type badges */
.cxd-badge-update {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.cxd-badge-note {
    background: #fffbeb;
    color: #b45309;
    border-color: #fcd34d;
}

.cxd-badge-blocker {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.cxd-badge-achievement {
    background: #f0fdf4;
    color: #15803d;
    border-color: #86efac;
}

/* ==================== */
/* Cards */
/* ==================== */

.cxd-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cxd-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    transition: all 0.15s;
}

.cxd-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cxd-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.cxd-card-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.3;
}

.cxd-card-badges {
    display: flex;
    gap: 6px;
}

.cxd-card-content {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.cxd-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}

.cxd-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cxd-card-actions {
    display: flex;
    gap: 8px;
}

/* Progress Bar */
.cxd-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.cxd-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 3px;
    transition: width 0.3s;
}

/* ==================== */
/* Stats Grid */
/* ==================== */

.cxd-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.cxd-stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}

.cxd-stat-card:hover {
    border-color: #3b82f6;
}

.cxd-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
}

.cxd-stat-label {
    font-size: 12px;
    color: #6b7280;
}

/* ==================== */
/* Single Goal Page */
/* ==================== */

.cxd-goal-single {
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

/* Header */
.cxd-goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.cxd-goal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
}

/* Owner badge - used in meta row and cards */
.cxd-owner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.cxd-owner-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #6b7280;
}

.cxd-owner-photo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

/* Photo badge for attendees - larger size */
.cxd-photo-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 15px;
    color: #374151;
}

.cxd-photo-badge .cxd-badge-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.cxd-photo-badge .dashicons {
    font-size: 24px;
    width: 36px;
    height: 36px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cxd-goal-badges {
    display: flex;
    gap: 8px;
}

.cxd-goal-serial {
    background: #f3f4f6;
    color: #6b7280;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'SF Mono', Monaco, monospace;
    border: 1px solid #e5e7eb;
}

.cxd-goal-parent-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #1e40af;
}

.cxd-goal-parent-notice a {
    color: #1e40af;
    font-weight: 500;
}

/* Meta Row */
.cxd-goal-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 12px;
}

.cxd-goal-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #6b7280;
}

.cxd-goal-meta strong {
    color: #374151;
}

.cxd-goal-actions {
    display: flex;
    gap: 10px;
}

/* Progress */
.cxd-goal-progress {
    margin-bottom: 20px;
}

/* Description */
.cxd-goal-description {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.cxd-goal-description h2 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.cxd-goal-description-text {
    color: #4b5563;
    line-height: 1.6;
    font-size: 14px;
}

.cxd-goal-description-text p {
    margin: 0 0 8px 0;
}

.cxd-goal-description-text p:last-child {
    margin-bottom: 0;
}

/* Milestones Section */
.cxd-goal-milestones-section h2 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.cxd-milestones-full {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual Milestone */
.cxd-milestone-full {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    border-left: 4px solid #e5e7eb;
}

.cxd-milestone-full.cxd-milestone-pending {
    border-left-color: #6b7280;
}

.cxd-milestone-full.cxd-milestone-in_progress {
    border-left-color: #3b82f6;
}

.cxd-milestone-full.cxd-milestone-completed {
    border-left-color: #22c55e;
}

.cxd-milestone-full.cxd-milestone-diverted {
    border-left-color: #f97316;
}

.cxd-milestone-full.cxd-milestone-abandoned {
    border-left-color: #dc2626;
}

.cxd-milestone-header-full {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.cxd-milestone-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.cxd-milestone-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cxd-milestone-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cxd-milestone-pending .cxd-milestone-indicator { background: #6b7280; }
.cxd-milestone-in_progress .cxd-milestone-indicator { background: #3b82f6; }
.cxd-milestone-completed .cxd-milestone-indicator { background: #22c55e; }
.cxd-milestone-diverted .cxd-milestone-indicator { background: #f97316; }
.cxd-milestone-abandoned .cxd-milestone-indicator { background: #dc2626; }

.cxd-milestone-header-full h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
}

.cxd-milestone-due {
    font-size: 12px;
    color: #6b7280;
}

.cxd-milestone-desc {
    margin: 10px 0 0 18px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.cxd-milestone-diverted-link {
    margin: 12px 0 0 18px;
    padding: 10px 14px;
    background: #fff7ed;
    border-radius: 6px;
    font-size: 12px;
    color: #9a3412;
}

.cxd-milestone-diverted-link a {
    color: #ea580c;
    font-weight: 500;
}

/* Milestone Entries */
.cxd-milestone-entries-full {
    margin-top: 12px;
    margin-left: 18px;
}

.cxd-entry-full {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-left: 3px solid;
    border-top: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0 6px 6px 0;
    margin-bottom: 8px;
    background: white;
}

/* Entry colors - thick left border */
.cxd-entry-full-update { border-left-color: #3b82f6; }
.cxd-entry-full-note { border-left-color: #f59e0b; }
.cxd-entry-full-blocker { border-left-color: #ef4444; }
.cxd-entry-full-achievement { border-left-color: #22c55e; }
.cxd-entry-full-diverted { border-left-color: #f97316; }

.cxd-entry-date {
    flex-shrink: 0;
    color: #6b7280;
    font-size: 12px;
    min-width: 75px;
}

.cxd-entry-type {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Entry type text colors */
.cxd-entry-type-update { color: #2563eb; }
.cxd-entry-type-note { color: #d97706; }
.cxd-entry-type-blocker { color: #dc2626; }
.cxd-entry-type-achievement { color: #16a34a; }
.cxd-entry-type-diverted { color: #ea580c; }

.cxd-entry-text {
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.cxd-entry-link {
    color: #ea580c;
    font-weight: 500;
    margin-left: 5px;
}

.cxd-empty-small {
    color: #9ca3af;
    font-size: 13px;
    font-style: italic;
}

/* ==================== */
/* Modal Styles */
/* ==================== */

.cxd-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.cxd-modal-content {
    background: white;
    margin: 20px auto;
    padding: 25px;
    border-radius: 12px;
    max-width: 550px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.cxd-modal-large {
    max-width: 700px;
}

.cxd-modal-close {
    position: absolute;
    top: 15px;
    right: 18px;
    font-size: 26px;
    font-weight: bold;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.cxd-modal-close:hover {
    color: #4b5563;
}

.cxd-modal h2 {
    margin: 0 0 18px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    padding-right: 30px;
}

.cxd-modal h4 {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

/* Form Styles */
.cxd-form-group {
    margin-bottom: 16px;
}

.cxd-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.cxd-form-group input[type="text"],
.cxd-form-group input[type="date"],
.cxd-form-group input[type="email"],
.cxd-form-group input[type="password"],
.cxd-form-group input[type="number"],
.cxd-form-group select,
.cxd-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.cxd-form-group input:disabled,
.cxd-form-group .cxd-input-disabled {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

.cxd-form-group input:focus,
.cxd-form-group select:focus,
.cxd-form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cxd-form-row {
    display: flex;
    gap: 15px;
}

.cxd-form-row .cxd-form-group {
    flex: 1;
}

.cxd-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.cxd-field-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Profile Styles */
.cxd-profile {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cxd-profile h2 {
    margin: 0 0 25px 0;
    font-size: 24px;
    color: #1f2937;
}

.cxd-profile h3 {
    font-size: 16px;
    color: #374151;
    margin: 0;
}

/* Profile Photo Section */
.cxd-profile-photo-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.cxd-profile-photo-preview {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.cxd-profile-photo-preview img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
}

.cxd-photo-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 3px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cxd-photo-placeholder .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #9ca3af;
}

.cxd-profile-photo-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cxd-profile-photo-controls label {
    cursor: pointer;
}

.cxd-profile-photo-controls .cxd-field-hint {
    margin: 0;
}

/* Message Styles */
.cxd-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
}

.cxd-message-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.cxd-message-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Form Actions - spread variant */
.cxd-form-actions-spread {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: none;
}

.cxd-btn-group {
    display: flex;
    gap: 10px;
}

/* Danger button */
.cxd-btn-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.cxd-btn-danger:hover {
    background: #fee2e2;
    border-color: #f87171;
}

/* Form subtitle */
.cxd-form-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.cxd-form-subtitle strong {
    color: #374151;
}

/* Milestone actions group */
.cxd-milestone-actions {
    display: flex;
    gap: 8px;
}

.cxd-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}

/* Milestone Row in Goal Form */
.cxd-milestone-row {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
}

.cxd-milestone-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cxd-milestone-row-title {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.cxd-remove-milestone {
    background: none;
    border: none;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.cxd-remove-milestone:hover {
    color: #ef4444;
}

/* Form Section */
.cxd-form-section {
    margin-bottom: 20px;
}

.cxd-form-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.cxd-form-help {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 12px 0;
}

.cxd-loading {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
}

.cxd-empty-state,
.cxd-login-notice {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    background: #f9fafb;
    border-radius: 10px;
}

/* Access Denied / Not Found Messages */
.cxd-access-denied {
    text-align: center;
    padding: 60px 40px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    max-width: 500px;
    margin: 40px auto;
}

.cxd-access-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.cxd-access-icon .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #6b7280;
}

.cxd-access-icon.cxd-icon-not-found {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.cxd-access-icon.cxd-icon-not-found .dashicons {
    color: #d97706;
}

.cxd-access-denied h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 12px 0;
}

.cxd-access-denied p {
    font-size: 15px;
    color: #4b5563;
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.cxd-access-denied .cxd-access-subtext {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 24px;
}

.cxd-access-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.cxd-access-hint {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 20px !important;
}

/* Milestone Update Form Specific */
.cxd-milestone-update-header {
    background: #f9fafb;
    margin: -25px -25px 20px -25px;
    padding: 18px 25px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #e5e7eb;
}

.cxd-milestone-update-header h3 {
    margin: 0 0 5px 0;
    font-size: 15px;
    color: #1a202c;
}

.cxd-milestone-update-desc {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

/* Divert Form */
.cxd-divert-notice {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
}

.cxd-divert-notice p {
    margin: 0;
    font-size: 13px;
    color: #92400e;
}

.cxd-divert-source {
    background: #f3f4f6;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 13px;
    color: #374151;
    margin-bottom: 15px;
}

/* Add Milestone Form */
.cxd-new-milestone {
    margin-bottom: 15px;
}

.cxd-btn-add-another {
    display: block;
    width: 100%;
    margin: 15px 0;
    padding: 12px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.cxd-btn-add-another:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

/* ==================== */
/* Dashboard Tabs */
/* ==================== */

.cxd-module-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.cxd-tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
}

.cxd-tab-btn:hover {
    color: #1a202c;
}

.cxd-tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.cxd-tab-pane {
    display: none;
}

.cxd-tab-pane.active {
    display: block;
}

/* ==================== */
/* Print Styles */
/* ==================== */

@media print {
    /* Hide interactive elements */
    .cxd-goal-actions,
    .cxd-btn,
    .cxd-modal,
    .cxd-milestone-header-right .cxd-btn {
        display: none !important;
    }
    
    /* Reset page */
    body {
        background: white !important;
        font-size: 11pt !important;
        line-height: 1.4 !important;
        color: #000 !important;
    }
    
    /* Container */
    .cxd-goal-single {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Header styling for print */
    .cxd-goal-header {
        border-bottom: 2px solid #000;
        padding-bottom: 12pt;
        margin-bottom: 12pt;
    }
    
    .cxd-goal-serial {
        background: #f0f0f0 !important;
        border: 1px solid #ccc !important;
        font-size: 9pt !important;
        padding: 2pt 6pt !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    .cxd-goal-title {
        font-size: 16pt !important;
        font-weight: bold !important;
    }
    
    /* Badges for print */
    .cxd-badge {
        border: 1px solid #666 !important;
        background: white !important;
        color: #000 !important;
        font-size: 8pt !important;
        padding: 2pt 8pt !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    .cxd-badge-completed {
        background: #e8f5e9 !important;
        border-color: #4caf50 !important;
    }
    
    .cxd-badge-in_progress {
        background: #e3f2fd !important;
        border-color: #2196f3 !important;
    }
    
    .cxd-badge-priority-high {
        background: #ffebee !important;
        border-color: #f44336 !important;
    }
    
    /* Meta row */
    .cxd-goal-meta-row {
        border-top: 1px solid #ccc !important;
        border-bottom: 1px solid #ccc !important;
        padding: 8pt 0 !important;
        margin-bottom: 12pt !important;
    }
    
    .cxd-goal-meta {
        font-size: 10pt !important;
    }
    
    /* Progress bar for print */
    .cxd-progress-bar {
        height: 8pt !important;
        border: 1px solid #ccc !important;
        background: #f5f5f5 !important;
    }
    
    .cxd-progress-fill {
        background: #666 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    /* Description box */
    .cxd-goal-description {
        border: 1px solid #ccc !important;
        padding: 10pt !important;
        margin-bottom: 12pt !important;
        page-break-inside: avoid;
    }
    
    .cxd-goal-description h2 {
        font-size: 11pt !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 6pt;
        margin-bottom: 8pt !important;
    }
    
    .cxd-goal-description-text {
        font-size: 10pt !important;
    }
    
    /* Milestones section */
    .cxd-goal-milestones-section {
        page-break-before: auto;
    }
    
    .cxd-goal-milestones-section h2 {
        font-size: 11pt !important;
        border-bottom: 1px solid #000;
        padding-bottom: 4pt;
        margin-bottom: 10pt !important;
        page-break-after: avoid;
    }
    
    /* Individual milestone */
    .cxd-milestone-full {
        border: 1px solid #ccc !important;
        border-left: 4pt solid #666 !important;
        padding: 10pt !important;
        margin-bottom: 8pt !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .cxd-milestone-full.cxd-milestone-completed {
        border-left-color: #4caf50 !important;
    }
    
    .cxd-milestone-full.cxd-milestone-in_progress {
        border-left-color: #2196f3 !important;
    }
    
    .cxd-milestone-full.cxd-milestone-diverted {
        border-left-color: #ff9800 !important;
    }
    
    .cxd-milestone-header-full h3 {
        font-size: 11pt !important;
    }
    
    .cxd-milestone-indicator {
        width: 6pt !important;
        height: 6pt !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    .cxd-milestone-desc {
        font-size: 9pt !important;
        color: #444 !important;
    }
    
    /* Entries */
    .cxd-milestone-entries-full {
        margin-top: 8pt !important;
        margin-left: 12pt !important;
    }
    
    .cxd-entry-full {
        border: 1px solid #ddd !important;
        border-left: 3pt solid #999 !important;
        padding: 6pt 8pt !important;
        margin-bottom: 4pt !important;
        font-size: 9pt !important;
        page-break-inside: avoid;
    }
    
    .cxd-entry-full-blocker {
        border-left-color: #f44336 !important;
    }
    
    .cxd-entry-full-achievement {
        border-left-color: #4caf50 !important;
    }
    
    .cxd-entry-full-update {
        border-left-color: #2196f3 !important;
    }
    
    .cxd-entry-date {
        font-size: 8pt !important;
    }
    
    .cxd-entry-type {
        font-size: 7pt !important;
        font-weight: bold !important;
    }
    
    .cxd-entry-text {
        font-size: 9pt !important;
    }
    
    /* Diverted link */
    .cxd-milestone-diverted-link {
        background: #fff8e1 !important;
        border: 1px solid #ffcc02 !important;
        font-size: 9pt !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    /* Page breaks - prevent orphaned headers and keep content together */
    .cxd-goal-description {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .cxd-goal-milestones-section {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    /* Allow page breaks between milestones but not inside them */
    .cxd-milestones-full {
        page-break-before: avoid;
    }
    
    .cxd-milestone-full {
        page-break-inside: avoid;
        break-inside: avoid;
        page-break-after: auto;
    }
    
    /* Keep milestone header with its first entry */
    .cxd-milestone-header-full {
        page-break-after: avoid;
    }
    
    .cxd-milestone-entries-full .cxd-entry-full:first-child {
        page-break-before: avoid;
    }
    
    /* Print footer with date */
    .cxd-goal-single::after {
        content: "Printed on " attr(data-print-date);
        display: block;
        margin-top: 20pt;
        padding-top: 10pt;
        border-top: 1px solid #ccc;
        font-size: 8pt;
        color: #666;
        text-align: right;
    }
}

/* ==================== */
/* Responsive */
/* ==================== */

@media (max-width: 768px) {
    .cxd-goal-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cxd-goal-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cxd-goal-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .cxd-goal-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .cxd-form-row {
        flex-direction: column;
    }
    
    .cxd-milestone-header-full {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cxd-milestone-header-right {
        margin-top: 8px;
    }
    
    .cxd-entry-full {
        flex-direction: column;
        gap: 5px;
    }
    
    .cxd-entry-date {
        min-width: auto;
    }
    
    .cxd-modal {
        padding: 10px;
    }
    
    .cxd-modal-content {
        margin: 10px auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .cxd-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cxd-goal-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .cxd-card-header {
        flex-direction: column;
        gap: 8px;
    }
}

/* ==================== */
/* Meeting Specific Styles */
/* ==================== */

.cxd-meeting-single {
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.cxd-meeting-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.cxd-meeting-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.3;
}

.cxd-meeting-badges {
    display: flex;
    gap: 8px;
}

.cxd-meeting-serial {
    background: #f3f4f6;
    color: #6b7280;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'SF Mono', Monaco, monospace;
    border: 1px solid #e5e7eb;
}

.cxd-meeting-parent-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #1e40af;
}

.cxd-meeting-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 12px;
}

.cxd-meeting-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6b7280;
    align-items: center;
    flex-wrap: wrap;
}

.cxd-meeting-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cxd-meeting-section {
    margin-bottom: 25px;
}

.cxd-meeting-section h2 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
}

/* Attendees */
.cxd-meeting-attendees {
    margin-bottom: 20px;
}

.cxd-attendees-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cxd-attendee-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: #374151;
}

.cxd-attendee-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Agenda Items */
.cxd-agenda-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cxd-agenda-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 15px;
    border-left: 4px solid #6b7280;
}

.cxd-agenda-item.cxd-discussed {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.cxd-agenda-item.cxd-pushed {
    border-left-color: #f97316;
    background: #fff7ed;
}

.cxd-agenda-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.cxd-agenda-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.cxd-agenda-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cxd-agenda-title {
    font-size: 13px;
    color: #1a202c;
}

.cxd-strikethrough {
    text-decoration: line-through;
    color: #9ca3af;
}

.cxd-agenda-notes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.cxd-agenda-notes textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    resize: vertical;
}

/* Checkbox styling */
.cxd-checkbox-wrap {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.cxd-checkbox-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cxd-push-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #f97316;
    cursor: pointer;
}

.cxd-push-checkbox input {
    cursor: pointer;
}

/* Action Items */
.cxd-actions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cxd-action-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 15px;
    border-left: 4px solid #6b7280;
}

.cxd-action-item.cxd-action-planned {
    border-left-color: #6b7280;
}

.cxd-action-item.cxd-action-completed {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.cxd-action-item.cxd-action-pushed {
    border-left-color: #f97316;
    background: #fff7ed;
}

.cxd-action-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.cxd-action-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.cxd-action-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cxd-action-title {
    font-size: 13px;
    color: #1a202c;
}

.cxd-action-notes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.cxd-action-notes textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    resize: vertical;
}

.cxd-action-status-select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 11px;
    background: white;
}

/* Owner and Due badges */
.cxd-owner-badge {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.cxd-due-badge {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #6b7280;
    font-size: 11px;
}

.cxd-due-badge .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

.cxd-from-badge {
    font-size: 10px;
    color: #9ca3af;
}

.cxd-from-badge a {
    color: #3b82f6;
}

/* Pushed badge */
.cxd-badge-pushed {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}

/* Meeting Notes Display */
.cxd-meeting-notes-display {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    font-size: 13px;
    line-height: 1.6;
}

.cxd-meeting-notes-display p {
    margin: 0 0 10px 0;
}

.cxd-meeting-notes-display p:last-child {
    margin-bottom: 0;
}

/* Item Row in Form */
.cxd-item-row {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.cxd-item-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.cxd-remove-item {
    background: none;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.cxd-remove-item:hover {
    color: #ef4444;
}

/* Card serial row */
.cxd-card-serial-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.cxd-card-serial {
    display: inline-block;
    background: #f3f4f6;
    color: #6b7280;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    font-family: monospace;
}

.cxd-card-serial-row .cxd-owner-badge {
    font-size: 11px;
    padding: 2px 8px;
}

.cxd-card-serial-row .cxd-owner-photo {
    width: 16px;
    height: 16px;
}

.cxd-card-serial-row .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

/* Multiple select */
.cxd-select-multiple {
    min-height: 80px;
}

/* Toast Notification */
.cxd-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 100001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.cxd-toast-show {
    opacity: 1;
    transform: translateY(0);
}

.cxd-toast-success {
    background: #22c55e;
    color: white;
}

.cxd-toast-error {
    background: #ef4444;
    color: white;
}

/* Save button states */
.cxd-btn-saving {
    opacity: 0.7;
    pointer-events: none;
}

.cxd-btn-saved {
    background: #22c55e !important;
    border-color: #22c55e !important;
}

/* Item entries (notes) */
.cxd-item-entries {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.cxd-add-note-form {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.cxd-add-note-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    resize: vertical;
}

/* Meeting notes textarea bigger */
#meeting-notes {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

/* ==================== */
/* Filters */
/* ==================== */

.cxd-filters {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.cxd-filters h3 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 15px 0;
}

/* Filter grid layout */
.cxd-filter-row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.cxd-filter-group {
    margin-bottom: 0;
}

.cxd-filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 6px;
}

.cxd-filter-group select,
.cxd-filter-group input[type="date"],
.cxd-filter-group input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    background: white;
}

/* Date range input styling */
.cxd-date-range {
    cursor: pointer;
}

.cxd-filter-group select[multiple] {
    min-height: 100px;
}

.cxd-filter-row {
    display: flex;
    gap: 10px;
}

.cxd-filter-row input {
    flex: 1;
}

/* Range picker with two months */
.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
    height: auto;
}

.flatpickr-calendar.multiMonth {
    width: auto !important;
}

.cxd-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

/* Responsive filters */
@media (min-width: 768px) {
    .cxd-filters {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        align-items: start;
    }
    
    .cxd-filters h3 {
        grid-column: 1 / -1;
    }
    
    .cxd-filter-actions {
        grid-column: 1 / -1;
    }
    
    .cxd-filter-group {
        margin-bottom: 0;
    }
}

/* Entry type badge - NOTE (yellow/amber) - matches other entry types */
.cxd-entry-type-note {
    color: #d97706;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cxd-entry-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Author display */
.cxd-entry-author {
    font-size: 11px;
    font-style: italic;
    color: #9ca3af;
    margin-left: 4px;
}

.cxd-entry-author::before {
    content: "—";
    margin-right: 4px;
}

/* Entry actions container */
.cxd-entry-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Delete entry link */
.cxd-delete-entry-link {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s, color 0.2s;
}

.cxd-delete-entry-link:hover {
    opacity: 1;
    color: #dc2626;
}

.cxd-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.cxd-edit-entry-link {
    font-size: 11px;
    color: #6b7280;
    text-decoration: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.cxd-edit-entry-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

/* Entry meta row - date, type badge, edit link */
.cxd-entry-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Entry edit form */
.cxd-entry-edit-form {
    margin-top: 8px;
    width: 100%;
}

.cxd-entry-edit-form textarea {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
}

.cxd-entry-edit-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cxd-entry-edit-actions {
    margin-top: 8px;
    text-align: right;
}

/* Status select dropdown */
.cxd-status-select {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 2px solid;
    cursor: pointer;
    background: white;
}

.cxd-status-select-planned {
    border-color: #9ca3af;
    color: #4b5563;
}

.cxd-status-select-in_progress {
    border-color: #3b82f6;
    color: #1d4ed8;
}

.cxd-status-select-completed {
    border-color: #22c55e;
    color: #15803d;
}

.cxd-status-select-cancelled {
    border-color: #ef4444;
    color: #dc2626;
}

/* Cancel modal options */
.cxd-cancel-options {
    margin: 15px 0;
}

.cxd-radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.cxd-radio-option:hover {
    border-color: #3b82f6;
}

.cxd-radio-option input[type="radio"] {
    margin: 0;
}

.cxd-radio-option span {
    font-size: 13px;
    color: #374151;
}

/* Audit Trail */
.cxd-audit-trail-section {
    margin-top: 30px;
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.cxd-audit-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
}

.cxd-audit-toggle:hover {
    color: #374151;
}

.cxd-audit-arrow {
    transition: transform 0.2s;
}

.cxd-audit-arrow-open {
    transform: rotate(180deg);
}

.cxd-audit-trail {
    margin-top: 15px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.cxd-audit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cxd-audit-entry {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 12px;
}

.cxd-audit-entry:last-child {
    border-bottom: none;
}

.cxd-audit-date {
    color: #6b7280;
    min-width: 150px;
}

.cxd-audit-action {
    color: #374151;
    flex: 1;
}

.cxd-audit-user {
    color: #9ca3af;
    font-style: italic;
}

/* Print hide audit trail */
@media print {
    .cxd-audit-trail-section {
        display: none;
    }
}

/* Meeting Cancelled Notice (red callout) */
.cxd-meeting-cancelled-notice {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 15px;
}

.cxd-meeting-cancelled-notice h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
}

.cxd-meeting-cancelled-notice p {
    margin: 0;
    font-size: 13px;
    color: #991b1b;
    line-height: 1.5;
}

.cxd-meeting-cancelled-notice p strong {
    color: #7f1d1d;
}

/* Cancelled items */
.cxd-agenda-item.cxd-cancelled {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.cxd-agenda-item.cxd-cancelled .cxd-agenda-title {
    text-decoration: line-through;
    color: #9ca3af;
}

.cxd-action-item.cxd-action-cancelled {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.cxd-action-item.cxd-action-cancelled .cxd-action-title {
    text-decoration: line-through;
    color: #9ca3af;
}

/* Linked Goal Notice (green callout) */
.cxd-meeting-goal-notice {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #22c55e;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #166534;
}

.cxd-meeting-goal-notice .dashicons {
    margin-right: 6px;
    color: #22c55e;
}

.cxd-meeting-goal-notice a {
    color: #15803d;
    font-weight: 500;
}

/* ==================== */
/* Mobile Responsive Styles */
/* ==================== */

/* Tablet and below */
@media (max-width: 768px) {
    /* Meeting header stack */
    .cxd-meeting-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .cxd-meeting-title {
        font-size: 22px;
        line-height: 1.3;
    }
    
    /* Meta row stack */
    .cxd-meeting-meta-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .cxd-meeting-meta {
        flex-wrap: wrap;
        gap: 8px 15px;
    }
    
    .cxd-meeting-actions {
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }
    
    .cxd-meeting-actions .cxd-btn {
        flex: 1;
        min-width: 80px;
        justify-content: center;
    }
    
    /* Agenda/Action items */
    .cxd-agenda-item-header,
    .cxd-action-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cxd-agenda-item-right,
    .cxd-action-item-right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .cxd-agenda-item-left,
    .cxd-action-item-left {
        width: 100%;
    }
    
    .cxd-agenda-title,
    .cxd-action-title {
        font-size: 14px;
    }
    
    .cxd-push-checkbox {
        order: -1;
    }
    
    /* Cards in list view */
    .cxd-meeting-card,
    .cxd-goal-card {
        padding: 15px;
    }
    
    .cxd-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cxd-card-title {
        font-size: 18px;
    }
    
    .cxd-card-meta {
        flex-wrap: wrap;
        gap: 8px 12px;
    }
    
    .cxd-card-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }
    
    .cxd-card-actions .cxd-btn {
        flex: 1;
        justify-content: center;
    }
    
    /* Milestone cards */
    .cxd-milestone-card {
        padding: 15px;
    }
    
    .cxd-milestone-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cxd-milestone-title {
        font-size: 16px;
    }
    
    .cxd-milestone-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    /* Header buttons */
    .cxd-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .cxd-header h2 {
        font-size: 20px;
    }
    
    .cxd-header-actions {
        display: flex;
        gap: 8px;
    }
    
    .cxd-header-actions .cxd-btn {
        flex: 1;
        justify-content: center;
    }
    
    /* Filters */
    .cxd-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .cxd-filters select,
    .cxd-filters input {
        width: 100%;
    }
    
    /* Attendees wrap */
    .cxd-attendees-list {
        flex-wrap: wrap;
    }
    
    /* Form improvements */
    .cxd-form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .cxd-form-group {
        width: 100%;
    }
    
    .cxd-form-group input,
    .cxd-form-group select,
    .cxd-form-group textarea {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 12px;
    }
    
    /* Modal full width on mobile */
    .cxd-modal-content {
        width: 95%;
        max-height: calc(100vh - 20px);
        margin: 10px auto;
        padding: 15px;
    }
    
    /* Checkbox sizing */
    .cxd-agenda-checkbox,
    .cxd-discussed-checkbox input[type="checkbox"] {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }
    
    .cxd-agenda-item-left label {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Entry meta row */
    .cxd-entry-meta-row {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Phone specific (smaller screens) */
@media (max-width: 480px) {
    /* Smaller title */
    .cxd-meeting-title {
        font-size: 20px;
    }
    
    /* Stats 2 column */
    .cxd-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .cxd-stat-card {
        padding: 12px 8px;
    }
    
    .cxd-stat-value {
        font-size: 18px;
    }
    
    .cxd-stat-label {
        font-size: 11px;
    }
    
    /* Buttons smaller */
    .cxd-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .cxd-btn-sm {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .cxd-btn .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
    
    /* Badges smaller */
    .cxd-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    /* Entry type badges */
    .cxd-entry-type,
    .cxd-entry-type-note {
        font-size: 10px;
    }
    
    /* Entry rows */
    .cxd-entry-full {
        padding: 10px;
    }
    
    .cxd-entry-date {
        font-size: 11px;
    }
    
    .cxd-entry-text {
        font-size: 13px;
    }
    
    /* Card title smaller */
    .cxd-card-title {
        font-size: 16px;
    }
    
    /* Section headers */
    .cxd-meeting-section h2,
    .cxd-goal-section h2 {
        font-size: 16px;
    }
    
    /* Meta items tighter */
    .cxd-meta-item {
        font-size: 12px;
    }
    
    /* Owner badge */
    .cxd-owner-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    /* Attendee badge */
    .cxd-attendee-badge {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    /* Push checkbox label */
    .cxd-push-checkbox span {
        font-size: 12px;
    }
    
    /* Audit trail */
    .cxd-audit-toggle {
        font-size: 12px;
    }
    
    .cxd-audit-entry {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    /* Notice boxes */
    .cxd-meeting-pushed-notice,
    .cxd-meeting-cancelled-notice,
    .cxd-meeting-goal-notice {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    /* Item notes area */
    .cxd-item-notes textarea {
        font-size: 14px;
    }
    
    /* Meeting notes */
    .cxd-meeting-notes textarea {
        font-size: 14px;
        min-height: 120px;
    }
    
    /* Milestone description */
    .cxd-milestone-description {
        font-size: 13px;
    }
    
    /* Goal progress bar */
    .cxd-goal-progress {
        height: 6px;
    }
    
    /* Diverted notice */
    .cxd-diverted-notice {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    /* Form sections */
    .cxd-form-section {
        padding: 15px;
    }
    
    .cxd-form-section h3 {
        font-size: 15px;
    }
    
    /* Item row in forms */
    .cxd-item-row {
        padding: 12px;
    }
    
    .cxd-item-row-header {
        font-size: 12px;
    }
    
    /* Serial number */
    .cxd-meeting-serial,
    .cxd-goal-serial {
        font-size: 11px;
    }
}

/* Touch-friendly tap targets */
@media (pointer: coarse) {
    .cxd-btn,
    .cxd-checkbox-label,
    .cxd-push-checkbox,
    select,
    input[type="checkbox"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    .cxd-agenda-item-header input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }
    
    /* Larger touch targets for edit link */
    .cxd-edit-entry-link {
        padding: 8px;
        margin: -8px;
    }
}

/* Print Styles */
@media print {
    /* Hide empty text input areas */
    .cxd-meeting-notes-input,
    #meeting-notes,
    textarea[name="meeting_notes"] {
        display: none !important;
    }
    
    /* Hide interactive elements */
    .cxd-btn,
    .cxd-meeting-actions button,
    .cxd-push-checkbox,
    .cxd-edit-entry-link,
    .cxd-entry-edit-form,
    select,
    input[type="checkbox"],
    .cxd-item-notes,
    .cxd-add-note-form,
    .cxd-toast,
    .cxd-modal,
    .cxd-status-select {
        display: none !important;
    }
    
    /* Show audit trail expanded */
    #cxd-audit-trail {
        display: block !important;
    }
    
    .cxd-audit-toggle {
        display: none !important;
    }
    
    .cxd-audit-trail-section {
        page-break-inside: avoid;
    }
    
    /* General print cleanup */
    .cxd-meeting-single {
        max-width: 100%;
        padding: 0;
    }
    
    .cxd-meeting-header {
        border-bottom: 2px solid #000;
        margin-bottom: 20px;
    }
    
    .cxd-agenda-item,
    .cxd-action-item {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .cxd-meeting-section {
        page-break-inside: avoid;
    }
}

/* Meeting Notes Entries */
.cxd-meeting-notes-entries {
    margin-bottom: 15px;
}

.cxd-entry-full-meeting-note {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #f59e0b;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 0 8px 8px 0;
}

.cxd-meeting-notes-input textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
}

.cxd-meeting-notes-input textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Meeting link in goals */
.cxd-entry-meeting-link {
    color: #3b82f6;
    font-size: 12px;
    text-decoration: none;
    margin-left: 4px;
}

.cxd-entry-meeting-link:hover {
    text-decoration: underline;
}

/* Checkbox styling - consistent size */
.cxd-agenda-checkbox,
.cxd-discussed-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
